Functions
Functions
Peripheral Driver » APP DRIVER » PKC

## Functions
uint16_t | app_pkc_init (app_pkc_params_t *p_params, app_pkc_evt_handler_t evt_handler)
| Initialize the APP PKC DRIVER according to the specified parameters in the app_pkc_params_t and app_pkc_evt_handler_t. More...
uint16_t | app_pkc_deinit (void)
| De-initialize the APP PKC DRIVER peripheral. More...
uint16_t | app_pkc_ecc_point_multi_sync (app_pkc_ecc_point_multi_t *p_input, uint32_t timeout)
| Realize the point multiplication operation of ECC ellipse algorithm, : result = k * point, polling mode. More...
uint16_t | app_pkc_ecc_point_multi_async (app_pkc_ecc_point_multi_t *p_input)
| Realize the point multiplication operation of ECC ellipse algorithm, : result = k * point, Interrupt mode. More...
uint16_t | app_pkc_modular_add_sync (app_pkc_modular_add_t *p_input, uint32_t timeout)
| Realization of modular addition: result = (A + B) mod P, Polling mode. More...
uint16_t | app_pkc_modular_add_async (app_pkc_modular_add_t *p_input)
| Realization of modular addition: result = (A + B) mod P, Interrupt mode. More...
uint16_t | app_pkc_modular_sub_sync (app_pkc_modular_sub_t *p_input, uint32_t timeout)
| Implementation of modular subtraction: result = (A - B) mod P, Polling mode. More...
uint16_t | app_pkc_modular_sub_async (app_pkc_modular_sub_t *p_input)
| Implementation of modular subtraction: result = (A - B) mod P, Interrupt mode. More...
uint16_t | app_pkc_modular_left_shift_sync (app_pkc_modular_shift_t *p_input, uint32_t timeout)
| Realization of module shift left operation: result = (A<<ShiftBits) mod P, Polling mode. More...
uint16_t | app_pkc_modular_left_shift_async (app_pkc_modular_shift_t *p_input)
| Realization of module shift left operation: result = (A<<ShiftBits) mod P, Interrupt mode. More...
uint16_t | app_pkc_modular_compare_sync (app_pkc_modular_compare_t *p_input, uint32_t timeout)
| Realization of modular comparison operation: result = A mod P, Polling mode. More...
uint16_t | app_pkc_modular_compare_async (app_pkc_modular_compare_t *p_input)
| Realization of modular comparison operation: result = A mod P, Interrupt mode. More...
uint16_t | app_pkc_montgomery_multi_sync (app_pkc_montgomery_multi_t *p_input, uint32_t timeout)
| Realization of modular multiplication: result = A*B mod P, Polling mode. More...
uint16_t | app_pkc_montgomery_multi_async (app_pkc_montgomery_multi_t *p_input)
| Realization of modular multiplication: result = A*B mod P, Interrupt mode. More...
uint16_t | app_pkc_montgomery_inversion_sync (app_pkc_montgomery_inversion_t *p_input, uint32_t timeout)
| Realization of modular inversion: result = A^(-1)mod P, Polling mode. More...
uint16_t | app_pkc_montgomery_inversion_async (app_pkc_montgomery_inversion_t *p_input)
| Realization of modular inversion: result = A^(-1)mod P, Interrupt mode. More...
uint16_t | app_pkc_big_number_multi_sync (app_pkc_big_number_multi_t *p_input, uint32_t timeout)
| Realize multiplication of large numbers: result = A*B, Polling mode. More...
uint16_t | app_pkc_big_number_multi_async (app_pkc_big_number_multi_t *p_input)
| Realize multiplication of large numbers: result = A*B, Interrupt mode. More...
uint16_t | app_pkc_big_number_add_sync (app_pkc_big_number_add_t *p_input, uint32_t timeout)
| Realize addition of large numbers: result = A+B, Polling mode. More...
uint16_t | app_pkc_big_number_add_async (app_pkc_big_number_add_t *p_input)
| Realize addition of large numbers: result = A+B, Interrupt mode. More...
pkc_handle_t * | app_pkc_get_handle (void)
| Return the PKC handle. More...

## Detailed Description

## Function Documentation

## ◆ app_pkc_big_number_add_async()

uint16_t app_pkc_big_number_add_async | ( | app_pkc_big_number_add_t * | p_input | ) |

