STM32F439xx HAL User Manual
Functions
CRYP Private Functions
CRYP

Functions

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_SetKey (CRYP_HandleTypeDef *hcryp, uint8_t *Key, uint32_t KeySize)
 Writes the Key in Key registers.
static void CRYP_SetInitVector (CRYP_HandleTypeDef *hcryp, uint8_t *InitVector, uint32_t IVSize)
 Writes the InitVector/InitCounter in IV registers.
static HAL_StatusTypeDef CRYP_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 CRYP_ProcessData2Words (CRYP_HandleTypeDef *hcryp, uint8_t *Input, uint16_t Ilength, uint8_t *Output, uint32_t Timeout)
 Process Data: Write Input data in polling mode.
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_SetDESECBMode (CRYP_HandleTypeDef *hcryp, uint32_t Direction)
 Sets the CRYP peripheral in DES ECB mode.
static void CRYP_SetDESCBCMode (CRYP_HandleTypeDef *hcryp, uint32_t Direction)
 Sets the CRYP peripheral in DES CBC mode.
static void CRYP_SetTDESECBMode (CRYP_HandleTypeDef *hcryp, uint32_t Direction)
 Sets the CRYP peripheral in TDES ECB mode.
static void CRYP_SetTDESCBCMode (CRYP_HandleTypeDef *hcryp, uint32_t Direction)
 Sets the CRYP peripheral in TDES CBC mode.

Function Documentation

static void CRYP_DMAError ( DMA_HandleTypeDef hdma) [static]

DMA CRYP communication error callback.

Parameters:
hdmaDMA handle
Return values:
None

Definition at line 199 of file stm32f4xx_hal_cryp.c.

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

Referenced by CRYP_SetDMAConfig().

static void CRYP_DMAInCplt ( DMA_HandleTypeDef hdma) [static]

DMA CRYP Input Data process complete callback.

Parameters:
hdmaDMA handle
Return values:
None

Definition at line 159 of file stm32f4xx_hal_cryp.c.

References HAL_CRYP_InCpltCallback(), and CRYP_HandleTypeDef::Instance.

Referenced by CRYP_SetDMAConfig().

static void CRYP_DMAOutCplt ( DMA_HandleTypeDef hdma) [static]

DMA CRYP Output Data process complete callback.

Parameters:
hdmaDMA handle
Return values:
None

Definition at line 176 of file stm32f4xx_hal_cryp.c.

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

Referenced by CRYP_SetDMAConfig().

static HAL_StatusTypeDef CRYP_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 314 of file stm32f4xx_hal_cryp.c.

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

Referenced by HAL_CRYP_AESCBC_Decrypt(), HAL_CRYP_AESCBC_Encrypt(), HAL_CRYP_AESCTR_Decrypt(), HAL_CRYP_AESCTR_Encrypt(), HAL_CRYP_AESECB_Decrypt(), and HAL_CRYP_AESECB_Encrypt().

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

Process Data: Write Input data in polling mode.

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 8
OutputPointer to the returned buffer
TimeoutSpecify Timeout value
Return values:
None

Definition at line 378 of file stm32f4xx_hal_cryp.c.

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

Referenced by HAL_CRYP_DESCBC_Decrypt(), HAL_CRYP_DESCBC_Encrypt(), HAL_CRYP_DESECB_Decrypt(), HAL_CRYP_DESECB_Encrypt(), HAL_CRYP_TDESCBC_Decrypt(), HAL_CRYP_TDESCBC_Encrypt(), HAL_CRYP_TDESECB_Decrypt(), and HAL_CRYP_TDESECB_Encrypt().

static void CRYP_SetDESCBCMode ( CRYP_HandleTypeDef hcryp,
uint32_t  Direction 
) [static]
static void CRYP_SetDESECBMode ( CRYP_HandleTypeDef hcryp,
uint32_t  Direction 
) [static]

Sets the CRYP peripheral in DES ECB mode.

Parameters:
hcryppointer to a CRYP_HandleTypeDef structure that contains the configuration information for CRYP module
DirectionEncryption or decryption
Return values:
None

Definition at line 469 of file stm32f4xx_hal_cryp.c.

References __HAL_CRYP_FIFO_FLUSH, __HAL_CRYP_SET_MODE, HAL_CRYP_PHASE_PROCESS, HAL_CRYP_PHASE_READY, CRYP_HandleTypeDef::Init, CRYP_HandleTypeDef::Instance, CRYP_HandleTypeDef::Phase, and CRYP_InitTypeDef::pKey.

Referenced by HAL_CRYP_DESECB_Decrypt(), HAL_CRYP_DESECB_Decrypt_DMA(), HAL_CRYP_DESECB_Decrypt_IT(), HAL_CRYP_DESECB_Encrypt(), HAL_CRYP_DESECB_Encrypt_DMA(), and HAL_CRYP_DESECB_Encrypt_IT().

static void CRYP_SetDMAConfig ( CRYP_HandleTypeDef hcryp,
uint32_t  inputaddr,
uint16_t  Size,
uint32_t  outputaddr 
) [static]
static void CRYP_SetInitVector ( CRYP_HandleTypeDef hcryp,
uint8_t *  InitVector,
uint32_t  IVSize 
) [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
IVSizeSize of the InitVector/InitCounter
Return values:
None

Definition at line 273 of file stm32f4xx_hal_cryp.c.

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

Referenced by CRYP_SetDESCBCMode(), CRYP_SetTDESCBCMode(), HAL_CRYP_AESCBC_Decrypt(), HAL_CRYP_AESCBC_Decrypt_DMA(), HAL_CRYP_AESCBC_Decrypt_IT(), HAL_CRYP_AESCBC_Encrypt(), HAL_CRYP_AESCBC_Encrypt_DMA(), HAL_CRYP_AESCBC_Encrypt_IT(), HAL_CRYP_AESCTR_Decrypt(), HAL_CRYP_AESCTR_Decrypt_DMA(), HAL_CRYP_AESCTR_Decrypt_IT(), HAL_CRYP_AESCTR_Encrypt(), HAL_CRYP_AESCTR_Encrypt_DMA(), and HAL_CRYP_AESCTR_Encrypt_IT().

static void CRYP_SetKey ( CRYP_HandleTypeDef hcryp,
uint8_t *  Key,
uint32_t  KeySize 
) [static]
static void CRYP_SetTDESCBCMode ( CRYP_HandleTypeDef hcryp,
uint32_t  Direction 
) [static]
static void CRYP_SetTDESECBMode ( CRYP_HandleTypeDef hcryp,
uint32_t  Direction 
) [static]

Sets the CRYP peripheral in TDES ECB mode.

Parameters:
hcryppointer to a CRYP_HandleTypeDef structure that contains the configuration information for CRYP module
DirectionEncryption or decryption
Return values:
None

Definition at line 526 of file stm32f4xx_hal_cryp.c.

References __HAL_CRYP_FIFO_FLUSH, __HAL_CRYP_SET_MODE, CRYP_KEYSIZE_192B, CRYP_SetKey(), HAL_CRYP_PHASE_PROCESS, HAL_CRYP_PHASE_READY, CRYP_HandleTypeDef::Init, CRYP_HandleTypeDef::Phase, and CRYP_InitTypeDef::pKey.

Referenced by HAL_CRYP_TDESECB_Decrypt(), HAL_CRYP_TDESECB_Decrypt_DMA(), HAL_CRYP_TDESECB_Decrypt_IT(), HAL_CRYP_TDESECB_Encrypt(), HAL_CRYP_TDESECB_Encrypt_DMA(), and HAL_CRYP_TDESECB_Encrypt_IT().