STM32F439xx HAL User Manual
Functions
AES processing functions
CRYP Exported Functions

processing functions. More...

Functions

HAL_StatusTypeDef HAL_CRYP_AESECB_Encrypt (CRYP_HandleTypeDef *hcryp, uint8_t *pPlainData, uint16_t Size, uint8_t *pCypherData, uint32_t Timeout)
 Initializes the CRYP peripheral in AES ECB encryption mode then encrypt pPlainData.
HAL_StatusTypeDef HAL_CRYP_AESCBC_Encrypt (CRYP_HandleTypeDef *hcryp, uint8_t *pPlainData, uint16_t Size, uint8_t *pCypherData, uint32_t Timeout)
 Initializes the CRYP peripheral in AES CBC encryption mode then encrypt pPlainData.
HAL_StatusTypeDef HAL_CRYP_AESCTR_Encrypt (CRYP_HandleTypeDef *hcryp, uint8_t *pPlainData, uint16_t Size, uint8_t *pCypherData, uint32_t Timeout)
 Initializes the CRYP peripheral in AES CTR encryption mode then encrypt pPlainData.
HAL_StatusTypeDef HAL_CRYP_AESECB_Decrypt (CRYP_HandleTypeDef *hcryp, uint8_t *pCypherData, uint16_t Size, uint8_t *pPlainData, uint32_t Timeout)
 Initializes the CRYP peripheral in AES ECB decryption mode then decrypted pCypherData.
HAL_StatusTypeDef HAL_CRYP_AESCBC_Decrypt (CRYP_HandleTypeDef *hcryp, uint8_t *pCypherData, uint16_t Size, uint8_t *pPlainData, uint32_t Timeout)
 Initializes the CRYP peripheral in AES ECB decryption mode then decrypted pCypherData.
HAL_StatusTypeDef HAL_CRYP_AESCTR_Decrypt (CRYP_HandleTypeDef *hcryp, uint8_t *pCypherData, uint16_t Size, uint8_t *pPlainData, uint32_t Timeout)
 Initializes the CRYP peripheral in AES CTR decryption mode then decrypted pCypherData.
HAL_StatusTypeDef HAL_CRYP_AESECB_Encrypt_IT (CRYP_HandleTypeDef *hcryp, uint8_t *pPlainData, uint16_t Size, uint8_t *pCypherData)
 Initializes the CRYP peripheral in AES ECB encryption mode using Interrupt.
HAL_StatusTypeDef HAL_CRYP_AESCBC_Encrypt_IT (CRYP_HandleTypeDef *hcryp, uint8_t *pPlainData, uint16_t Size, uint8_t *pCypherData)
 Initializes the CRYP peripheral in AES CBC encryption mode using Interrupt.
HAL_StatusTypeDef HAL_CRYP_AESCTR_Encrypt_IT (CRYP_HandleTypeDef *hcryp, uint8_t *pPlainData, uint16_t Size, uint8_t *pCypherData)
 Initializes the CRYP peripheral in AES CTR encryption mode using Interrupt.
HAL_StatusTypeDef HAL_CRYP_AESECB_Decrypt_IT (CRYP_HandleTypeDef *hcryp, uint8_t *pCypherData, uint16_t Size, uint8_t *pPlainData)
 Initializes the CRYP peripheral in AES ECB decryption mode using Interrupt.
HAL_StatusTypeDef HAL_CRYP_AESCBC_Decrypt_IT (CRYP_HandleTypeDef *hcryp, uint8_t *pCypherData, uint16_t Size, uint8_t *pPlainData)
 Initializes the CRYP peripheral in AES CBC decryption mode using IT.
HAL_StatusTypeDef HAL_CRYP_AESCTR_Decrypt_IT (CRYP_HandleTypeDef *hcryp, uint8_t *pCypherData, uint16_t Size, uint8_t *pPlainData)
 Initializes the CRYP peripheral in AES CTR decryption mode using Interrupt.
HAL_StatusTypeDef HAL_CRYP_AESECB_Encrypt_DMA (CRYP_HandleTypeDef *hcryp, uint8_t *pPlainData, uint16_t Size, uint8_t *pCypherData)
 Initializes the CRYP peripheral in AES ECB encryption mode using DMA.
