RTEMS: Working with AES

| RTEMS 5.4-rc2

Loading...
Searching...
No Matches
Working with AES
Board Support Packages » ARM » Atmel/Microchip SAM E70, S70, V70 and V71 » Contributed Code

The AES driver provides the interface to configure and use the AES peripheral.
The Advanced Encryption Standard (AES) specifies a FIPS-approved cryptographic algorithm that can be used to protect electronic data. The AES algorithm is a symmetric block cipher that can encrypt (encipher) and decrypt (decipher) information. Encryption converts data to an unintelligible form called ciphertext. Decrypting the ciphertext converts the data back into its original form, called plaintext. The CIPHER bit in the AES Mode Register (AES_MR) allows selection between the encryption and the decryption processes. The AES is capable of using cryptographic keys of 128/192/256 bits to encrypt and decrypt data in blocks of 128 bits. This 128-bit/192-bit/256-bit key is defined in the Key Registers (AES_KEYWRx) and set by AES_WriteKey(). The input to the encryption processes of the CBC, CFB, and OFB modes includes, in addition to the plaintext, a 128-bit data block called the initialization vector (IV), which must be set with AES_SetVector(). The initialization vector is used in an initial step in the encryption of a message and in the corresponding decryption of the message. The Initialization Vector Registers are also used by the CTR mode to set the counter value.

To Enable a AES encryption and decryption,the user has to follow these few steps:

- A software triggered hardware reset of the AES interface is performed by AES_SoftReset().
- Configure AES algorithm mode, key mode, start mode and operation mode by AES_Configure().
- Input AES data for encryption and decryption with function AES_SetInput()
- Set AES key with function AES_WriteKey().
- To start the encryption or the decryption process with AES_Start()
- To get the encryption or decryption result by AES_GetOutput()

For more accurate information, please look at the AES section of the Datasheet.

Related files :
aes.c
aes.h