Figure 522. Ccm Mode Authenticated Encryption - ST STM32G4 Series Reference Manual

Advanced arm-based 32-bit mcus
Hide thumbs Also See for STM32G4 Series:
Table of Contents

Advertisement

RM0440
CCM processing
Figure 522
example). This mode is selected by writing 100 into the CHMOD[2:0] bitfield of the AES_CR
register.
(1) Init
AES_IVRx (CTR0)
mask
AES_IVRx (First block B0)
Encrypt
AES_KEYRx (KEY)
(2) Header
AES_DINR (associated
data block B1)
Swap
management
DATATYPE[1:0]
Encrypt
AES_KEYRx (KEY)
Legend
input
output
XOR
The data input to the generation-encryption process are a valid nonce, a valid payload
string, and a valid associated data string, all properly formatted. The CBC chaining
mechanism is applied to the formatted plaintext data to generate a MAC, with a known
length. Counter mode encryption that requires a sufficiently long sequence of counter blocks
as input, is applied to the payload string and separately to the MAC. The resulting ciphertext
C is the output of the generation-encryption process on plaintext P.
AES_IVRx registers are used for processing each data block, AES automatically
incrementing the CTR counter with a bit length defined by the first block B0.
shows how the application must load the B0 data.
Note:
The AES peripheral in CCM mode supports counters up to 64 bits, as specified by NIST.
describes the CCM implementation within the AES peripheral (encryption

Figure 522. CCM mode authenticated encryption

Counter
increment (+1)
AES_KEYRx (KEY)
AES_DINR (plaintext P1)
Swap
management
AES_DINR (associated
data last block Bu)
Swap
management
DATATYPE[1:0]
Encrypt
AES_KEYRx (KEY)
Block 1
AES_IVRx (CTR1)
Encrypt
S1
DATATYPE
[1:0]
DATATYPE
[1:0]
Swap
management
AES_DOUTR (ciphertext C1)
B
u+1
Encrypt
AES_KEYRx (KEY)
RM0440 Rev 1
AES hardware accelerator (AES)
Block m
(3) Payload
AES_IVRx (CTRm)
Counter
increment (+1)
AES_KEYRx (KEY)
AES_DINR (plaintext
last block Pm )
DATATYPE
Swap
[1:0]
management
DATATYPE
[1:0]
management
AES_DOUTR
(ciphertext last block Cm)
AES_KEYRx (KEY)
AES_DINR (CTR0)
S0
Encrypt
AES_DOUTR
AES_KEYRx (KEY)
Table 315
Encrypt
Sm
Swap
B
r
Encrypt
MAC (T)
(EncTAG)
(4) Final
MSv42152V1
1473/2083
1497

Advertisement

Table of Contents
loading
Need help?

Need help?

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

Subscribe to Our Youtube Channel

Table of Contents

Save PDF