22 AES Accelerator (AES)
22 AES Accelerator (AES)
22.1 Introduction
The AES Accelerator speeds up AES operations significantly, compared to AES algorithms implemented solely
in software. The AES Accelerator supports six algorithms of FIPS PUB 197, specifically AES-128, AES-192 and
AES-256 encryption and decryption.
22.2 Features
• Supports AES-128 encryption and decryption
• Supports AES-192 encryption and decryption
• Supports AES-256 encryption and decryption
• Supports four variations of key endianness and four variations of text endianness
22.3 Functional Description
22.3.1 AES Algorithm Operations
The AES Accelerator supports six algorithms of FIPS PUB 197, specifically AES-128, AES-192 and AES-256 en-
cryption and decryption. The AES_MODE_REG register can be configured to different values to enable different
algorithm operations, as shown in Table 22-1.
AES_MODE_REG[2:0]
0
1
2
4
5
6
22.3.2 Key, Plaintext and Ciphertext
The encryption or decryption key is stored in AES_KEY_n_REG, which is a set of eight 32-bit registers. For
AES-128 encryption/decryption, the 128-bit key is stored in AES_KEY_0_REG ~ AES_KEY_3_REG. For AES-192
encryption/decryption, the 192-bit key is stored in AES_KEY_0_REG ~ AES_KEY_5_REG. For AES-256 encryp-
tion/decryption, the 256-bit key is stored in AES_KEY_0_REG ~ AES_KEY_7_REG.
Plaintext and ciphertext is stored in the AES_TEXT_m_REG registers. There are four 32-bit registers. To enable
AES-128/192/256 encryption, initialize the AES_TEXT_m_REG registers with plaintext before encryption. When
encryption is finished, the AES Accelerator will store back the resulting ciphertext in the AES_TEXT_m_REG
registers. To enable AES-128/192/256 decryption, initialize the AES_TEXT_m_REG registers with ciphertext be-
fore decryption. When decryption is finished, the AES Accelerator will store back the resulting plaintext in the
AES_TEXT_m_REG registers.
22.3.3 Endianness
Key Endianness
Espressif Systems
Table 22-1. Operation Mode
Operation
AES-128 Encryption
AES-192 Encryption
AES-256 Encryption
AES-128 Decryption
AES-192 Decryption
AES-256 Decryption
583
Submit Documentation Feedback
ESP32 TRM (Version 5.2)
Need help?
Do you have a question about the ESP32 and is the answer not in the manual?