STM32L443xx 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

Request CRYP processing suspension when in polling or interruption mode.

Parameters:
hcryppointer 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 2096 of file stm32l4xx_hal_cryp_ex.c.

References HAL_CRYP_SUSPEND, and __CRYP_HandleTypeDef::SuspendRequest.

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:
hcryppointer to a CRYP_HandleTypeDef structure that contains the configuration information for CRYP module.
OutputPointer 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 2063 of file stm32l4xx_hal_cryp_ex.c.

References __CRYP_HandleTypeDef::Instance.

void HAL_CRYPEx_Read_IVRegisters ( CRYP_HandleTypeDef hcryp,
uint8_t *  Output 
)

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

Parameters:
hcryppointer to a CRYP_HandleTypeDef structure that contains the configuration information for CRYP module.
OutputPointer 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 1862 of file stm32l4xx_hal_cryp_ex.c.

References __CRYP_HandleTypeDef::Instance.

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:
hcryppointer to a CRYP_HandleTypeDef structure that contains the configuration information for CRYP module.
OutputPointer to the buffer containing the saved Key Registers.
KeySizeIndicates 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 1993 of file stm32l4xx_hal_cryp_ex.c.

References CRYP_KEYSIZE_256B, and __CRYP_HandleTypeDef::Instance.

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:
hcryppointer to a CRYP_HandleTypeDef structure that contains the configuration information for CRYP module.
OutputPointer 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 1910 of file stm32l4xx_hal_cryp_ex.c.

References CRYP_ALGOMODE_ENCRYPT, CRYP_BUSY_TIMEOUTVALUE, CRYP_CHAINMODE_AES_GCM_GMAC, CRYP_PAYLOAD_PHASE, CRYP_WaitOnBusyFlagReset(), __CRYP_HandleTypeDef::ErrorCallback, __CRYP_HandleTypeDef::ErrorCode, HAL_CRYP_BUSY_ERROR, HAL_CRYP_ErrorCallback(), HAL_CRYP_STATE_ERROR, __CRYP_HandleTypeDef::Instance, and __CRYP_HandleTypeDef::State.

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:
hcryppointer to a CRYP_HandleTypeDef structure that contains the configuration information for CRYP module.
InputPointer to the buffer containing the saved Control Register to write back in the CRYP hardware block.
Return values:
None

Definition at line 2077 of file stm32l4xx_hal_cryp_ex.c.

References HAL_CRYP_STATE_READY, __CRYP_HandleTypeDef::Instance, and __CRYP_HandleTypeDef::State.

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:
hcryppointer to a CRYP_HandleTypeDef structure that contains the configuration information for CRYP module.
InputPointer 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 1886 of file stm32l4xx_hal_cryp_ex.c.

References __CRYP_HandleTypeDef::Instance.

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:
hcryppointer to a CRYP_HandleTypeDef structure that contains the configuration information for CRYP module.
InputPointer to the buffer containing the saved key registers to write back in the CRYP hardware block.
KeySizeIndicates the key size (128 or 256 bits)
Return values:
None

Definition at line 2028 of file stm32l4xx_hal_cryp_ex.c.

References CRYP_KEYSIZE_256B, and __CRYP_HandleTypeDef::Instance.

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:
hcryppointer to a CRYP_HandleTypeDef structure that contains the configuration information for CRYP module.
InputPointer to the buffer containing the saved suspend registers to write back in the CRYP hardware block.
Return values:
None

Definition at line 1961 of file stm32l4xx_hal_cryp_ex.c.

References __CRYP_HandleTypeDef::Instance.