HAL_StatusTypeDef HAL_CRYP_AESCBC_Encrypt_DMA (CRYP_HandleTypeDef *hcryp, uint8_t *pPlainData, uint16_t Size, uint8_t *pCypherData)
 Initializes the CRYP peripheral in AES CBC encryption mode using DMA.
HAL_StatusTypeDef HAL_CRYP_AESCTR_Encrypt_DMA (CRYP_HandleTypeDef *hcryp, uint8_t *pPlainData, uint16_t Size, uint8_t *pCypherData)
 Initializes the CRYP peripheral in AES CTR encryption mode using DMA.
HAL_StatusTypeDef HAL_CRYP_AESECB_Decrypt_DMA (CRYP_HandleTypeDef *hcryp, uint8_t *pCypherData, uint16_t Size, uint8_t *pPlainData)
 Initializes the CRYP peripheral in AES ECB decryption mode using DMA.
HAL_StatusTypeDef HAL_CRYP_AESCBC_Decrypt_DMA (CRYP_HandleTypeDef *hcryp, uint8_t *pCypherData, uint16_t Size, uint8_t *pPlainData)
 Initializes the CRYP peripheral in AES CBC encryption mode using DMA.
HAL_StatusTypeDef HAL_CRYP_AESCTR_Decrypt_DMA (CRYP_HandleTypeDef *hcryp, uint8_t *pCypherData, uint16_t Size, uint8_t *pPlainData)
 Initializes the CRYP peripheral in AES CTR decryption mode using DMA.

Detailed Description

processing functions.

  ==============================================================================
                      ##### AES processing functions #####
  ==============================================================================  
    [..]  This section provides functions allowing to:
      (+) Encrypt plaintext using AES-128/192/256 using chaining modes
      (+) Decrypt cyphertext using AES-128/192/256 using chaining modes
    [..]  Three processing functions are available:
      (+) Polling mode
      (+) Interrupt mode
      (+) DMA mode


Function Documentation

HAL_StatusTypeDef HAL_CRYP_AESCBC_Decrypt ( CRYP_HandleTypeDef hcryp,
uint8_t *  pCypherData,
uint16_t  Size,
uint8_t *  pPlainData,
uint32_t  Timeout 
)

Initializes the CRYP peripheral in AES ECB decryption mode then decrypted pCypherData.

The cypher data are available in pPlainData

Parameters:
hcryppointer to a CRYP_HandleTypeDef structure that contains the configuration information for CRYP module
pCypherDataPointer to the cyphertext buffer
SizeLength of the plaintext buffer, must be a multiple of 16.
pPlainDataPointer to the plaintext buffer
TimeoutSpecify Timeout value
Return values:
HALstatus

Definition at line 1010 of file stm32f4xx_hal_cryp.c.

References __HAL_CRYP_ENABLE, __HAL_CRYP_FIFO_FLUSH, __HAL_CRYP_SET_MODE, CRYP_FLAG_BUSY, CRYP_KEYSIZE_128B, CRYP_ProcessData(), CRYP_SetInitVector(), CRYP_SetKey(), HAL_CRYP_PHASE_PROCESS, HAL_CRYP_PHASE_READY, HAL_CRYP_STATE_BUSY, HAL_CRYP_STATE_READY, HAL_CRYP_STATE_TIMEOUT, HAL_GetTick(), CRYP_HandleTypeDef::Init, CRYP_HandleTypeDef::Instance, CRYP_InitTypeDef::KeySize, CRYP_HandleTypeDef::Phase, CRYP_InitTypeDef::pInitVect, CRYP_InitTypeDef::pKey, and CRYP_HandleTypeDef::State.

HAL_StatusTypeDef HAL_CRYP_AESCBC_Decrypt_DMA ( CRYP_HandleTypeDef hcryp,
uint8_t *  pCypherData,
uint16_t  Size,
uint8_t *  pPlainData 
)

Initializes the CRYP peripheral in AES CBC encryption mode using DMA.

Parameters:
hcryppointer to a CRYP_HandleTypeDef structure that contains the configuration information for CRYP module
pCypherDataPointer to the cyphertext buffer
SizeLength of the plaintext buffer, must be a multiple of 16 bytes
pPlainDataPointer to the plaintext buffer
Return values:
HALstatus

Definition at line 2089 of file stm32f4xx_hal_cryp.c.

