STM32L486xx HAL User Manual
Functions
CRYPEx Private Functions
CRYPEx

Functions

static HAL_StatusTypeDef CRYP_ProcessData (CRYP_HandleTypeDef *hcryp, uint8_t *Input, uint16_t Ilength, uint8_t *Output, uint32_t Timeout)
 Write/read input/output data in polling mode.
static HAL_StatusTypeDef CRYP_ReadKey (CRYP_HandleTypeDef *hcryp, uint8_t *Output, uint32_t Timeout)
 Read derivative key in polling mode when CRYP hardware block is set in key derivation operating mode (mode 2).
static void CRYP_SetDMAConfig (CRYP_HandleTypeDef *hcryp, uint32_t inputaddr, uint16_t Size, uint32_t outputaddr)
 Set the DMA configuration and start the DMA transfer.
static void CRYP_Authentication_SetDMAConfig (CRYP_HandleTypeDef *hcryp, uint32_t inputaddr, uint16_t Size, uint32_t outputaddr)
 Set the DMA configuration and start the DMA transfer for GCM, GMAC, CCM or CMAC chaining modes.
static void CRYP_Authentication_DMAInCplt (DMA_HandleTypeDef *hdma)
 DMA CRYP Input Data process complete callback for GCM, GMAC, CCM or CMAC chaining modes.
static void CRYP_Authentication_DMAError (DMA_HandleTypeDef *hdma)
 DMA CRYP communication error callback for GCM, GMAC, CCM or CMAC chaining modes.
static void CRYP_Authentication_DMAOutCplt (DMA_HandleTypeDef *hdma)
 DMA CRYP Output Data process complete callback for GCM, GMAC, CCM or CMAC chaining modes.
static HAL_StatusTypeDef CRYP_WaitOnCCFlag (CRYP_HandleTypeDef *hcryp, uint32_t Timeout)
 Handle CRYP hardware block Timeout when waiting for CCF flag to be raised.
static HAL_StatusTypeDef CRYP_WaitOnBusyFlagReset (CRYP_HandleTypeDef *hcryp, uint32_t Timeout)
 Wait for Busy Flag to be reset during a GCM payload encryption process suspension.
static void CRYP_DMAInCplt (DMA_HandleTypeDef *hdma)
 DMA CRYP Input Data process complete callback.
static void CRYP_DMAOutCplt (DMA_HandleTypeDef *hdma)
 DMA CRYP Output Data process complete callback.
static void CRYP_DMAError (DMA_HandleTypeDef *hdma)
 DMA CRYP communication error callback.
static void CRYP_Padding (CRYP_HandleTypeDef *hcryp, uint32_t difflength, uint32_t polling)
 Last header or payload block padding when size is not a multiple of 128 bits.
HAL_StatusTypeDef CRYP_AES_Auth_IT (CRYP_HandleTypeDef *hcryp)
 Handle CRYP block input/output data handling under interruption for GCM, GMAC, CCM or CMAC chaining modes.

Function Documentation

HAL_StatusTypeDef CRYP_AES_Auth_IT ( CRYP_HandleTypeDef *  hcryp)

Handle CRYP block input/output data handling under interruption for GCM, GMAC, CCM or CMAC chaining modes.

Note:
The function is called under interruption only, once interruptions have been enabled by HAL_CRYPEx_AES_Auth_IT().
Parameters:
hcryp,:pointer to a CRYP_HandleTypeDef structure that contains the configuration information for CRYP module
Return values:
HALstatus

Definition at line 2212 of file stm32l4xx_hal_cryp_ex.c.

References HAL_CRYPEx_ComputationCpltCallback().

Referenced by HAL_CRYP_IRQHandler().

static void CRYP_Authentication_DMAError ( DMA_HandleTypeDef hdma) [static]

DMA CRYP communication error callback for GCM, GMAC, CCM or CMAC chaining modes.

Parameters:
hdma,:DMA handle
Return values:
None

Definition at line 2186 of file stm32l4xx_hal_cryp_ex.c.

References HAL_CRYP_ErrorCallback().

