ST STM32L4 5 Series Reference Manual page 830

Advanced arm-based 32-bit mcus
Table of Contents

Advertisement

Advanced encryption standard hardware accelerator (AES)
Note:
In this stage, no output is provided in AES_DOUTR register.
d)
e)
f)
g)
h)
i)
j)
CMAC Final Phase: in this last step, we generate the authorization tag.
Note:
In this stage, The authorization tag of the message is provided in AES_DOUTR register.
k)
l)
m) Wait until computation flag CCF is set in AES_SR.
n)
o)
p)
Note:
1
The hardware does not manage the formatting operation of the original B0 and B1, the latter
having to contain the header length. This task must be handled by software.
2
No need to disable/enable AES processor when moving from header phase to tag phase.
3
The software should filter the Auth Tag output with tag length to obtain the valid TAG.
Suspend mode in CMAC mode
In CMAC algorithm, suspend mode can be performed only during header phase. It is
advised to not use suspend mode in tag phase since suspend mode has no benefit in this
phase:
830/1830
Set GCMPH="01" in AES_CR to indicate that we are in the header phase.
Enable the AES by setting EN bit in AES_CR.
Insert B0 for first transfer, and then B for further transfers.
Write 4 times the header message into AES_DINR register.
Wait until the computation flag CCF (AES_SR) is set (or use the corresponding
interrupt).
Erase CCF by setting CCFC in AES_CR.
Repeat (g), (h), and (i) until each of the header blocks is inserted. Alternatively,
DMA may be used.
Choose the combination GCMPH[1:0] = 11 in AES_CR.
Write 4 times the input into the AES_DIN register: the input must be the 128-bit
value formatted from the original B0 packet.(i.e bits [7:3] of B0 should be forced to
zero value).
Read 4 times the AES_DOUTR: the output is the "auth tag".
Erase the flag by raising CCFC bit in AES_CR.
Disable AES.
DocID024597 Rev 5
RM0351

Advertisement

Table of Contents
loading
Need help?

Need help?

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

Table of Contents

Save PDF