References __HAL_CRYP_ENABLE, __HAL_CRYP_FIFO_FLUSH, __HAL_CRYP_SET_MODE, CRYP_FLAG_BUSY, CRYP_KEYSIZE_128B, CRYP_SetDMAConfig(), CRYP_SetInitVector(), CRYP_SetKey(), CRYP_TIMEOUT_VALUE, HAL_CRYP_PHASE_PROCESS, HAL_CRYP_PHASE_READY, HAL_CRYP_STATE_BUSY, HAL_CRYP_STATE_READY, HAL_CRYP_STATE_TIMEOUT, HAL_GetTick(), CRYP_HandleTypeDef::Init, CRYP_HandleTypeDef::Instance, CRYP_InitTypeDef::KeySize, CRYP_HandleTypeDef::Phase, CRYP_InitTypeDef::pInitVect, CRYP_InitTypeDef::pKey, and CRYP_HandleTypeDef::State.

HAL_StatusTypeDef HAL_CRYP_AESCBC_Decrypt_IT ( CRYP_HandleTypeDef hcryp,
uint8_t *  pCypherData,
uint16_t  Size,
uint8_t *  pPlainData 
)
HAL_StatusTypeDef HAL_CRYP_AESCBC_Encrypt ( CRYP_HandleTypeDef hcryp,
uint8_t *  pPlainData,
uint16_t  Size,
uint8_t *  pCypherData,
uint32_t  Timeout 
)

Initializes the CRYP peripheral in AES CBC encryption mode then encrypt pPlainData.

The cypher data are available in pCypherData

Parameters:
hcryppointer to a CRYP_HandleTypeDef structure that contains the configuration information for CRYP module
pPlainDataPointer to the plaintext buffer
SizeLength of the plaintext buffer, must be a multiple of 16.
pCypherDataPointer to the cyphertext buffer
TimeoutSpecify Timeout value
Return values:
HALstatus

Definition at line 806 of file stm32f4xx_hal_cryp.c.

References __HAL_CRYP_ENABLE, __HAL_CRYP_FIFO_FLUSH, __HAL_CRYP_SET_MODE, CRYP_KEYSIZE_128B, CRYP_ProcessData(), CRYP_SetInitVector(), CRYP_SetKey(), HAL_CRYP_PHASE_PROCESS, HAL_CRYP_PHASE_READY, HAL_CRYP_STATE_BUSY, HAL_CRYP_STATE_READY, CRYP_HandleTypeDef::Init, CRYP_InitTypeDef::KeySize, CRYP_HandleTypeDef::Phase, CRYP_InitTypeDef::pInitVect, CRYP_InitTypeDef::pKey, and CRYP_HandleTypeDef::State.

HAL_StatusTypeDef HAL_CRYP_AESCBC_Encrypt_DMA ( CRYP_HandleTypeDef hcryp,
uint8_t *  pPlainData,
uint16_t  Size,
uint8_t *  pCypherData 
)

Initializes the CRYP peripheral in AES CBC encryption mode using DMA.

Parameters:
hcryppointer to a CRYP_HandleTypeDef structure that contains the configuration information for CRYP module
pPlainDataPointer to the plaintext buffer
SizeLength of the plaintext buffer, must be a multiple of 16.
pCypherDataPointer to the cyphertext buffer
Return values:
HALstatus

Definition at line 1888 of file stm32f4xx_hal_cryp.c.

References __HAL_CRYP_FIFO_FLUSH, __HAL_CRYP_SET_MODE, CRYP_KEYSIZE_128B, CRYP_SetDMAConfig(), CRYP_SetInitVector(), CRYP_SetKey(), HAL_CRYP_PHASE_PROCESS, HAL_CRYP_PHASE_READY, HAL_CRYP_STATE_BUSY, HAL_CRYP_STATE_READY, CRYP_HandleTypeDef::Init, CRYP_InitTypeDef::KeySize, CRYP_HandleTypeDef::Phase, CRYP_InitTypeDef::pInitVect, CRYP_InitTypeDef::pKey, and CRYP_HandleTypeDef::State.

HAL_StatusTypeDef HAL_CRYP_AESCBC_Encrypt_IT ( CRYP_HandleTypeDef hcryp,
uint8_t *  pPlainData,
uint16_t  Size,
uint8_t *  pCypherData 
)