Referenced by CRYP_Authentication_SetDMAConfig().

static void CRYP_Authentication_DMAInCplt ( DMA_HandleTypeDef hdma) [static]

DMA CRYP Input Data process complete callback for GCM, GMAC, CCM or CMAC chaining modes.

Note:
Specific setting of hcryp fields are required only in the case of header phase where no output data DMA transfer is on-going (only input data transfer is enabled in such a case).
Parameters:
hdma,:DMA handle.
Return values:
None

Definition at line 2101 of file stm32l4xx_hal_cryp_ex.c.

References CRYP_Padding(), CRYP_POLLING_OFF, and HAL_CRYP_InCpltCallback().

Referenced by CRYP_Authentication_SetDMAConfig().

static void CRYP_Authentication_DMAOutCplt ( DMA_HandleTypeDef hdma) [static]

DMA CRYP Output Data process complete callback for GCM, GMAC, CCM or CMAC chaining modes.

Note:
This callback is called only in the payload phase.
Parameters:
hdma,:DMA handle.
Return values:
None

Definition at line 2146 of file stm32l4xx_hal_cryp_ex.c.

References CRYP_Padding(), CRYP_POLLING_ON, and HAL_CRYP_OutCpltCallback().

Referenced by CRYP_Authentication_SetDMAConfig().

static void CRYP_Authentication_SetDMAConfig ( CRYP_HandleTypeDef *  hcryp,
uint32_t  inputaddr,
uint16_t  Size,
uint32_t  outputaddr 
) [static]

Set the DMA configuration and start the DMA transfer for GCM, GMAC, CCM or CMAC chaining modes.

Parameters:
hcryp,:pointer to a CRYP_HandleTypeDef structure that contains the configuration information for CRYP module.
inputaddr,:Address of the Input buffer.
Size,:Size of the Input buffer un bytes, must be a multiple of 16.
outputaddr,:Address of the Output buffer, null pointer when no output DMA stream has to be configured.
Return values:
None

Definition at line 2691 of file stm32l4xx_hal_cryp_ex.c.

References CRYP_Authentication_DMAError(), CRYP_Authentication_DMAInCplt(), CRYP_Authentication_DMAOutCplt(), and HAL_DMA_Start_IT().

Referenced by HAL_CRYPEx_AES_Auth_DMA().

static void CRYP_DMAError ( DMA_HandleTypeDef hdma) [static]

DMA CRYP communication error callback.

Parameters:
hdma,:DMA handle.
Return values:
None

Definition at line 3004 of file stm32l4xx_hal_cryp_ex.c.

References HAL_CRYP_ErrorCallback().

Referenced by CRYP_SetDMAConfig().

static void CRYP_DMAInCplt ( DMA_HandleTypeDef hdma) [static]

DMA CRYP Input Data process complete callback.

Parameters:
hdma,:DMA handle.
Return values:
None

Definition at line 2955 of file stm32l4xx_hal_cryp_ex.c.

References HAL_CRYP_InCpltCallback().

Referenced by CRYP_SetDMAConfig().

static void CRYP_DMAOutCplt ( DMA_HandleTypeDef hdma) [static]

DMA CRYP Output Data process complete callback.

Parameters:
hdma,:DMA handle.
Return values:
None

Definition at line 2975 of file stm32l4xx_hal_cryp_ex.c.

References HAL_CRYP_OutCpltCallback().

Referenced by CRYP_SetDMAConfig().

static void CRYP_Padding ( CRYP_HandleTypeDef *  hcryp,
uint32_t  difflength,
uint32_t  polling 
) [static]

Last header or payload block padding when size is not a multiple of 128 bits.

Parameters:
hcryp,:pointer to a CRYP_HandleTypeDef structure that contains the configuration information for CRYP module.
difflength,:size remainder after having fed all complete 128-bit blocks.
polling,:specifies whether or not polling on CCF must be done after having entered a complete block.
Return values:
None

Definition at line 3028 of file stm32l4xx_hal_cryp_ex.c.