Realize addition of large numbers: result = A+B, Interrupt mode.

Parameters

  [in] | p_input | pointer to the input parameter pkc_big_number_add_t structure variable.

Returns
  Result of operation.

## ◆ app_pkc_big_number_add_sync()

uint16_t app_pkc_big_number_add_sync | ( | app_pkc_big_number_add_t * | p_input,
|  | uint32_t | timeout
| ) |  |

Realize addition of large numbers: result = A+B, Polling mode.

Parameters

  [in] | p_input | pointer to the input parameter pkc_big_number_add_t structure variable.
  [in] | timeout | Timeout duration

Returns
  Result of operation.

## ◆ app_pkc_big_number_multi_async()

uint16_t app_pkc_big_number_multi_async | ( | app_pkc_big_number_multi_t * | p_input | ) |

Realize multiplication of large numbers: result = A*B, Interrupt mode.

Parameters

  [in] | p_input | pointer to the input parameter pkc_big_number_multi_t structure variable.

Returns
  Result of operation.

## ◆ app_pkc_big_number_multi_sync()

uint16_t app_pkc_big_number_multi_sync | ( | app_pkc_big_number_multi_t * | p_input,
|  | uint32_t | timeout
| ) |  |

Realize multiplication of large numbers: result = A*B, Polling mode.

Parameters

  [in] | p_input | pointer to the input parameter pkc_big_number_multi_t structure variable.
  [in] | timeout | Timeout duration

Returns
  Result of operation.

## ◆ app_pkc_deinit()

uint16_t app_pkc_deinit | ( | void |  | ) |

De-initialize the APP PKC DRIVER peripheral.

Returns
  Result of De-initialization.

## ◆ app_pkc_ecc_point_multi_async()

uint16_t app_pkc_ecc_point_multi_async | ( | app_pkc_ecc_point_multi_t * | p_input | ) |

Realize the point multiplication operation of ECC ellipse algorithm, : result = k * point, Interrupt mode.

Parameters

  [in] | p_input | pointer to the input parameter pkc_ecc_point_multi_t structure variable.

Returns
  Result of operation.

## ◆ app_pkc_ecc_point_multi_sync()

uint16_t app_pkc_ecc_point_multi_sync | ( | app_pkc_ecc_point_multi_t * | p_input,
|  | uint32_t | timeout
| ) |  |

Realize the point multiplication operation of ECC ellipse algorithm, : result = k * point, polling mode.

Parameters

  [in] | p_input | pointer to the input parameter pkc_ecc_point_multi_t structure variable.
  [in] | timeout | Timeout duration

Returns
  Result of operation.

## ◆ app_pkc_get_handle()

pkc_handle_t* app_pkc_get_handle | ( | void |  | ) |

Return the PKC handle.

Returns
  Pointer to the PKC handle.

## ◆ app_pkc_init()

uint16_t app_pkc_init | ( | app_pkc_params_t * | p_params,
|  | app_pkc_evt_handler_t | evt_handler
| ) |  |

Initialize the APP PKC DRIVER according to the specified parameters in the app_pkc_params_t and app_pkc_evt_handler_t.

Note
  If interrupt mode is set, you can use blocking mode. Conversely, if blocking mode is set, you can't use interrupt mode.

Parameters

  [in] | p_params | Pointer to app_pkc_params_t parameter which contains the configuration information for the specified PKC module.
  [in] | evt_handler | PKC user callback function.

Returns
  Result of initialization.

## ◆ app_pkc_modular_add_async()

uint16_t app_pkc_modular_add_async | ( | app_pkc_modular_add_t * | p_input | ) |

Realization of modular addition: result = (A + B) mod P, Interrupt mode.

Parameters

  [in] | p_input | pointer to the input parameter pkc_modular_add_t structure variable.

Returns
  Result of operation.

## ◆ app_pkc_modular_add_sync()

uint16_t app_pkc_modular_add_sync | ( | app_pkc_modular_add_t * | p_input,
|  | uint32_t | timeout
| ) |  |

Realization of modular addition: result = (A + B) mod P, Polling mode.

Parameters

  [in] | p_input | pointer to the input parameter pkc_modular_add_t structure variable.
  [in] | timeout | Timeout duration

Returns
  Result of operation.