Initializes the CRYP peripheral in AES CBC encryption mode using Interrupt.

Parameters:
hcryppointer to a CRYP_HandleTypeDef structure that contains the configuration information for CRYP module
pPlainDataPointer to the plaintext buffer
SizeLength of the plaintext buffer, must be a multiple of 16 bytes
pCypherDataPointer to the cyphertext buffer
Return values:
HALstatus

Definition at line 1255 of file stm32f4xx_hal_cryp.c.

References __HAL_CRYP_DISABLE_IT, __HAL_CRYP_ENABLE, __HAL_CRYP_ENABLE_IT, __HAL_CRYP_FIFO_FLUSH, __HAL_CRYP_GET_IT, __HAL_CRYP_SET_MODE, CRYP_IT_INI, CRYP_IT_OUTI, CRYP_KEYSIZE_128B, CRYP_SetInitVector(), CRYP_SetKey(), CRYP_HandleTypeDef::CrypInCount, CRYP_HandleTypeDef::CrypOutCount, HAL_CRYP_InCpltCallback(), HAL_CRYP_OutCpltCallback(), HAL_CRYP_PHASE_PROCESS, HAL_CRYP_PHASE_READY, HAL_CRYP_STATE_BUSY, HAL_CRYP_STATE_READY, CRYP_HandleTypeDef::Init, CRYP_HandleTypeDef::Instance, CRYP_InitTypeDef::KeySize, CRYP_HandleTypeDef::pCrypInBuffPtr, CRYP_HandleTypeDef::pCrypOutBuffPtr, CRYP_HandleTypeDef::Phase, CRYP_InitTypeDef::pInitVect, CRYP_InitTypeDef::pKey, and CRYP_HandleTypeDef::State.

Referenced by HAL_CRYP_IRQHandler().

HAL_StatusTypeDef HAL_CRYP_AESCTR_Decrypt ( CRYP_HandleTypeDef hcryp,
uint8_t *  pCypherData,
uint16_t  Size,
uint8_t *  pPlainData,
uint32_t  Timeout 
)

Initializes the CRYP peripheral in AES CTR decryption mode then decrypted pCypherData.

The cypher data are available in pPlainData

Parameters:
hcryppointer to a CRYP_HandleTypeDef structure that contains the configuration information for CRYP module
pCypherDataPointer to the cyphertext buffer
SizeLength of the plaintext buffer, must be a multiple of 16.
pPlainDataPointer to the plaintext buffer
TimeoutSpecify Timeout value
Return values:
HALstatus

Definition at line 1099 of file stm32f4xx_hal_cryp.c.

References __HAL_CRYP_ENABLE, __HAL_CRYP_FIFO_FLUSH, __HAL_CRYP_SET_MODE, CRYP_KEYSIZE_128B, CRYP_ProcessData(), CRYP_SetInitVector(), CRYP_SetKey(), HAL_CRYP_PHASE_PROCESS, HAL_CRYP_PHASE_READY, HAL_CRYP_STATE_BUSY, HAL_CRYP_STATE_READY, CRYP_HandleTypeDef::Init, CRYP_InitTypeDef::KeySize, CRYP_HandleTypeDef::Phase, CRYP_InitTypeDef::pInitVect, CRYP_InitTypeDef::pKey, and CRYP_HandleTypeDef::State.

HAL_StatusTypeDef HAL_CRYP_AESCTR_Decrypt_DMA ( CRYP_HandleTypeDef hcryp,
uint8_t *  pCypherData,
uint16_t  Size,
uint8_t *  pPlainData 
)

Initializes the CRYP peripheral in AES CTR decryption mode using DMA.

Parameters:
hcryppointer to a CRYP_HandleTypeDef structure that contains the configuration information for CRYP module
pCypherDataPointer to the cyphertext buffer
SizeLength of the plaintext buffer, must be a multiple of 16
pPlainDataPointer to the plaintext buffer
Return values:
HALstatus

Definition at line 2176 of file stm32f4xx_hal_cryp.c.

