STM32L486xx HAL User Manual
Functions
AES suspension/resumption functions
CRYPEx Exported Functions

Extended processing functions. More...

Functions

void HAL_CRYPEx_Read_IVRegisters (CRYP_HandleTypeDef *hcryp, uint8_t *Output)
 In case of message processing suspension, read the Initialization Vector.
void HAL_CRYPEx_Write_IVRegisters (CRYP_HandleTypeDef *hcryp, uint8_t *Input)
 In case of message processing resumption, rewrite the Initialization Vector in the AES_IVRx registers.
void HAL_CRYPEx_Read_SuspendRegisters (CRYP_HandleTypeDef *hcryp, uint8_t *Output)
 In case of message GCM/GMAC (CCM/CMAC when applicable) processing suspension, read the Suspend Registers.
void HAL_CRYPEx_Write_SuspendRegisters (CRYP_HandleTypeDef *hcryp, uint8_t *Input)
 In case of message GCM/GMAC (CCM/CMAC when applicable) processing resumption, rewrite the Suspend Registers in the AES_SUSPxR registers.
void HAL_CRYPEx_Read_KeyRegisters (CRYP_HandleTypeDef *hcryp, uint8_t *Output, uint32_t KeySize)
 In case of message GCM/GMAC (CCM/CMAC when applicable) processing suspension, read the Key Registers.
void HAL_CRYPEx_Write_KeyRegisters (CRYP_HandleTypeDef *hcryp, uint8_t *Input, uint32_t KeySize)
 In case of message GCM/GMAC (CCM/CMAC when applicable) processing resumption, rewrite the Key Registers in the AES_KEYRx registers.
void HAL_CRYPEx_Read_ControlRegister (CRYP_HandleTypeDef *hcryp, uint8_t *Output)
 In case of message GCM/GMAC (CCM/CMAC when applicable) processing suspension, read the Control Register.
void HAL_CRYPEx_Write_ControlRegister (CRYP_HandleTypeDef *hcryp, uint8_t *Input)
 In case of message GCM/GMAC (CCM/CMAC when applicable) processing resumption, rewrite the Control Registers in the AES_CR register.
void HAL_CRYPEx_ProcessSuspend (CRYP_HandleTypeDef *hcryp)
 Request CRYP processing suspension when in polling or interruption mode.

Detailed Description

Extended processing functions.

  ==============================================================================
                    ##### AES extended suspension and resumption functions #####
  ==============================================================================
    [..]  This section provides functions allowing to:
      (+) save in memory the Initialization Vector, the Key registers, the Control register or
          the Suspend registers when a process is suspended by a higher priority message
      (+) write back in CRYP hardware block the saved values listed above when the suspended
          lower priority message processing is resumed.


Function Documentation

void HAL_CRYPEx_ProcessSuspend ( CRYP_HandleTypeDef *  hcryp)

Request CRYP processing suspension when in polling or interruption mode.

Parameters:
hcryp,:pointer to a CRYP_HandleTypeDef structure that contains the configuration information for CRYP module.
Note:
Set the handle field SuspendRequest to the appropriate value so that the on-going CRYP processing is suspended as soon as the required conditions are met.
It is advised not to suspend the CRYP processing when the DMA controller is managing the data transfer
Return values:
None

Definition at line 2073 of file stm32l4xx_hal_cryp_ex.c.

void HAL_CRYPEx_Read_ControlRegister ( CRYP_HandleTypeDef *  hcryp,
uint8_t *  Output 
)

In case of message GCM/GMAC (CCM/CMAC when applicable) processing suspension, read the Control Register.

Parameters:
hcryp,:pointer to a CRYP_HandleTypeDef structure that contains the configuration information for CRYP module.
Output,:Pointer to the buffer containing the saved Control Register.
Note:
This values has to be stored for reuse by writing back the AES_CR register as soon as the interrupted processing has to be resumed.
Return values:
None

Definition at line 2040 of file stm32l4xx_hal_cryp_ex.c.

void HAL_CRYPEx_Read_IVRegisters ( CRYP_HandleTypeDef *  hcryp,
uint8_t *  Output 
)

In case of message processing suspension, read the Initialization Vector.

Parameters:
hcryp,:pointer to a CRYP_HandleTypeDef structure that contains the configuration information for CRYP module.
Output,:Pointer to the buffer containing the saved Initialization Vector.
Note:
This value has to be stored for reuse by writing the AES_IVRx registers as soon as the interrupted processing has to be resumed. Applicable to all chaining modes.
AES must be disabled when reading or resetting the IV values.
Return values:
None