References CRYP_CCF_TIMEOUTVALUE, CRYP_POLLING_ON, CRYP_WaitOnCCFlag(), and HAL_CRYP_ErrorCallback().

Referenced by CRYP_Authentication_DMAInCplt(), CRYP_Authentication_DMAOutCplt(), HAL_CRYPEx_AES_Auth(), and HAL_CRYPEx_AES_Auth_DMA().

static HAL_StatusTypeDef CRYP_ProcessData ( CRYP_HandleTypeDef *  hcryp,
uint8_t *  Input,
uint16_t  Ilength,
uint8_t *  Output,
uint32_t  Timeout 
) [static]

Write/read input/output data in polling mode.

Parameters:
hcryp,:pointer to a CRYP_HandleTypeDef structure that contains the configuration information for CRYP module.
Input,:Pointer to the Input buffer.
Ilength,:Length of the Input buffer in bytes, must be a multiple of 16.
Output,:Pointer to the returned buffer.
Timeout,:Specify Timeout value.
Return values:
HALstatus

Definition at line 2739 of file stm32l4xx_hal_cryp_ex.c.

References CRYP_WaitOnCCFlag().

Referenced by HAL_CRYPEx_AES().

static HAL_StatusTypeDef CRYP_ReadKey ( CRYP_HandleTypeDef *  hcryp,
uint8_t *  Output,
uint32_t  Timeout 
) [static]

Read derivative key in polling mode when CRYP hardware block is set in key derivation operating mode (mode 2).

Parameters:
hcryp,:pointer to a CRYP_HandleTypeDef structure that contains the configuration information for CRYP module.
Output,:Pointer to the returned buffer.
Timeout,:Specify Timeout value.
Return values:
HALstatus

Definition at line 2818 of file stm32l4xx_hal_cryp_ex.c.

References CRYP_WaitOnCCFlag().

Referenced by HAL_CRYPEx_AES().

static void CRYP_SetDMAConfig ( CRYP_HandleTypeDef *  hcryp,
uint32_t  inputaddr,
uint16_t  Size,
uint32_t  outputaddr 
) [static]

Set the DMA configuration and start the DMA transfer.

Parameters:
hcryp,:pointer to a CRYP_HandleTypeDef structure that contains the configuration information for CRYP module.
inputaddr,:Address of the Input buffer.
Size,:Size of the Input buffer in bytes, must be a multiple of 16.
outputaddr,:Address of the Output buffer.
Return values:
None

Definition at line 2867 of file stm32l4xx_hal_cryp_ex.c.

References CRYP_DMAError(), CRYP_DMAInCplt(), CRYP_DMAOutCplt(), and HAL_DMA_Start_IT().

Referenced by HAL_CRYPEx_AES_DMA().

static HAL_StatusTypeDef CRYP_WaitOnBusyFlagReset ( CRYP_HandleTypeDef *  hcryp,
uint32_t  Timeout 
) [static]

Wait for Busy Flag to be reset during a GCM payload encryption process suspension.

Parameters:
hcryp,:pointer to a CRYP_HandleTypeDef structure that contains the configuration information for CRYP module.
Timeout,:Timeout duration.
Return values:
HALstatus

Definition at line 2928 of file stm32l4xx_hal_cryp_ex.c.

References HAL_GetTick().

Referenced by HAL_CRYPEx_AES_Auth(), and HAL_CRYPEx_Read_SuspendRegisters().

static HAL_StatusTypeDef CRYP_WaitOnCCFlag ( CRYP_HandleTypeDef *  hcryp,
uint32_t  Timeout 
) [static]

Handle CRYP hardware block Timeout when waiting for CCF flag to be raised.

Parameters:
hcryp,:pointer to a CRYP_HandleTypeDef structure that contains the configuration information for CRYP module.
Timeout,:Timeout duration.
Return values:
HALstatus

Definition at line 2900 of file stm32l4xx_hal_cryp_ex.c.

References HAL_GetTick().

Referenced by CRYP_Padding(), CRYP_ProcessData(), CRYP_ReadKey(), HAL_CRYPEx_AES_Auth(), and HAL_CRYPEx_AES_Auth_DMA().