References __HAL_CRYP_FIFO_FLUSH, __HAL_CRYP_SET_MODE, CRYP_KEYSIZE_128B, CRYP_SetDMAConfig(), CRYP_SetInitVector(), CRYP_SetKey(), HAL_CRYP_PHASE_PROCESS, HAL_CRYP_PHASE_READY, HAL_CRYP_STATE_BUSY, HAL_CRYP_STATE_READY, CRYP_HandleTypeDef::Init, CRYP_InitTypeDef::KeySize, CRYP_HandleTypeDef::Phase, CRYP_InitTypeDef::pInitVect, CRYP_InitTypeDef::pKey, and CRYP_HandleTypeDef::State.

HAL_StatusTypeDef HAL_CRYP_AESCTR_Decrypt_IT ( CRYP_HandleTypeDef hcryp,
uint8_t *  pCypherData,
uint16_t  Size,
uint8_t *  pPlainData 
)

Initializes the CRYP peripheral in AES CTR decryption mode using Interrupt.

Parameters:
hcryppointer to a CRYP_HandleTypeDef structure that contains the configuration information for CRYP module
pCypherDataPointer to the cyphertext buffer
SizeLength of the plaintext buffer, must be a multiple of 16
pPlainDataPointer to the plaintext buffer
Return values:
HALstatus

Definition at line 1728 of file stm32f4xx_hal_cryp.c.

References __HAL_CRYP_DISABLE_IT, __HAL_CRYP_ENABLE, __HAL_CRYP_ENABLE_IT, __HAL_CRYP_FIFO_FLUSH, __HAL_CRYP_GET_IT, __HAL_CRYP_SET_MODE, CRYP_IT_INI, CRYP_IT_OUTI, CRYP_KEYSIZE_128B, CRYP_SetInitVector(), CRYP_SetKey(), CRYP_HandleTypeDef::CrypInCount, CRYP_HandleTypeDef::CrypOutCount, HAL_CRYP_InCpltCallback(), HAL_CRYP_OutCpltCallback(), HAL_CRYP_PHASE_PROCESS, HAL_CRYP_PHASE_READY, HAL_CRYP_STATE_BUSY, HAL_CRYP_STATE_READY, CRYP_HandleTypeDef::Init, CRYP_HandleTypeDef::Instance, CRYP_InitTypeDef::KeySize, CRYP_HandleTypeDef::pCrypInBuffPtr, CRYP_HandleTypeDef::pCrypOutBuffPtr, CRYP_HandleTypeDef::Phase, CRYP_InitTypeDef::pInitVect, CRYP_InitTypeDef::pKey, and CRYP_HandleTypeDef::State.

Referenced by HAL_CRYP_IRQHandler().

HAL_StatusTypeDef HAL_CRYP_AESCTR_Encrypt ( CRYP_HandleTypeDef hcryp,
uint8_t *  pPlainData,
uint16_t  Size,
uint8_t *  pCypherData,
uint32_t  Timeout 
)

Initializes the CRYP peripheral in AES CTR encryption mode then encrypt pPlainData.

The cypher data are available in pCypherData

Parameters:
hcryppointer to a CRYP_HandleTypeDef structure that contains the configuration information for CRYP module
pPlainDataPointer to the plaintext buffer
SizeLength of the plaintext buffer, must be a multiple of 16.
pCypherDataPointer to the cyphertext buffer
TimeoutSpecify Timeout value
Return values:
HALstatus

Definition at line 863 of file stm32f4xx_hal_cryp.c.

References __HAL_CRYP_ENABLE, __HAL_CRYP_FIFO_FLUSH, __HAL_CRYP_SET_MODE, CRYP_KEYSIZE_128B, CRYP_ProcessData(), CRYP_SetInitVector(), CRYP_SetKey(), HAL_CRYP_PHASE_PROCESS, HAL_CRYP_PHASE_READY, HAL_CRYP_STATE_BUSY, HAL_CRYP_STATE_READY, CRYP_HandleTypeDef::Init, CRYP_InitTypeDef::KeySize, CRYP_HandleTypeDef::Phase, CRYP_InitTypeDef::pInitVect, CRYP_InitTypeDef::pKey, and CRYP_HandleTypeDef::State.

HAL_StatusTypeDef HAL_CRYP_AESCTR_Encrypt_DMA ( CRYP_HandleTypeDef hcryp,
uint8_t *  pPlainData,
uint16_t  Size,
uint8_t *  pCypherData 
)

Initializes the CRYP peripheral in AES CTR encryption mode using DMA.

