STM32F439xx HAL User Manual
Functions
CRYP Private Functions Prototypes
CRYPEx

Functions

static void CRYPEx_GCMCCM_SetInitVector (CRYP_HandleTypeDef *hcryp, uint8_t *InitVector)
 Writes the InitVector/InitCounter in IV registers.
static void CRYPEx_GCMCCM_SetKey (CRYP_HandleTypeDef *hcryp, uint8_t *Key, uint32_t KeySize)
 Writes the Key in Key registers.
static HAL_StatusTypeDef CRYPEx_GCMCCM_ProcessData (CRYP_HandleTypeDef *hcryp, uint8_t *Input, uint16_t Ilength, uint8_t *Output, uint32_t Timeout)
 Process Data: Writes Input data in polling mode and read the Output data.
static HAL_StatusTypeDef CRYPEx_GCMCCM_SetHeaderPhase (CRYP_HandleTypeDef *hcryp, uint8_t *Input, uint16_t Ilength, uint32_t Timeout)
 Sets the header phase.
static void CRYPEx_GCMCCM_DMAInCplt (DMA_HandleTypeDef *hdma)
 DMA CRYP Input Data process complete callback.
static void CRYPEx_GCMCCM_DMAOutCplt (DMA_HandleTypeDef *hdma)
 DMA CRYP Output Data process complete callback.
static void CRYPEx_GCMCCM_DMAError (DMA_HandleTypeDef *hdma)
 DMA CRYP communication error callback.
static void CRYPEx_GCMCCM_SetDMAConfig (CRYP_HandleTypeDef *hcryp, uint32_t inputaddr, uint16_t Size, uint32_t outputaddr)
 Sets the DMA configuration and start the DMA transfer.

Function Documentation

static void CRYPEx_GCMCCM_DMAError ( DMA_HandleTypeDef hdma) [static]

DMA CRYP communication error callback.

Parameters:
hdmaDMA handle
Return values:
None

Definition at line 191 of file stm32f4xx_hal_cryp_ex.c.

References HAL_CRYP_ErrorCallback(), HAL_CRYP_STATE_READY, and CRYP_HandleTypeDef::State.

Referenced by CRYPEx_GCMCCM_SetDMAConfig().

static void CRYPEx_GCMCCM_DMAInCplt ( DMA_HandleTypeDef hdma) [static]

DMA CRYP Input Data process complete callback.

Parameters:
hdmaDMA handle
Return values:
None

Definition at line 151 of file stm32f4xx_hal_cryp_ex.c.

References HAL_CRYP_InCpltCallback(), and CRYP_HandleTypeDef::Instance.

Referenced by CRYPEx_GCMCCM_SetDMAConfig().

static void CRYPEx_GCMCCM_DMAOutCplt ( DMA_HandleTypeDef hdma) [static]

DMA CRYP Output Data process complete callback.

Parameters:
hdmaDMA handle
Return values:
None

Definition at line 168 of file stm32f4xx_hal_cryp_ex.c.

References __HAL_CRYP_DISABLE, HAL_CRYP_OutCpltCallback(), HAL_CRYP_STATE_READY, CRYP_HandleTypeDef::Instance, and CRYP_HandleTypeDef::State.

Referenced by CRYPEx_GCMCCM_SetDMAConfig().

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

Process Data: Writes Input data in polling mode and read the Output data.

Parameters:
hcryppointer to a CRYP_HandleTypeDef structure that contains the configuration information for CRYP module
InputPointer to the Input buffer.
IlengthLength of the Input buffer, must be a multiple of 16
OutputPointer to the returned buffer
TimeoutTimeout value
Return values:
None

Definition at line 287 of file stm32f4xx_hal_cryp_ex.c.

References CRYP_FLAG_OFNE, CRYPEx_TIMEOUT_VALUE, HAL_CRYP_STATE_TIMEOUT, HAL_GetTick(), CRYP_HandleTypeDef::Instance, and CRYP_HandleTypeDef::State.

Referenced by HAL_CRYPEx_AESGCM_Decrypt(), and HAL_CRYPEx_AESGCM_Encrypt().

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

Sets the DMA configuration and start the DMA transfer.

Parameters:
hcryppointer to a CRYP_HandleTypeDef structure that contains the configuration information for CRYP module
inputaddrAddress of the Input buffer
SizeSize of the Input buffer, must be a multiple of 16
outputaddrAddress of the Output buffer
Return values:
None

