Functions
IO Operation Functions
Peripheral Driver » HAL Driver » PKC » Functions

Data transfers functions. More...

Collaboration diagram for IO Operation Functions:

## Functions
hal_status_t | hal_pkc_rsa_modular_exponent (pkc_handle_t *p_pkc, pkc_rsa_modular_exponent_t *p_input, uint32_t timeout)
| Execute RSA Modular Exponentiation in blocking mode. More...
hal_status_t | hal_pkc_ecc_point_multi (pkc_handle_t *p_pkc, pkc_ecc_point_multi_t *p_input, uint32_t timeout)
| Execute ECC Point Multiplication in blocking mode. More...
hal_status_t | hal_pkc_ecc_point_multi_it (pkc_handle_t *p_pkc, pkc_ecc_point_multi_t *p_input)
| Execute ECC Point Multiplication in non-blocking mode with Interrupt. More...
hal_status_t | hal_pkc_modular_add (pkc_handle_t *p_pkc, pkc_modular_add_t *p_input, uint32_t timeout)
| Execute Modular Addition in blocking mode. More...
hal_status_t | hal_pkc_modular_add_it (pkc_handle_t *p_pkc, pkc_modular_add_t *p_input)
| Execute Modular Addition in non-blocking mode with Interrupt. More...
hal_status_t | hal_pkc_modular_sub (pkc_handle_t *p_pkc, pkc_modular_sub_t *p_input, uint32_t timeout)
| Execute Modular Subtraction in blocking mode. More...
hal_status_t | hal_pkc_modular_sub_it (pkc_handle_t *p_pkc, pkc_modular_sub_t *p_input)
| Execute Modular Subtraction in non-blocking mode with Interrupt. More...
hal_status_t | hal_pkc_modular_left_shift (pkc_handle_t *p_pkc, pkc_modular_shift_t *p_input, uint32_t timeout)
| Execute Modular Left Shift in blocking mode. More...
hal_status_t | hal_pkc_modular_left_shift_it (pkc_handle_t *p_pkc, pkc_modular_shift_t *p_input)
| Execute Modular Left Shift in non-blocking mode with Interrupt. More...
hal_status_t | hal_pkc_modular_compare (pkc_handle_t *p_pkc, pkc_modular_compare_t *p_input, uint32_t timeout)
| Execute Modular Comparison in blocking mode. More...
hal_status_t | hal_pkc_modular_compare_it (pkc_handle_t *p_pkc, pkc_modular_compare_t *p_input)
| Execute Modular Comparison in non-blocking mode with Interrupt. More...
hal_status_t | hal_pkc_montgomery_multi (pkc_handle_t *p_pkc, pkc_montgomery_multi_t *p_input, uint32_t timeout)
| Execute Montgomery Modular Multiplication in blocking mode. More...
hal_status_t | hal_pkc_montgomery_multi_it (pkc_handle_t *p_pkc, pkc_montgomery_multi_t *p_input)
| Execute Montgomery Modular Multiplication in non-blocking mode with Interrupt. More...
hal_status_t | hal_pkc_montgomery_inversion (pkc_handle_t *p_pkc, pkc_montgomery_inversion_t *p_input, uint32_t timeout)
| Execute Montgomery Inversion in blocking mode. More...
hal_status_t | hal_pkc_montgomery_inversion_it (pkc_handle_t *p_pkc, pkc_montgomery_inversion_t *p_input)
| Execute Montgomery Inversion in non-blocking mode with Interrupt. More...
hal_status_t | hal_pkc_big_number_multi (pkc_handle_t *p_pkc, pkc_big_number_multi_t *p_input, uint32_t timeout)
| Execute Big Number Multiplication in blocking mode. More...
hal_status_t | hal_pkc_big_number_multi_it (pkc_handle_t *p_pkc, pkc_big_number_multi_t *p_input)
| Execute Big Number Multiplication in non-blocking mode with Interrupt. More...
hal_status_t | hal_pkc_big_number_add (pkc_handle_t *p_pkc, pkc_big_number_add_t *p_input, uint32_t timeout)
| Execute Big Number Addition in blocking mode. More...
hal_status_t | hal_pkc_big_number_add_it (pkc_handle_t *p_pkc, pkc_big_number_add_t *p_input)
| Execute Big Number Addition in non-blocking mode with Interrupt. More...