Parameters:
hcryppointer to a CRYP_HandleTypeDef structure that contains the configuration information for CRYP module
pPlainDataPointer to the plaintext buffer
SizeLength of the plaintext buffer, must be a multiple of 16.
pCypherDataPointer to the cyphertext buffer
Return values:
HALstatus

Definition at line 1946 of file stm32f4xx_hal_cryp.c.

References __HAL_CRYP_FIFO_FLUSH, __HAL_CRYP_SET_MODE, CRYP_KEYSIZE_128B, CRYP_SetDMAConfig(), CRYP_SetInitVector(), CRYP_SetKey(), HAL_CRYP_PHASE_PROCESS, HAL_CRYP_PHASE_READY, HAL_CRYP_STATE_BUSY, HAL_CRYP_STATE_READY, CRYP_HandleTypeDef::Init, CRYP_InitTypeDef::KeySize, CRYP_HandleTypeDef::Phase, CRYP_InitTypeDef::pInitVect, CRYP_InitTypeDef::pKey, and CRYP_HandleTypeDef::State.

HAL_StatusTypeDef HAL_CRYP_AESCTR_Encrypt_IT ( CRYP_HandleTypeDef hcryp,
uint8_t *  pPlainData,
uint16_t  Size,
uint8_t *  pCypherData 
)

Initializes the CRYP peripheral in AES CTR encryption mode using Interrupt.

Parameters:
hcryppointer to a CRYP_HandleTypeDef structure that contains the configuration information for CRYP module
pPlainDataPointer to the plaintext buffer
SizeLength of the plaintext buffer, must be a multiple of 16 bytes
pCypherDataPointer to the cyphertext buffer
Return values:
HALstatus

Definition at line 1358 of file stm32f4xx_hal_cryp.c.

References __HAL_CRYP_DISABLE_IT, __HAL_CRYP_ENABLE, __HAL_CRYP_ENABLE_IT, __HAL_CRYP_FIFO_FLUSH, __HAL_CRYP_GET_IT, __HAL_CRYP_SET_MODE, CRYP_IT_INI, CRYP_IT_OUTI, CRYP_KEYSIZE_128B, CRYP_SetInitVector(), CRYP_SetKey(), CRYP_HandleTypeDef::CrypInCount, CRYP_HandleTypeDef::CrypOutCount, HAL_CRYP_InCpltCallback(), HAL_CRYP_OutCpltCallback(), HAL_CRYP_PHASE_PROCESS, HAL_CRYP_PHASE_READY, HAL_CRYP_STATE_BUSY, HAL_CRYP_STATE_READY, CRYP_HandleTypeDef::Init, CRYP_HandleTypeDef::Instance, CRYP_InitTypeDef::KeySize, CRYP_HandleTypeDef::pCrypInBuffPtr, CRYP_HandleTypeDef::pCrypOutBuffPtr, CRYP_HandleTypeDef::Phase, CRYP_InitTypeDef::pInitVect, CRYP_InitTypeDef::pKey, and CRYP_HandleTypeDef::State.

Referenced by HAL_CRYP_IRQHandler().

HAL_StatusTypeDef HAL_CRYP_AESECB_Decrypt ( CRYP_HandleTypeDef hcryp,
uint8_t *  pCypherData,
uint16_t  Size,
uint8_t *  pPlainData,
uint32_t  Timeout 
)

Initializes the CRYP peripheral in AES ECB decryption mode then decrypted pCypherData.

The cypher data are available in pPlainData

Parameters:
hcryppointer to a CRYP_HandleTypeDef structure that contains the configuration information for CRYP module
pCypherDataPointer to the cyphertext buffer
SizeLength of the plaintext buffer, must be a multiple of 16.
pPlainDataPointer to the plaintext buffer
TimeoutSpecify Timeout value
Return values:
HALstatus

Definition at line 922 of file stm32f4xx_hal_cryp.c.

