RM0440 Rev 4 1501/2126
RM0440 AES hardware accelerator (AES)
1538
A detailed description of suspend/resume operations is in the sections dedicated to each
AES mode.
34.4.8 AES basic chaining modes (ECB, CBC)
Overview
This section gives a brief explanation of the four basic operation modes provided by the
AES core: ECB encryption, ECB decryption, CBC encryption and CBC decryption. For
detailed information, refer to the FIPS publication 197 from November 26, 2001.
Figure 510 illustrates the electronic codebook (ECB) encryption.
Figure 510. ECB encryption
In ECB encrypt mode, the 128-bit plaintext input data block Px in the AES_DINR register
first goes through bit/byte/half-word swapping. The swap result Ix is processed with the AES
core set in encrypt mode, using a 128- or 256-bit key. The encryption result Ox goes through
bit/byte/half-word swapping, then is stored in the AES_DOUTR register as 128-bit ciphertext
output data block Cx. The ECB encryption continues in this way until the last complete
plaintext block is encrypted.
Figure 511 illustrates the electronic codebook (ECB) decryption.
Figure 511. ECB decryption
To perform an AES decryption in the ECB mode, the secret key has to be prepared by
collecting the last-round encryption key (which requires to first execute the complete key
schedule for encryption), and using it as the first-round key for the decryption of the
ciphertext. This preparation is supported by the AES core.
MSv19105V2
Encrypt
AES_KEYRx (KEY)
AES_DINR (plaintext P1)
AES_DOUTR (ciphertext C1)
Swap
management
DATATYPE[1:0]
DATATYPE[1:0]
Swap
management
Encrypt
AES_KEYRx (KEY)
AES_DINR (plaintext P2)
AES_DOUTR (ciphertext C2)
Swap
management
DATATYPE[1:0]
DATATYPE[1:0]
Swap
management
input
output
Legend
I1 I2
O1 O2
Block 1 Block 2
AES core
MSv19106V2
Decrypt
AES_KEYRx (KEY)
AES_DINR (ciphertext C1)
AES_DOUTR (plaintext P1)
Swap
management
DATATYPE[1:0]
DATATYPE[1:0]
Swap
management
Decrypt
AES_KEYRx (KEY)
AES_DINR (ciphertext C2)
AES_DOUTR (plaintext P2)
Swap
management
DATATYPE[1:0]
DATATYPE[1:0]
Swap
management
input
output
Legend
I1 I2
O1 O2
Block 1 Block 2