## Detailed Description

Data transfers functions.

      ==============================================================================
                          ##### IO operation functions #####
     ===============================================================================
     [..]
        This subsection provides a set of functions allowing to manage the PKC
        data transfers.

        (#) There are two modes of transfer:
           (++) Blocking mode: The communication is performed in polling mode.
                The HAL status of all data processing is returned by the same function
                after finishing transfer.
           (++) No-Blocking mode: The communication is performed using Interrupts
                , These APIs return the HAL status.
                The end of the data processing will be indicated through the
                dedicated PKC IRQ when using Interrupt mode.
                The hal_pkc_done_callback() user callbacks will be executed respectively at the end of the calculate process
                The hal_pkc_error_callback() user callback will be executed when a communication error is detected

## Function Documentation

## ◆ hal_pkc_big_number_add()

hal_status_t hal_pkc_big_number_add | ( | pkc_handle_t * | p_pkc,
|  | pkc_big_number_add_t * | p_input,
|  | uint32_t | timeout
| ) |  |

Execute Big Number Addition in blocking mode.

Note
  The computed result will be stored in the buffter pointed by p_pkc->pResult.

Parameters

  [in] | p_pkc | Pointer to a PKC handle which contains the configuration information for the specified PKC module.
  [in] | p_input | Pointer to an expression structure which contains the input computing parameters.
  [in] | timeout | Timeout duration

Return values

  HAL_OK | Operation is OK.
  HAL_ERROR | Parameter error or operation not supported.
  HAL_BUSY | Driver is busy.
  HAL_TIMEOUT | Timeout occurred.

## ◆ hal_pkc_big_number_add_it()

hal_status_t hal_pkc_big_number_add_it | ( | pkc_handle_t * | p_pkc,
|  | pkc_big_number_add_t * | p_input
| ) |  |

Execute Big Number Addition in non-blocking mode with Interrupt.

Note
  The computed result will be stored in the buffter pointed by p_pkc->pResult.

Parameters

  [in] | p_pkc | Pointer to a PKC handle which contains the configuration information for the specified PKC module.
  [in] | p_input | Pointer to an expression structure which contains the input computing parameters.

Return values

  HAL_OK | Operation is OK.
  HAL_ERROR | Parameter error or operation not supported.
  HAL_BUSY | Driver is busy.
  HAL_TIMEOUT | Timeout occurred.

## ◆ hal_pkc_big_number_multi()

hal_status_t hal_pkc_big_number_multi | ( | pkc_handle_t * | p_pkc,
|  | pkc_big_number_multi_t * | p_input,
|  | uint32_t | timeout
| ) |  |

Execute Big Number Multiplication in blocking mode.

Note
  The computed result will be stored in the buffter pointed by p_pkc->pResult.

Parameters

  [in] | p_pkc | Pointer to a PKC handle which contains the configuration information for the specified PKC module.
  [in] | p_input | Pointer to an expression structure which contains the input computing parameters.
  [in] | timeout | Timeout duration

Return values

  HAL_OK | Operation is OK.
  HAL_ERROR | Parameter error or operation not supported.
  HAL_BUSY | Driver is busy.
  HAL_TIMEOUT | Timeout occurred.

## ◆ hal_pkc_big_number_multi_it()

hal_status_t hal_pkc_big_number_multi_it | ( | pkc_handle_t * | p_pkc,
|  | pkc_big_number_multi_t * | p_input
| ) |  |

Execute Big Number Multiplication in non-blocking mode with Interrupt.

Note
  The computed result will be stored in the buffter pointed by p_pkc->pResult.

Parameters

  [in] | p_pkc | Pointer to a PKC handle which contains the configuration information for the specified PKC module.
  [in] | p_input | Pointer to an expression structure which contains the input computing parameters.

Return values

  HAL_OK | Operation is OK.
  HAL_ERROR | Parameter error or operation not supported.
  HAL_BUSY | Driver is busy.
  HAL_TIMEOUT | Timeout occurred.

## ◆ hal_pkc_ecc_point_multi()

hal_status_t hal_pkc_ecc_point_multi | ( | pkc_handle_t * | p_pkc,
|  | pkc_ecc_point_multi_t * | p_input,
|  | uint32_t | timeout
| ) |  |

Execute ECC Point Multiplication in blocking mode.

Note
  The computed result will be stored in the buffter pointed by p_pkc->pResult.

Parameters

  [in] | p_pkc | Pointer to a PKC handle which contains the configuration information for the specified PKC module.
  [in] | p_input | Pointer to an expression structure which contains the input computing parameters.
  [in] | timeout | Timeout duration

Return values

  HAL_OK | Operation is OK.
  HAL_ERROR | Parameter error or operation not supported.
  HAL_BUSY | Driver is busy.
  HAL_TIMEOUT | Timeout occurred.

## ◆ hal_pkc_ecc_point_multi_it()

hal_status_t hal_pkc_ecc_point_multi_it | ( | pkc_handle_t * | p_pkc,
|  | pkc_ecc_point_multi_t * | p_input
| ) |  |

Execute ECC Point Multiplication in non-blocking mode with Interrupt.

Note
  The computed result will be stored in the buffter pointed by p_pkc->pResult.

Parameters

  [in] | p_pkc | Pointer to a PKC handle which contains the configuration information for the specified PKC module.
  [in] | p_input | Pointer to an expression structure which contains the input computing parameters.

Return values

  HAL_OK | Operation is OK.
  HAL_ERROR | Parameter error or operation not supported.
  HAL_BUSY | Driver is busy.
  HAL_TIMEOUT | Timeout occurred.

## ◆ hal_pkc_modular_add()

hal_status_t hal_pkc_modular_add | ( | pkc_handle_t * | p_pkc,
|  | pkc_modular_add_t * | p_input,
|  | uint32_t | timeout
| ) |  |

Execute Modular Addition in blocking mode.

Note
  The computed result will be stored in the buffter pointed by p_pkc->pResult.

Parameters

  [in] | p_pkc | Pointer to a PKC handle which contains the configuration information for the specified PKC module.
  [in] | p_input | Pointer to an expression structure which contains the input computing parameters.
  [in] | timeout | Timeout duration

Return values

  HAL_OK | Operation is OK.
  HAL_ERROR | Parameter error or operation not supported.
  HAL_BUSY | Driver is busy.
  HAL_TIMEOUT | Timeout occurred.

## ◆ hal_pkc_modular_add_it()

hal_status_t hal_pkc_modular_add_it | ( | pkc_handle_t * | p_pkc,
|  | pkc_modular_add_t * | p_input
| ) |  |

Execute Modular Addition in non-blocking mode with Interrupt.

Note
  The computed result will be stored in the buffter pointed by p_pkc->pResult.

Parameters

  [in] | p_pkc | Pointer to a PKC handle which contains the configuration information for the specified PKC module.
  [in] | p_input | Pointer to an expression structure which contains the input computing parameters.

Return values

  HAL_OK | Operation is OK.
  HAL_ERROR | Parameter error or operation not supported.
  HAL_BUSY | Driver is busy.
  HAL_TIMEOUT | Timeout occurred.

## ◆ hal_pkc_modular_compare()

hal_status_t hal_pkc_modular_compare | ( | pkc_handle_t * | p_pkc,
|  | pkc_modular_compare_t * | p_input,
|  | uint32_t | timeout
| ) |  |

Execute Modular Comparison in blocking mode.

Note
  The computed result will be stored in the buffter pointed by p_pkc->pResult.

Parameters

  [in] | p_pkc | Pointer to a PKC handle which contains the configuration information for the specified PKC module.
  [in] | p_input | Pointer to an expression structure which contains the input computing parameters.
  [in] | timeout | Timeout duration

Return values

  HAL_OK | Operation is OK.
  HAL_ERROR | Parameter error or operation not supported.
  HAL_BUSY | Driver is busy.
  HAL_TIMEOUT | Timeout occurred.

## ◆ hal_pkc_modular_compare_it()

hal_status_t hal_pkc_modular_compare_it | ( | pkc_handle_t * | p_pkc,
|  | pkc_modular_compare_t * | p_input
| ) |  |

Execute Modular Comparison in non-blocking mode with Interrupt.

Note
  The computed result will be stored in the buffter pointed by p_pkc->pResult.

Parameters

  [in] | p_pkc | Pointer to a PKC handle which contains the configuration information for the specified PKC module.
  [in] | p_input | Pointer to an expression structure which contains the input computing parameters.

Return values

  HAL_OK | Operation is OK.
  HAL_ERROR | Parameter error or operation not supported.
  HAL_BUSY | Driver is busy.
  HAL_TIMEOUT | Timeout occurred.

## ◆ hal_pkc_modular_left_shift()

hal_status_t hal_pkc_modular_left_shift | ( | pkc_handle_t * | p_pkc,
|  | pkc_modular_shift_t * | p_input,
|  | uint32_t | timeout
| ) |  |

Execute Modular Left Shift in blocking mode.

Note
  The computed result will be stored in the buffter pointed by p_pkc->pResult.

Parameters

  [in] | p_pkc | Pointer to a PKC handle which contains the configuration information for the specified PKC module.
  [in] | p_input | Pointer to an expression structure which contains the input computing parameters.
  [in] | timeout | Timeout duration

Return values

  HAL_OK | Operation is OK.
  HAL_ERROR | Parameter error or operation not supported.
  HAL_BUSY | Driver is busy.
  HAL_TIMEOUT | Timeout occurred.

## ◆ hal_pkc_modular_left_shift_it()

hal_status_t hal_pkc_modular_left_shift_it | ( | pkc_handle_t * | p_pkc,
|  | pkc_modular_shift_t * | p_input
| ) |  |

Execute Modular Left Shift in non-blocking mode with Interrupt.

Note
  The computed result will be stored in the buffter pointed by p_pkc->pResult.

Parameters

  [in] | p_pkc | Pointer to a PKC handle which contains the configuration information for the specified PKC module.
  [in] | p_input | Pointer to an expression structure which contains the input computing parameters.

Return values

  HAL_OK | Operation is OK.
  HAL_ERROR | Parameter error or operation not supported.
  HAL_BUSY | Driver is busy.
  HAL_TIMEOUT | Timeout occurred.

## ◆ hal_pkc_modular_sub()

hal_status_t hal_pkc_modular_sub | ( | pkc_handle_t * | p_pkc,
|  | pkc_modular_sub_t * | p_input,
|  | uint32_t | timeout
| ) |  |

Execute Modular Subtraction in blocking mode.

Note
  The computed result will be stored in the buffter pointed by p_pkc->pResult.

Parameters

  [in] | p_pkc | Pointer to a PKC handle which contains the configuration information for the specified PKC module.
  [in] | p_input | Pointer to an expression structure which contains the input computing parameters.
  [in] | timeout | Timeout duration

Return values

  HAL_OK | Operation is OK.
  HAL_ERROR | Parameter error or operation not supported.
  HAL_BUSY | Driver is busy.
  HAL_TIMEOUT | Timeout occurred.

## ◆ hal_pkc_modular_sub_it()

hal_status_t hal_pkc_modular_sub_it | ( | pkc_handle_t * | p_pkc,
|  | pkc_modular_sub_t * | p_input
| ) |  |

Execute Modular Subtraction in non-blocking mode with Interrupt.

Note
  The computed result will be stored in the buffter pointed by p_pkc->pResult.

Parameters

  [in] | p_pkc | Pointer to a PKC handle which contains the configuration information for the specified PKC module.
  [in] | p_input | Pointer to an expression structure which contains the input computing parameters.

Return values

  HAL_OK | Operation is OK.
  HAL_ERROR | Parameter error or operation not supported.
  HAL_BUSY | Driver is busy.
  HAL_TIMEOUT | Timeout occurred.

## ◆ hal_pkc_montgomery_inversion()

hal_status_t hal_pkc_montgomery_inversion | ( | pkc_handle_t * | p_pkc,
|  | pkc_montgomery_inversion_t * | p_input,
|  | uint32_t | timeout
| ) |  |

Execute Montgomery Inversion in blocking mode.

Note
  The computed result will be stored in the buffter pointed by p_pkc->pResult.

Parameters

  [in] | p_pkc | Pointer to a PKC handle which contains the configuration information for the specified PKC module.
  [in] | p_input | Pointer to an expression structure which contains the input computing parameters.
  [in] | timeout | Timeout duration

Return values

  HAL_OK | Operation is OK.
  HAL_ERROR | Parameter error or operation not supported.
  HAL_BUSY | Driver is busy.
  HAL_TIMEOUT | Timeout occurred.

## ◆ hal_pkc_montgomery_inversion_it()

hal_status_t hal_pkc_montgomery_inversion_it | ( | pkc_handle_t * | p_pkc,
|  | pkc_montgomery_inversion_t * | p_input
| ) |  |

Execute Montgomery Inversion in non-blocking mode with Interrupt.

Note
  The computed result will be stored in the buffter pointed by p_pkc->pResult.

Parameters

  [in] | p_pkc | Pointer to a PKC handle which contains the configuration information for the specified PKC module.
  [in] | p_input | Pointer to an expression structure which contains the input computing parameters.

Return values

  HAL_OK | Operation is OK.
  HAL_ERROR | Parameter error or operation not supported.
  HAL_BUSY | Driver is busy.
  HAL_TIMEOUT | Timeout occurred.

## ◆ hal_pkc_montgomery_multi()

hal_status_t hal_pkc_montgomery_multi | ( | pkc_handle_t * | p_pkc,
|  | pkc_montgomery_multi_t * | p_input,
|  | uint32_t | timeout
| ) |  |

Execute Montgomery Modular Multiplication in blocking mode.

Note
  The computed result will be stored in the buffter pointed by p_pkc->pResult.

Parameters

  [in] | p_pkc | Pointer to a PKC handle which contains the configuration information for the specified PKC module.
  [in] | p_input | Pointer to an expression structure which contains the input computing parameters.
  [in] | timeout | Timeout duration

Return values

  HAL_OK | Operation is OK.
  HAL_ERROR | Parameter error or operation not supported.
  HAL_BUSY | Driver is busy.
  HAL_TIMEOUT | Timeout occurred.

## ◆ hal_pkc_montgomery_multi_it()

hal_status_t hal_pkc_montgomery_multi_it | ( | pkc_handle_t * | p_pkc,
|  | pkc_montgomery_multi_t * | p_input
| ) |  |

Execute Montgomery Modular Multiplication in non-blocking mode with Interrupt.

Note
  The computed result will be stored in the buffter pointed by p_pkc->pResult.

Parameters

  [in] | p_pkc | Pointer to a PKC handle which contains the configuration information for the specified PKC module.
  [in] | p_input | Pointer to an expression structure which contains the input computing parameters.

Return values

  HAL_OK | Operation is OK.
  HAL_ERROR | Parameter error or operation not supported.
  HAL_BUSY | Driver is busy.
  HAL_TIMEOUT | Timeout occurred.

## ◆ hal_pkc_rsa_modular_exponent()

hal_status_t hal_pkc_rsa_modular_exponent | ( | pkc_handle_t * | p_pkc,
|  | pkc_rsa_modular_exponent_t * | p_input,
|  | uint32_t | timeout
| ) |  |

Execute RSA Modular Exponentiation in blocking mode.

Note
  The computed result will be stored in the buffter pointed by p_pkc->pResult.

Parameters

  [in] | p_pkc | Pointer to a PKC handle which contains the configuration information for the specified PKC module.
  [in] | p_input | Pointer to an expression structure which contains the input computing parameters.
  [in] | timeout | Timeout duration

Return values

  HAL_OK | Operation is OK.
  HAL_ERROR | Parameter error or operation not supported.
  HAL_BUSY | Driver is busy.
  HAL_TIMEOUT | Timeout occurred.