Figure 109. Ecb Encryption; Figure 110. Ecb Decryption - STMicroelectronics STM32WL5 Series Reference Manual

Advanced arm-based 32-bit mcus with sub-ghz radio solution
Table of Contents

Advertisement

RM0453
Figure 109
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 110
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.
In ECB decrypt mode, the 128-bit ciphertext input data block C1 in the AES_DINR register
first goes through bit/byte/half-word swapping. The keying sequence is reversed compared
to that of the ECB encryption. The swap result I1 is processed with the AES core set in
decrypt mode, using the formerly prepared decryption key. The decryption result goes
through bit/byte/half-word swapping, then is stored in the AES_DOUTR register as 128-bit
plaintext output data block P1. The ECB decryption continues in this way until the last
complete ciphertext block is decrypted.
illustrates the electronic codebook (ECB) encryption.

Figure 109. 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 110. ECB decryption

AES_DINR (ciphertext C1)
DATATYPE[1:0]
AES_KEYRx (KEY)
DATATYPE[1:0]
AES_DOUTR (plaintext P1)
RM0453 Rev 5
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
AES hardware accelerator (AES)
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)
I2
O2
MSv19105V2
I2
O2
MSv19106V2
659/1450
694

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the STM32WL5 Series and is the answer not in the manual?

Questions and answers

This manual is also suitable for:

Stm32wl55 seriesStm32wl54 series

Table of Contents