TUKS MCU Introductory course / TUKS-COURSE-THERMOMETER

Fork of TUKS-COURSE-TIMER by TUKS MCU Introductory course

Embed: (wiki syntax)

« Back to documentation index

AES suspension/resumption 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 or CMAC processing suspension, read the Suspend Registers.
void HAL_CRYPEx_Write_SuspendRegisters (CRYP_HandleTypeDef *hcryp, uint8_t *Input)
 In case of message GCM/GMAC or CMAC 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 or CMAC 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 or CMAC 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 or CMAC processing suspension, read the Control Register.
void HAL_CRYPEx_Write_ControlRegister (CRYP_HandleTypeDef *hcryp, uint8_t *Input)
 In case of message GCM/GMAC or CMAC 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 1918 of file stm32l4xx_hal_cryp_ex.c.

void HAL_CRYPEx_Read_ControlRegister ( CRYP_HandleTypeDef *  hcryp,
uint8_t *  Output 
)

In case of message GCM/GMAC or CMAC 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 1885 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 1689 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 or CMAC 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 1815 of file stm32l4xx_hal_cryp_ex.c.

void HAL_CRYPEx_Read_SuspendRegisters ( CRYP_HandleTypeDef *  hcryp,
uint8_t *  Output 
)

In case of message GCM/GMAC or CMAC 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 1736 of file stm32l4xx_hal_cryp_ex.c.

void HAL_CRYPEx_Write_ControlRegister ( CRYP_HandleTypeDef *  hcryp,
uint8_t *  Input 
)

In case of message GCM/GMAC or CMAC 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 1899 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 1713 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 or CMAC 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 1850 of file stm32l4xx_hal_cryp_ex.c.

void HAL_CRYPEx_Write_SuspendRegisters ( CRYP_HandleTypeDef *  hcryp,
uint8_t *  Input 
)

In case of message GCM/GMAC or CMAC 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 1783 of file stm32l4xx_hal_cryp_ex.c.