References __HAL_CRYP_DISABLE, __HAL_CRYP_ENABLE, __HAL_CRYP_FIFO_FLUSH, __HAL_CRYP_SET_MODE, CRYP_FLAG_BUSY, CRYP_ProcessData(), CRYP_SetKey(), HAL_CRYP_PHASE_PROCESS, HAL_CRYP_PHASE_READY, HAL_CRYP_STATE_BUSY, HAL_CRYP_STATE_READY, HAL_CRYP_STATE_TIMEOUT, HAL_GetTick(), CRYP_HandleTypeDef::Init, CRYP_HandleTypeDef::Instance, CRYP_InitTypeDef::KeySize, CRYP_HandleTypeDef::Phase, CRYP_InitTypeDef::pKey, and CRYP_HandleTypeDef::State.

HAL_StatusTypeDef HAL_CRYP_AESECB_Decrypt_DMA ( CRYP_HandleTypeDef hcryp,
uint8_t *  pCypherData,
uint16_t  Size,
uint8_t *  pPlainData 
)

Initializes the CRYP peripheral in AES ECB decryption mode using DMA.

Parameters:
hcryppointer to a CRYP_HandleTypeDef structure that contains the configuration information for CRYP module
pCypherDataPointer to the cyphertext buffer
SizeLength of the plaintext buffer, must be a multiple of 16 bytes
pPlainDataPointer to the plaintext buffer
Return values:
HALstatus

Definition at line 2005 of file stm32f4xx_hal_cryp.c.

References __HAL_CRYP_ENABLE, __HAL_CRYP_FIFO_FLUSH, __HAL_CRYP_SET_MODE, CRYP_FLAG_BUSY, CRYP_SetDMAConfig(), CRYP_SetKey(), CRYP_TIMEOUT_VALUE, HAL_CRYP_PHASE_PROCESS, HAL_CRYP_PHASE_READY, HAL_CRYP_STATE_BUSY, HAL_CRYP_STATE_READY, HAL_CRYP_STATE_TIMEOUT, HAL_GetTick(), CRYP_HandleTypeDef::Init, CRYP_HandleTypeDef::Instance, CRYP_InitTypeDef::KeySize, CRYP_HandleTypeDef::Phase, CRYP_InitTypeDef::pKey, and CRYP_HandleTypeDef::State.

HAL_StatusTypeDef HAL_CRYP_AESECB_Decrypt_IT ( CRYP_HandleTypeDef hcryp,
uint8_t *  pCypherData,
uint16_t  Size,
uint8_t *  pPlainData 
)

Initializes the CRYP peripheral in AES ECB decryption mode using Interrupt.

Parameters:
hcryppointer to a CRYP_HandleTypeDef structure that contains the configuration information for CRYP module
pCypherDataPointer to the cyphertext buffer
SizeLength of the plaintext buffer, must be a multiple of 16.
pPlainDataPointer to the plaintext buffer
Return values:
HALstatus

Definition at line 1462 of file stm32f4xx_hal_cryp.c.

References __HAL_CRYP_DISABLE_IT, __HAL_CRYP_ENABLE, __HAL_CRYP_ENABLE_IT, __HAL_CRYP_FIFO_FLUSH, __HAL_CRYP_GET_IT, __HAL_CRYP_SET_MODE, CRYP_FLAG_BUSY, CRYP_IT_INI, CRYP_IT_OUTI, CRYP_SetKey(), CRYP_TIMEOUT_VALUE, CRYP_HandleTypeDef::CrypInCount, CRYP_HandleTypeDef::CrypOutCount, HAL_CRYP_InCpltCallback(), HAL_CRYP_OutCpltCallback(), HAL_CRYP_PHASE_PROCESS, HAL_CRYP_PHASE_READY, HAL_CRYP_STATE_BUSY, HAL_CRYP_STATE_READY, HAL_CRYP_STATE_TIMEOUT, HAL_GetTick(), CRYP_HandleTypeDef::Init, CRYP_HandleTypeDef::Instance, CRYP_InitTypeDef::KeySize, CRYP_HandleTypeDef::pCrypInBuffPtr, CRYP_HandleTypeDef::pCrypOutBuffPtr, CRYP_HandleTypeDef::Phase, CRYP_InitTypeDef::pKey, and CRYP_HandleTypeDef::State.

Referenced by HAL_CRYP_IRQHandler().

HAL_StatusTypeDef HAL_CRYP_AESECB_Encrypt ( CRYP_HandleTypeDef hcryp,
uint8_t *  pPlainData,
uint16_t  Size,
uint8_t *  pCypherData,
uint32_t  Timeout 
)

