STM32F2 Standard Peripheral bibliotheek  1.0
ST Microelectronics bibliotheek documentatie voor de STM32F2 Standard Peripheral Library
 All Data Structures Files Functions Variables Enumerations Enumerator Groups
High Level AES functions

High Level AES functions. More...

Functions

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_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_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...
 

Detailed Description

High Level AES functions.

 ===============================================================================
                          High Level AES functions
 ===============================================================================

Function Documentation

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
AnErrorStatus enumeration value:
  • SUCCESS: Operation done
  • ERROR: Operation failed
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
AnErrorStatus enumeration value:
  • SUCCESS: Operation done
  • ERROR: Operation failed
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
AnErrorStatus enumeration value:
  • SUCCESS: Operation done
  • ERROR: Operation failed