AES hardware accelerator (AES)
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 261
Legend
input
output
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 262
Legend
input
output
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.
1106/2301
illustrates the electronic codebook (ECB) encryption.
Figure 261. ECB encryption
AES_DINR (plaintext P1)
DATATYPE[1:0]
AES_KEYRx (KEY)
DATATYPE[1:0]
AES_DOUTR (ciphertext C1)
illustrates the electronic codebook (ECB) decryption.
Figure 262. ECB decryption
AES_DINR (ciphertext C1)
DATATYPE[1:0]
AES_KEYRx (KEY)
DATATYPE[1:0]
AES_DOUTR (plaintext P1)
RM0432 Rev 6
Block 1
Swap
management
I1
AES_KEYRx (KEY)
Encrypt
O1
AES core
Swap
management
Block 1
Swap
management
I1
AES_KEYRx (KEY)
Decrypt
O1
Swap
management
Block 2
AES_DINR (plaintext P2)
Swap
DATATYPE[1:0]
management
Encrypt
Swap
DATATYPE[1:0]
management
AES_DOUTR (ciphertext C2)
Block 2
AES_DINR (ciphertext C2)
Swap
DATATYPE[1:0]
management
Decrypt
Swap
DATATYPE[1:0]
management
AES_DOUTR (plaintext P2)
RM0432
I2
O2
MSv19105V2
I2
O2
MSv19106V2
Need help?
Do you have a question about the STM32L4+ Series and is the answer not in the manual?