GD32W51x User Manual
933
Figure 27-8. AES ECB encryption
SWAP
CAU_DI
DATAM
AEA, encrypt
CAU_KEY0...3
SWAP
CAU_DO
Plaintext
Ciphertext
AES-ECB mode decryption
First of all, the key derivation must be completed to prepare the decryption keys, the input
key of the key schedule is the same to that used in encryption. The last round key obtained
from the above operation is then used as the first round key in the dec ryption. After the key
derivation, the 128-bit input ciphertext is first obtained after data swapping according to the
data type. The input data block is read in the AEA and decrypted using keys prepared above.
The output is then swapped back according to the data type again, and a 128-bit plaintext is
produced. The procedure of AES ECB mode decryption is illustrated in
.
Figure 27-9. AES ECB decryption
SWAP
CAU_DI
DATAM
AEA, decrypt
CAU_KEY0..3
SWAP
CAU_DO
Ciphertext
Plaintext