Definition at line 1839 of file stm32l4xx_hal_cryp_ex.c.

void HAL_CRYPEx_Read_KeyRegisters ( CRYP_HandleTypeDef *  hcryp,
uint8_t *  Output,
uint32_t  KeySize 
)

In case of message GCM/GMAC (CCM/CMAC when applicable) processing suspension, read the Key Registers.

Parameters:
hcryp,:pointer to a CRYP_HandleTypeDef structure that contains the configuration information for CRYP module.
Output,:Pointer to the buffer containing the saved Key Registers.
KeySize,:Indicates the key size (128 or 256 bits).
Note:
These values have to be stored for reuse by writing back the AES_KEYRx registers as soon as the interrupted processing has to be resumed.
Return values:
None

Definition at line 1970 of file stm32l4xx_hal_cryp_ex.c.

void HAL_CRYPEx_Read_SuspendRegisters ( CRYP_HandleTypeDef *  hcryp,
uint8_t *  Output 
)

In case of message GCM/GMAC (CCM/CMAC when applicable) processing suspension, read the Suspend Registers.

Parameters:
hcryp,:pointer to a CRYP_HandleTypeDef structure that contains the configuration information for CRYP module.
Output,:Pointer to the buffer containing the saved Suspend Registers.
Note:
These values have to be stored for reuse by writing back the AES_SUSPxR registers as soon as the interrupted processing has to be resumed.
Return values:
None

Definition at line 1887 of file stm32l4xx_hal_cryp_ex.c.

References CRYP_BUSY_TIMEOUTVALUE, CRYP_WaitOnBusyFlagReset(), and HAL_CRYP_ErrorCallback().

void HAL_CRYPEx_Write_ControlRegister ( CRYP_HandleTypeDef *  hcryp,
uint8_t *  Input 
)

In case of message GCM/GMAC (CCM/CMAC when applicable) processing resumption, rewrite the Control Registers in the AES_CR register.

Parameters:
hcryp,:pointer to a CRYP_HandleTypeDef structure that contains the configuration information for CRYP module.
Input,:Pointer to the buffer containing the saved Control Register to write back in the CRYP hardware block.
Return values:
None

Definition at line 2054 of file stm32l4xx_hal_cryp_ex.c.

void HAL_CRYPEx_Write_IVRegisters ( CRYP_HandleTypeDef *  hcryp,
uint8_t *  Input 
)

In case of message processing resumption, rewrite the Initialization Vector in the AES_IVRx registers.

Parameters:
hcryp,:pointer to a CRYP_HandleTypeDef structure that contains the configuration information for CRYP module.
Input,:Pointer to the buffer containing the saved Initialization Vector to write back in the CRYP hardware block.
Note:
Applicable to all chaining modes.
AES must be disabled when reading or resetting the IV values.
Return values:
None

Definition at line 1863 of file stm32l4xx_hal_cryp_ex.c.

void HAL_CRYPEx_Write_KeyRegisters ( CRYP_HandleTypeDef *  hcryp,
uint8_t *  Input,
uint32_t  KeySize 
)

In case of message GCM/GMAC (CCM/CMAC when applicable) processing resumption, rewrite the Key Registers in the AES_KEYRx registers.

Parameters:
hcryp,:pointer to a CRYP_HandleTypeDef structure that contains the configuration information for CRYP module.
Input,:Pointer to the buffer containing the saved key registers to write back in the CRYP hardware block.
KeySize,:Indicates the key size (128 or 256 bits)
Return values:
None

Definition at line 2005 of file stm32l4xx_hal_cryp_ex.c.

void HAL_CRYPEx_Write_SuspendRegisters ( CRYP_HandleTypeDef *  hcryp,
uint8_t *  Input 
)

In case of message GCM/GMAC (CCM/CMAC when applicable) processing resumption, rewrite the Suspend Registers in the AES_SUSPxR registers.

Parameters:
hcryp,:pointer to a CRYP_HandleTypeDef structure that contains the configuration information for CRYP module.
Input,:Pointer to the buffer containing the saved suspend registers to write back in the CRYP hardware block.
Return values:
None

Definition at line 1938 of file stm32l4xx_hal_cryp_ex.c.