Figure 104. Ctr Encryption And Decryption Principle - ST STM32WL5 Series Reference Manual

Advanced arm-based 32-bit mcus with sub-ghz radio solution
Hide thumbs Also See for STM32WL5 Series:
Table of Contents

Advertisement

RM0453
Counter (CTR) mode
Legend
The CTR mode uses the AES core to generate a key stream. The keys are then XORed
with the plaintext to obtain the ciphertext as specified in NIST Special Publication 800-38A,
Recommendation for Block Cipher Modes of Operation.
Note:
Unlike with ECB and CBC modes, no key scheduling is required for the CTR decryption,
since in this chaining scheme the AES core is always used in encryption mode for producing
the key stream, or counter blocks.

Figure 104. CTR encryption and decryption principle

Counter
key
Encrypt
Plaintext block 1
Ciphertext block 1
Counter
key
Decrypt
input
output
Plaintext block 1
XOR
Ciphertext block 1
Encryption
+1
Counter
value
value + 1
key
Encrypt
Plaintext block 2
Ciphertext block 2
Decryption
+1
Counter
value
value + 1
key
Decrypt
Plaintext block 2
Ciphertext block 2
RM0453 Rev 1
AES hardware accelerator (AES)
+1
Counter
value + 2
key
Encrypt
Plaintext block 3
Ciphertext block 3
+1
Counter
value + 2
key
Decrypt
Plaintext block 3
Ciphertext block 3
MSv42142V1
655/1461
698

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

Table of Contents

Save PDF