Initializes the CRYP peripheral in AES ECB encryption mode then encrypt pPlainData.

The cypher data are available in pCypherData

Parameters:
hcryppointer to a CRYP_HandleTypeDef structure that contains the configuration information for CRYP module
pPlainDataPointer to the plaintext buffer
SizeLength of the plaintext buffer, must be a multiple of 16.
pCypherDataPointer to the cyphertext buffer
TimeoutSpecify Timeout value
Return values:
HALstatus

Definition at line 752 of file stm32f4xx_hal_cryp.c.

References __HAL_CRYP_ENABLE, __HAL_CRYP_FIFO_FLUSH, __HAL_CRYP_SET_MODE, CRYP_ProcessData(), CRYP_SetKey(), HAL_CRYP_PHASE_PROCESS, HAL_CRYP_PHASE_READY, HAL_CRYP_STATE_BUSY, HAL_CRYP_STATE_READY, CRYP_HandleTypeDef::Init, CRYP_InitTypeDef::KeySize, CRYP_HandleTypeDef::Phase, CRYP_InitTypeDef::pKey, and CRYP_HandleTypeDef::State.

HAL_StatusTypeDef HAL_CRYP_AESECB_Encrypt_DMA ( CRYP_HandleTypeDef hcryp,
uint8_t *  pPlainData,
uint16_t  Size,
uint8_t *  pCypherData 
)

Initializes the CRYP peripheral in AES ECB encryption mode using DMA.

Parameters:
hcryppointer to a CRYP_HandleTypeDef structure that contains the configuration information for CRYP module
pPlainDataPointer to the plaintext buffer
SizeLength of the plaintext buffer, must be a multiple of 16 bytes
pCypherDataPointer to the cyphertext buffer
Return values:
HALstatus

Definition at line 1833 of file stm32f4xx_hal_cryp.c.

References __HAL_CRYP_FIFO_FLUSH, __HAL_CRYP_SET_MODE, CRYP_SetDMAConfig(), CRYP_SetKey(), HAL_CRYP_PHASE_PROCESS, HAL_CRYP_PHASE_READY, HAL_CRYP_STATE_BUSY, HAL_CRYP_STATE_READY, CRYP_HandleTypeDef::Init, CRYP_InitTypeDef::KeySize, CRYP_HandleTypeDef::Phase, CRYP_InitTypeDef::pKey, and CRYP_HandleTypeDef::State.

HAL_StatusTypeDef HAL_CRYP_AESECB_Encrypt_IT ( CRYP_HandleTypeDef hcryp,
uint8_t *  pPlainData,
uint16_t  Size,
uint8_t *  pCypherData 
)

Initializes the CRYP peripheral in AES ECB encryption mode using Interrupt.

Parameters:
hcryppointer to a CRYP_HandleTypeDef structure that contains the configuration information for CRYP module
pPlainDataPointer to the plaintext buffer
SizeLength of the plaintext buffer, must be a multiple of 16 bytes
pCypherDataPointer to the cyphertext buffer
Return values:
HALstatus

Definition at line 1154 of file stm32f4xx_hal_cryp.c.

References __HAL_CRYP_DISABLE_IT, __HAL_CRYP_ENABLE, __HAL_CRYP_ENABLE_IT, __HAL_CRYP_FIFO_FLUSH, __HAL_CRYP_GET_IT, __HAL_CRYP_SET_MODE, CRYP_IT_INI, CRYP_IT_OUTI, CRYP_SetKey(), CRYP_HandleTypeDef::CrypInCount, CRYP_HandleTypeDef::CrypOutCount, HAL_CRYP_InCpltCallback(), HAL_CRYP_OutCpltCallback(), HAL_CRYP_PHASE_PROCESS, HAL_CRYP_PHASE_READY, HAL_CRYP_STATE_BUSY, HAL_CRYP_STATE_READY, CRYP_HandleTypeDef::Init, CRYP_HandleTypeDef::Instance, CRYP_InitTypeDef::KeySize, CRYP_HandleTypeDef::pCrypInBuffPtr, CRYP_HandleTypeDef::pCrypOutBuffPtr, CRYP_HandleTypeDef::Phase, CRYP_InitTypeDef::pKey, and CRYP_HandleTypeDef::State.

Referenced by HAL_CRYP_IRQHandler().