Definition at line 435 of file stm32f4xx_hal_cryp_ex.c.

References __HAL_CRYP_ENABLE, CRYPEx_GCMCCM_DMAError(), CRYPEx_GCMCCM_DMAInCplt(), CRYPEx_GCMCCM_DMAOutCplt(), HAL_DMA_Start_IT(), CRYP_HandleTypeDef::hdmain, CRYP_HandleTypeDef::hdmaout, CRYP_HandleTypeDef::Instance, __DMA_HandleTypeDef::XferCpltCallback, and __DMA_HandleTypeDef::XferErrorCallback.

Referenced by HAL_CRYPEx_AESCCM_Decrypt_DMA(), HAL_CRYPEx_AESCCM_Encrypt_DMA(), HAL_CRYPEx_AESGCM_Decrypt_DMA(), and HAL_CRYPEx_AESGCM_Encrypt_DMA().

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

Sets the header phase.

Parameters:
hcryppointer to a CRYP_HandleTypeDef structure that contains the configuration information for CRYP module
InputPointer to the Input buffer.
IlengthLength of the Input buffer, must be a multiple of 16
TimeoutTimeout value
Return values:
None

Definition at line 349 of file stm32f4xx_hal_cryp_ex.c.

References __HAL_CRYP_ENABLE, __HAL_CRYP_SET_PHASE, CRYP_FLAG_BUSY, CRYP_FLAG_IFEM, CRYP_PHASE_HEADER, HAL_CRYP_STATE_TIMEOUT, HAL_GetTick(), CRYP_InitTypeDef::HeaderSize, CRYP_HandleTypeDef::Init, CRYP_HandleTypeDef::Instance, and CRYP_HandleTypeDef::State.

Referenced by HAL_CRYPEx_AESGCM_Decrypt(), HAL_CRYPEx_AESGCM_Decrypt_DMA(), HAL_CRYPEx_AESGCM_Decrypt_IT(), HAL_CRYPEx_AESGCM_Encrypt(), HAL_CRYPEx_AESGCM_Encrypt_DMA(), and HAL_CRYPEx_AESGCM_Encrypt_IT().

static void CRYPEx_GCMCCM_SetInitVector ( CRYP_HandleTypeDef hcryp,
uint8_t *  InitVector 
) [static]

Writes the InitVector/InitCounter in IV registers.

Parameters:
hcryppointer to a CRYP_HandleTypeDef structure that contains the configuration information for CRYP module
InitVectorPointer to InitVector/InitCounter buffer
Return values:
None

Definition at line 264 of file stm32f4xx_hal_cryp_ex.c.

References CRYP_HandleTypeDef::Instance.

Referenced by HAL_CRYPEx_AESCCM_Decrypt_DMA(), HAL_CRYPEx_AESCCM_Encrypt_DMA(), HAL_CRYPEx_AESGCM_Decrypt(), HAL_CRYPEx_AESGCM_Decrypt_DMA(), HAL_CRYPEx_AESGCM_Decrypt_IT(), HAL_CRYPEx_AESGCM_Encrypt(), HAL_CRYPEx_AESGCM_Encrypt_DMA(), and HAL_CRYPEx_AESGCM_Encrypt_IT().

static void CRYPEx_GCMCCM_SetKey ( CRYP_HandleTypeDef hcryp,
uint8_t *  Key,
uint32_t  KeySize 
) [static]

Writes the Key in Key registers.

Parameters:
hcryppointer to a CRYP_HandleTypeDef structure that contains the configuration information for CRYP module
KeyPointer to Key buffer
KeySizeSize of Key
Return values:
None

Definition at line 206 of file stm32f4xx_hal_cryp_ex.c.

References CRYP_KEYSIZE_128B, CRYP_KEYSIZE_192B, CRYP_KEYSIZE_256B, and CRYP_HandleTypeDef::Instance.

Referenced by HAL_CRYPEx_AESCCM_Decrypt_DMA(), HAL_CRYPEx_AESCCM_Encrypt_DMA(), HAL_CRYPEx_AESGCM_Decrypt(), HAL_CRYPEx_AESGCM_Decrypt_DMA(), HAL_CRYPEx_AESGCM_Decrypt_IT(), HAL_CRYPEx_AESGCM_Encrypt(), HAL_CRYPEx_AESGCM_Encrypt_DMA(), and HAL_CRYPEx_AESGCM_Encrypt_IT().