High Level AES functions.
More...
|
ErrorStatus | CRYP_AES_CBC (uint8_t Mode, uint8_t InitVectors[16], uint8_t *Key, uint16_t Keysize, uint8_t *Input, uint32_t Ilength, uint8_t *Output) |
| Encrypt and decrypt using AES in CBC Mode. More...
|
|
ErrorStatus | CRYP_AES_CCM (uint8_t Mode, uint8_t *Nonce, uint32_t NonceSize, uint8_t *Key, uint16_t Keysize, uint8_t *Input, uint32_t ILength, uint8_t *Header, uint32_t HLength, uint8_t *HBuffer, uint8_t *Output, uint8_t *AuthTAG, uint32_t TAGSize) |
| Encrypt and decrypt using AES in CCM Mode. The GCM and CCM modes are available only on STM32F437x Devices. More...
|
|
ErrorStatus | CRYP_AES_CTR (uint8_t Mode, uint8_t InitVectors[16], uint8_t *Key, uint16_t Keysize, uint8_t *Input, uint32_t Ilength, uint8_t *Output) |
| Encrypt and decrypt using AES in CTR Mode. More...
|
|
ErrorStatus | CRYP_AES_ECB (uint8_t Mode, uint8_t *Key, uint16_t Keysize, uint8_t *Input, uint32_t Ilength, uint8_t *Output) |
| Encrypt and decrypt using AES in ECB Mode. More...
|
|
ErrorStatus | CRYP_AES_GCM (uint8_t Mode, uint8_t InitVectors[16], uint8_t *Key, uint16_t Keysize, uint8_t *Input, uint32_t ILength, uint8_t *Header, uint32_t HLength, uint8_t *Output, uint8_t *AuthTAG) |
| Encrypt and decrypt using AES in GCM Mode. The GCM and CCM modes are available only on STM32F437x Devices. More...
|
|
High Level AES functions.
===============================================================================
##### High Level AES functions #####
===============================================================================
ErrorStatus CRYP_AES_CBC |
( |
uint8_t |
Mode, |
|
|
uint8_t |
InitVectors[16], |
|
|
uint8_t * |
Key, |
|
|
uint16_t |
Keysize, |
|
|
uint8_t * |
Input, |
|
|
uint32_t |
Ilength, |
|
|
uint8_t * |
Output |
|
) |
| |
Encrypt and decrypt using AES in CBC Mode.
- Parameters
-
Mode | encryption or decryption Mode. This parameter can be one of the following values:
- MODE_ENCRYPT: Encryption
- MODE_DECRYPT: Decryption
|
InitVectors | Initialisation Vectors used for AES algorithm. |
Key | Key used for AES algorithm. |
Keysize | length of the Key, must be a 128, 192 or 256. |
Input | pointer to the Input buffer. |
Ilength | length of the Input buffer, must be a multiple of 16. |
Output | pointer to the returned buffer. |
- Return values
-
An | ErrorStatus enumeration value:
- SUCCESS: Operation done
- ERROR: Operation failed
|
Definition at line 294 of file stm32f4xx_cryp_aes.c.
ErrorStatus CRYP_AES_CCM |
( |
uint8_t |
Mode, |
|
|
uint8_t * |
Nonce, |
|
|
uint32_t |
NonceSize, |
|
|
uint8_t * |
Key, |
|
|
uint16_t |
Keysize, |
|
|
uint8_t * |
Input, |
|
|
uint32_t |
ILength, |
|
|
uint8_t * |
Header, |
|
|
uint32_t |
HLength, |
|
|
uint8_t * |
HBuffer, |
|
|
uint8_t * |
Output, |
|
|
uint8_t * |
AuthTAG, |
|
|
uint32_t |
TAGSize |
|
) |
| |
Encrypt and decrypt using AES in CCM Mode. The GCM and CCM modes are available only on STM32F437x Devices.
- Parameters
-
Mode | encryption or decryption Mode. This parameter can be one of the following values:
- MODE_ENCRYPT: Encryption
- MODE_DECRYPT: Decryption
|
Nonce | the nounce used for AES algorithm. It shall be unique for each processing. |
Key | Key used for AES algorithm. |
Keysize | length of the Key, must be a 128, 192 or 256. |
Input | pointer to the Input buffer. |
Ilength | length of the Input buffer in bytes, must be a multiple of 16. |
Header | pointer to the header buffer. |
Hlength | length of the header buffer in bytes. |
HBuffer | pointer to temporary buffer used to append the header HBuffer size must be equal to Hlength + 21 |
Output | pointer to the returned buffer. |
AuthTAG | pointer to the authentication TAG buffer. |
TAGSize | the size of the TAG (called also MAC). |
- Return values
-
An | ErrorStatus enumeration value:
- SUCCESS: Operation done
- ERROR: Operation failed
|
Definition at line 1125 of file stm32f4xx_cryp_aes.c.
ErrorStatus CRYP_AES_CTR |
( |
uint8_t |
Mode, |
|
|
uint8_t |
InitVectors[16], |
|
|
uint8_t * |
Key, |
|
|
uint16_t |
Keysize, |
|
|
uint8_t * |
Input, |
|
|
uint32_t |
Ilength, |
|
|
uint8_t * |
Output |
|
) |
| |
Encrypt and decrypt using AES in CTR Mode.
- Parameters
-
Mode | encryption or decryption Mode. This parameter can be one of the following values:
- MODE_ENCRYPT: Encryption
- MODE_DECRYPT: Decryption
|
InitVectors | Initialisation Vectors used for AES algorithm. |
Key | Key used for AES algorithm. |
Keysize | length of the Key, must be a 128, 192 or 256. |
Input | pointer to the Input buffer. |
Ilength | length of the Input buffer, must be a multiple of 16. |
Output | pointer to the returned buffer. |
- Return values
-
An | ErrorStatus enumeration value:
- SUCCESS: Operation done
- ERROR: Operation failed
|
Definition at line 496 of file stm32f4xx_cryp_aes.c.
ErrorStatus CRYP_AES_ECB |
( |
uint8_t |
Mode, |
|
|
uint8_t * |
Key, |
|
|
uint16_t |
Keysize, |
|
|
uint8_t * |
Input, |
|
|
uint32_t |
Ilength, |
|
|
uint8_t * |
Output |
|
) |
| |
Encrypt and decrypt using AES in ECB Mode.
- Parameters
-
Mode | encryption or decryption Mode. This parameter can be one of the following values:
- MODE_ENCRYPT: Encryption
- MODE_DECRYPT: Decryption
|
Key | Key used for AES algorithm. |
Keysize | length of the Key, must be a 128, 192 or 256. |
Input | pointer to the Input buffer. |
Ilength | length of the Input buffer, must be a multiple of 16. |
Output | pointer to the returned buffer. |
- Return values
-
An | ErrorStatus enumeration value:
- SUCCESS: Operation done
- ERROR: Operation failed
|
Definition at line 106 of file stm32f4xx_cryp_aes.c.
ErrorStatus CRYP_AES_GCM |
( |
uint8_t |
Mode, |
|
|
uint8_t |
InitVectors[16], |
|
|
uint8_t * |
Key, |
|
|
uint16_t |
Keysize, |
|
|
uint8_t * |
Input, |
|
|
uint32_t |
ILength, |
|
|
uint8_t * |
Header, |
|
|
uint32_t |
HLength, |
|
|
uint8_t * |
Output, |
|
|
uint8_t * |
AuthTAG |
|
) |
| |
Encrypt and decrypt using AES in GCM Mode. The GCM and CCM modes are available only on STM32F437x Devices.
- Parameters
-
Mode | encryption or decryption Mode. This parameter can be one of the following values:
- MODE_ENCRYPT: Encryption
- MODE_DECRYPT: Decryption
|
InitVectors | Initialisation Vectors used for AES algorithm. |
Key | Key used for AES algorithm. |
Keysize | length of the Key, must be a 128, 192 or 256. |
Input | pointer to the Input buffer. |
Ilength | length of the Input buffer in bytes, must be a multiple of 16. |
Header | pointer to the header buffer. |
Hlength | length of the header buffer in bytes, must be a multiple of 16. |
Output | pointer to the returned buffer. |
AuthTAG | pointer to the authentication TAG buffer. |
- Return values
-
An | ErrorStatus enumeration value:
- SUCCESS: Operation done
- ERROR: Operation failed
|
Definition at line 670 of file stm32f4xx_cryp_aes.c.