AES hardware accelerator (AES) RM0440
1492/2126 RM0440 Rev 4
Chaining modes
The following chaining modes are supported by AES, selected through the CHMOD[2:0]
bitfield of the AES_CR register:
• Electronic code book (ECB)
• Cipher block chaining (CBC)
• Counter (CTR)
• Galois counter mode (GCM)
• Galois message authentication code (GMAC)
• Counter with CBC-MAC (CCM)
Note: The chaining mode may be changed only when AES is disabled (bit EN of the AES_CR
register cleared).
Principle of each AES chaining mode is provided in the following subsections.
Detailed information is in dedicated sections, starting from Section 34.4.8: AES basic
chaining modes (ECB, CBC).
Electronic codebook (ECB) mode
Figure 502. ECB encryption and decryption principle
ECB is the simplest mode of operation. There are no chaining operations, and no special
initialization stage. The message is divided into blocks and each block is encrypted or
decrypted separately.
Note: For decryption, a special key scheduling is required before processing the first block.
MSv42140V1
Encryption
Plaintext block 1 Plaintext block 2 Plaintext block 3
Ciphertext block 1 Ciphertext block 2 Ciphertext block 3
Encrypt Encrypt Encrypt
Decryption
key key key
Plaintext block 1 Plaintext block 2 Plaintext block 3
Ciphertext block 1 Ciphertext block 2 Ciphertext block 3
Decrypt Decrypt Decrypt
key key key
input
output
key
scheduling
Legend