## ◆ app_pkc_modular_compare_async()

uint16_t app_pkc_modular_compare_async | ( | app_pkc_modular_compare_t * | p_input | ) |

Realization of modular comparison operation: result = A mod P, Interrupt mode.

Parameters

  [in] | p_input | pointer to the input parameter pkc_modular_compare_t structure variable.

Returns
  Result of operation.

## ◆ app_pkc_modular_compare_sync()

uint16_t app_pkc_modular_compare_sync | ( | app_pkc_modular_compare_t * | p_input,
|  | uint32_t | timeout
| ) |  |

Realization of modular comparison operation: result = A mod P, Polling mode.

Parameters

  [in] | p_input | pointer to the input parameter pkc_modular_compare_t structure variable.
  [in] | timeout | Timeout duration

Returns
  Result of operation.

## ◆ app_pkc_modular_left_shift_async()

uint16_t app_pkc_modular_left_shift_async | ( | app_pkc_modular_shift_t * | p_input | ) |

Realization of module shift left operation: result = (A<<ShiftBits) mod P, Interrupt mode.

Parameters

  [in] | p_input | pointer to the input parameter pkc_modular_shift_t structure variable.

Returns
  Result of operation.

## ◆ app_pkc_modular_left_shift_sync()

uint16_t app_pkc_modular_left_shift_sync | ( | app_pkc_modular_shift_t * | p_input,
|  | uint32_t | timeout
| ) |  |

Realization of module shift left operation: result = (A<<ShiftBits) mod P, Polling mode.

Parameters

  [in] | p_input | pointer to the input parameter pkc_modular_shift_t structure variable.
  [in] | timeout | Timeout duration

Returns
  Result of operation.

## ◆ app_pkc_modular_sub_async()

uint16_t app_pkc_modular_sub_async | ( | app_pkc_modular_sub_t * | p_input | ) |

Implementation of modular subtraction: result = (A - B) mod P, Interrupt mode.

Parameters

  [in] | p_input | pointer to the input parameter pkc_modular_sub_t structure variable.

Returns
  Result of operation.

## ◆ app_pkc_modular_sub_sync()

uint16_t app_pkc_modular_sub_sync | ( | app_pkc_modular_sub_t * | p_input,
|  | uint32_t | timeout
| ) |  |

Implementation of modular subtraction: result = (A - B) mod P, Polling mode.

Parameters

  [in] | p_input | pointer to the input parameter pkc_modular_sub_t structure variable.
  [in] | timeout | Timeout duration

Returns
  Result of operation.

## ◆ app_pkc_montgomery_inversion_async()

uint16_t app_pkc_montgomery_inversion_async | ( | app_pkc_montgomery_inversion_t * | p_input | ) |

Realization of modular inversion: result = A^(-1)mod P, Interrupt mode.

Parameters

  [in] | p_input | pointer to the input parameter pkc_montgomery_inversion_t structure variable.

Returns
  Result of operation.

## ◆ app_pkc_montgomery_inversion_sync()

uint16_t app_pkc_montgomery_inversion_sync | ( | app_pkc_montgomery_inversion_t * | p_input,
|  | uint32_t | timeout
| ) |  |

Realization of modular inversion: result = A^(-1)mod P, Polling mode.

Parameters

  [in] | p_input | pointer to the input parameter pkc_montgomery_inversion_t structure variable.
  [in] | timeout | Timeout duration

Returns
  Result of operation.

## ◆ app_pkc_montgomery_multi_async()

uint16_t app_pkc_montgomery_multi_async | ( | app_pkc_montgomery_multi_t * | p_input | ) |

Realization of modular multiplication: result = A*B mod P, Interrupt mode.

Parameters

  [in] | p_input | pointer to the input parameter pkc_montgomery_multi_t structure variable.

Returns
  Result of operation.

## ◆ app_pkc_montgomery_multi_sync()

uint16_t app_pkc_montgomery_multi_sync | ( | app_pkc_montgomery_multi_t * | p_input,
|  | uint32_t | timeout
| ) |  |

Realization of modular multiplication: result = A*B mod P, Polling mode.

Parameters

  [in] | p_input | pointer to the input parameter pkc_montgomery_multi_t structure variable.
  [in] | timeout | Timeout duration

Returns
  Result of operation.