STM32L443xx HAL User Manual
|
Extended processing functions. More...
Functions | |
HAL_StatusTypeDef | HAL_CRYPEx_AES (CRYP_HandleTypeDef *hcryp, uint8_t *pInputData, uint16_t Size, uint8_t *pOutputData, uint32_t Timeout) |
Carry out in polling mode the ciphering or deciphering operation according to hcryp->Init structure fields, all operating modes (encryption, key derivation and/or decryption) and chaining modes ECB, CBC and CTR are managed by this function in polling mode. | |
HAL_StatusTypeDef | HAL_CRYPEx_AES_IT (CRYP_HandleTypeDef *hcryp, uint8_t *pInputData, uint16_t Size, uint8_t *pOutputData) |
Carry out in interrupt mode the ciphering or deciphering operation according to hcryp->Init structure fields, all operating modes (encryption, key derivation and/or decryption) and chaining modes ECB, CBC and CTR are managed by this function in interrupt mode. | |
HAL_StatusTypeDef | HAL_CRYPEx_AES_DMA (CRYP_HandleTypeDef *hcryp, uint8_t *pInputData, uint16_t Size, uint8_t *pOutputData) |
Carry out in DMA mode the ciphering or deciphering operation according to hcryp->Init structure fields. | |
HAL_StatusTypeDef | HAL_CRYPEx_AES_Auth (CRYP_HandleTypeDef *hcryp, uint8_t *pInputData, uint64_t Size, uint8_t *pOutputData, uint32_t Timeout) |
Carry out in polling mode the authentication tag generation as well as the ciphering or deciphering operation according to hcryp->Init structure fields. | |
HAL_StatusTypeDef | HAL_CRYPEx_AES_Auth_IT (CRYP_HandleTypeDef *hcryp, uint8_t *pInputData, uint64_t Size, uint8_t *pOutputData) |
Carry out in interrupt mode the authentication tag generation as well as the ciphering or deciphering operation according to hcryp->Init structure fields. | |
HAL_StatusTypeDef | HAL_CRYPEx_AES_Auth_DMA (CRYP_HandleTypeDef *hcryp, uint8_t *pInputData, uint64_t Size, uint8_t *pOutputData) |
Carry out in DMA mode the authentication tag generation as well as the ciphering or deciphering operation according to hcryp->Init structure fields. |
Extended processing functions.
============================================================================== ##### AES extended processing functions ##### ============================================================================== [..] This section provides functions allowing to: (+) Encrypt plaintext or decrypt cipher text using AES algorithm in different chaining modes. Functions are generic (handles ECB, CBC and CTR and all modes) and are only differentiated based on the processing type. Three processing types are available: (++) Polling mode (++) Interrupt mode (++) DMA mode (+) Generate and authentication tag in addition to encrypt/decrypt a plain/cipher text using AES algorithm in different chaining modes. Functions are generic (handles GCM, GMAC, CMAC and CCM when applicable) and process only one phase so that steps can be skipped if so required. Functions are only differentiated based on the processing type. Three processing types are available: (++) Polling mode (++) Interrupt mode (++) DMA mode
HAL_StatusTypeDef HAL_CRYPEx_AES | ( | CRYP_HandleTypeDef * | hcryp, |
uint8_t * | pInputData, | ||
uint16_t | Size, | ||
uint8_t * | pOutputData, | ||
uint32_t | Timeout | ||
) |
Carry out in polling mode the ciphering or deciphering operation according to hcryp->Init structure fields, all operating modes (encryption, key derivation and/or decryption) and chaining modes ECB, CBC and CTR are managed by this function in polling mode.
hcryp | pointer to a CRYP_HandleTypeDef structure that contains the configuration information for CRYP module |
pInputData | Pointer to the plain text in case of encryption or cipher text in case of decryption or key derivation+decryption. Parameter is meaningless in case of key derivation. |
Size | Length of the input data buffer in bytes, must be a multiple of 16. Parameter is meaningless in case of key derivation. |
pOutputData | Pointer to the cipher text in case of encryption or plain text in case of decryption/key derivation+decryption, or pointer to the derivative keys in case of key derivation only. |
Timeout | Specify Timeout value |
HAL | status |
Definition at line 164 of file stm32l4xx_hal_cryp_ex.c.
References CRYP_ALGOMODE_KEYDERIVATION, CRYP_ProcessData(), CRYP_ReadKey(), HAL_CRYP_STATE_BUSY, HAL_CRYP_STATE_READY, HAL_CRYP_STATE_SUSPENDED, __CRYP_HandleTypeDef::Init, CRYP_InitTypeDef::OperatingMode, 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().
HAL_StatusTypeDef HAL_CRYPEx_AES_Auth | ( | CRYP_HandleTypeDef * | hcryp, |
uint8_t * | pInputData, | ||
uint64_t | Size, | ||
uint8_t * | pOutputData, | ||
uint32_t | Timeout | ||
) |
Carry out in polling mode the authentication tag generation as well as the ciphering or deciphering operation according to hcryp->Init structure fields.
hcryp | pointer to a CRYP_HandleTypeDef structure that contains the configuration information for CRYP module |
pInputData |
|
Size |
|
pOutputData |
|
Timeout | Specify Timeout value |
HAL | status |
Definition at line 430 of file stm32l4xx_hal_cryp_ex.c.
References __HAL_CRYP_CLEAR_FLAG, __HAL_CRYP_DISABLE, __HAL_CRYP_ENABLE, CRYP_InitTypeDef::ChainingMode, CRYP_ALGOMODE_ENCRYPT, CRYP_BUSY_TIMEOUTVALUE, CRYP_CCF_CLEAR, CRYP_CHAINMODE_AES_CMAC, CRYP_CHAINMODE_AES_GCM_GMAC, CRYP_DATATYPE_16B, CRYP_DATATYPE_1B, CRYP_DATATYPE_32B, CRYP_DATATYPE_8B, CRYP_FINAL_PHASE, CRYP_HEADER_PHASE, CRYP_INIT_PHASE, CRYP_Padding(), CRYP_PAYLOAD_PHASE, CRYP_POLLING_ON, CRYP_WaitOnBusyFlagReset(), CRYP_WaitOnCCFlag(), __CRYP_HandleTypeDef::CrypInCount, CRYP_InitTypeDef::DataType, CRYP_InitTypeDef::GCMCMACPhase, HAL_CRYP_PHASE_FINAL_OVER, HAL_CRYP_PHASE_HEADER_OVER, HAL_CRYP_PHASE_HEADER_SUSPENDED, HAL_CRYP_PHASE_INIT_OVER, HAL_CRYP_PHASE_PAYLOAD_OVER, HAL_CRYP_STATE_BUSY, HAL_CRYP_STATE_READY, HAL_CRYP_STATE_SUSPENDED, HAL_CRYP_SUSPEND, HAL_CRYP_SUSPEND_NONE, CRYP_InitTypeDef::Header, CRYP_InitTypeDef::HeaderSize, __CRYP_HandleTypeDef::Init, __CRYP_HandleTypeDef::Instance, CRYP_InitTypeDef::OperatingMode, __CRYP_HandleTypeDef::pCrypInBuffPtr, __CRYP_HandleTypeDef::pCrypOutBuffPtr, __CRYP_HandleTypeDef::Phase, __CRYP_HandleTypeDef::State, and __CRYP_HandleTypeDef::SuspendRequest.
HAL_StatusTypeDef HAL_CRYPEx_AES_Auth_DMA | ( | CRYP_HandleTypeDef * | hcryp, |
uint8_t * | pInputData, | ||
uint64_t | Size, | ||
uint8_t * | pOutputData | ||
) |
Carry out in DMA mode the authentication tag generation as well as the ciphering or deciphering operation according to hcryp->Init structure fields.
hcryp | pointer to a CRYP_HandleTypeDef structure that contains the configuration information for CRYP module |
pInputData |
|
Size |
|
pOutputData |
|
HAL | status |
Definition at line 1401 of file stm32l4xx_hal_cryp_ex.c.
References __HAL_CRYP_CLEAR_FLAG, __HAL_CRYP_DISABLE, __HAL_CRYP_ENABLE, CRYP_InitTypeDef::ChainingMode, CRYP_Authentication_SetDMAConfig(), CRYP_CCF_CLEAR, CRYP_CCF_TIMEOUTVALUE, CRYP_CHAINMODE_AES_CMAC, CRYP_CHAINMODE_AES_GCM_GMAC, CRYP_DATATYPE_16B, CRYP_DATATYPE_1B, CRYP_DATATYPE_32B, CRYP_DATATYPE_8B, CRYP_FINAL_PHASE, CRYP_HEADER_PHASE, CRYP_INIT_PHASE, CRYP_Padding(), CRYP_PAYLOAD_PHASE, CRYP_POLLING_OFF, CRYP_POLLING_ON, CRYP_WaitOnCCFlag(), __CRYP_HandleTypeDef::CrypInCount, CRYP_InitTypeDef::DataType, CRYP_InitTypeDef::GCMCMACPhase, HAL_CRYP_OutCpltCallback(), HAL_CRYP_PHASE_FINAL_OVER, HAL_CRYP_PHASE_HEADER_OVER, HAL_CRYP_PHASE_INIT_OVER, HAL_CRYP_PHASE_PAYLOAD_OVER, HAL_CRYP_STATE_BUSY, HAL_CRYP_STATE_READY, CRYP_InitTypeDef::Header, CRYP_InitTypeDef::HeaderSize, __CRYP_HandleTypeDef::Init, __CRYP_HandleTypeDef::Instance, __CRYP_HandleTypeDef::OutCpltCallback, __CRYP_HandleTypeDef::pCrypInBuffPtr, __CRYP_HandleTypeDef::pCrypOutBuffPtr, __CRYP_HandleTypeDef::Phase, and __CRYP_HandleTypeDef::State.
HAL_StatusTypeDef HAL_CRYPEx_AES_Auth_IT | ( | CRYP_HandleTypeDef * | hcryp, |
uint8_t * | pInputData, | ||
uint64_t | Size, | ||
uint8_t * | pOutputData | ||
) |
Carry out in interrupt mode the authentication tag generation as well as the ciphering or deciphering operation according to hcryp->Init structure fields.
hcryp | pointer to a CRYP_HandleTypeDef structure that contains the configuration information for CRYP module |
pInputData |
|
Size |
|
pOutputData |
|
HAL | status |
Definition at line 941 of file stm32l4xx_hal_cryp_ex.c.
References __HAL_CRYP_ENABLE, __HAL_CRYP_ENABLE_IT, __HAL_CRYP_SET_CHAININGMODE, CRYP_InitTypeDef::ChainingMode, CRYP_ALGOMODE_DECRYPT, CRYP_ALGOMODE_ENCRYPT, CRYP_CHAINMODE_AES_CMAC, CRYP_CHAINMODE_AES_CTR, CRYP_CHAINMODE_AES_GCM_GMAC, CRYP_DATATYPE_16B, CRYP_DATATYPE_1B, CRYP_DATATYPE_32B, CRYP_DATATYPE_8B, CRYP_FINAL_PHASE, CRYP_HEADER_PHASE, CRYP_INIT_PHASE, CRYP_IT_CCFIE, CRYP_IT_ERRIE, CRYP_PAYLOAD_PHASE, __CRYP_HandleTypeDef::CrypInCount, __CRYP_HandleTypeDef::CrypOutCount, CRYP_InitTypeDef::DataType, CRYP_InitTypeDef::GCMCMACPhase, HAL_CRYP_PHASE_HEADER_OVER, HAL_CRYP_PHASE_INIT_OVER, HAL_CRYP_PHASE_PAYLOAD_OVER, HAL_CRYP_STATE_BUSY, HAL_CRYP_STATE_READY, CRYP_InitTypeDef::Header, CRYP_InitTypeDef::HeaderSize, __CRYP_HandleTypeDef::Init, __CRYP_HandleTypeDef::Instance, CRYP_InitTypeDef::OperatingMode, __CRYP_HandleTypeDef::pCrypInBuffPtr, __CRYP_HandleTypeDef::pCrypOutBuffPtr, __CRYP_HandleTypeDef::Phase, and __CRYP_HandleTypeDef::State.
HAL_StatusTypeDef HAL_CRYPEx_AES_DMA | ( | CRYP_HandleTypeDef * | hcryp, |
uint8_t * | pInputData, | ||
uint16_t | Size, | ||
uint8_t * | pOutputData | ||
) |
Carry out in DMA mode the ciphering or deciphering operation according to hcryp->Init structure fields.
hcryp | pointer to a CRYP_HandleTypeDef structure that contains the configuration information for CRYP module |
pInputData | Pointer to the plain text in case of encryption or cipher text in case of decryption or key derivation+decryption. |
Size | Length of the input data buffer in bytes, must be a multiple of 16. |
pOutputData | Pointer to the cipher text in case of encryption or plain text in case of decryption/key derivation+decryption. |
HAL | status |
Definition at line 349 of file stm32l4xx_hal_cryp_ex.c.
References CRYP_ALGOMODE_KEYDERIVATION, CRYP_SetDMAConfig(), HAL_CRYP_STATE_BUSY, HAL_CRYP_STATE_READY, __CRYP_HandleTypeDef::Init, CRYP_InitTypeDef::OperatingMode, and __CRYP_HandleTypeDef::State.
Referenced by HAL_CRYP_AESCBC_Decrypt_DMA(), HAL_CRYP_AESCBC_Encrypt_DMA(), HAL_CRYP_AESCTR_Decrypt_DMA(), HAL_CRYP_AESCTR_Encrypt_DMA(), HAL_CRYP_AESECB_Decrypt_DMA(), and HAL_CRYP_AESECB_Encrypt_DMA().
HAL_StatusTypeDef HAL_CRYPEx_AES_IT | ( | CRYP_HandleTypeDef * | hcryp, |
uint8_t * | pInputData, | ||
uint16_t | Size, | ||
uint8_t * | pOutputData | ||
) |
Carry out in interrupt mode the ciphering or deciphering operation according to hcryp->Init structure fields, all operating modes (encryption, key derivation and/or decryption) and chaining modes ECB, CBC and CTR are managed by this function in interrupt mode.
hcryp | pointer to a CRYP_HandleTypeDef structure that contains the configuration information for CRYP module |
pInputData | Pointer to the plain text in case of encryption or cipher text in case of decryption or key derivation+decryption. Parameter is meaningless in case of key derivation. |
Size | Length of the input data buffer in bytes, must be a multiple of 16. Parameter is meaningless in case of key derivation. |
pOutputData | Pointer to the cipher text in case of encryption or plain text in case of decryption/key derivation+decryption, or pointer to the derivative keys in case of key derivation only. |
HAL | status |
Definition at line 244 of file stm32l4xx_hal_cryp_ex.c.
References __HAL_CRYP_ENABLE_IT, CRYP_ALGOMODE_KEYDERIVATION, CRYP_IT_CCFIE, CRYP_IT_ERRIE, __CRYP_HandleTypeDef::CrypInCount, __CRYP_HandleTypeDef::CrypOutCount, HAL_CRYP_STATE_BUSY, HAL_CRYP_STATE_READY, __CRYP_HandleTypeDef::Init, __CRYP_HandleTypeDef::Instance, CRYP_InitTypeDef::OperatingMode, __CRYP_HandleTypeDef::pCrypInBuffPtr, __CRYP_HandleTypeDef::pCrypOutBuffPtr, and __CRYP_HandleTypeDef::State.
Referenced by HAL_CRYP_AESCBC_Decrypt_IT(), HAL_CRYP_AESCBC_Encrypt_IT(), HAL_CRYP_AESCTR_Decrypt_IT(), HAL_CRYP_AESCTR_Encrypt_IT(), HAL_CRYP_AESECB_Decrypt_IT(), and HAL_CRYP_AESECB_Encrypt_IT().