Download Print this page

Mode 2: Key Derivation - ST STM32F413 Reference Manual

Advanced arm-based 32-bit mcus
Hide thumbs Also See for STM32F413:

Advertisement

RM0430
24.9.2

Mode 2: key derivation

1.
Disable the AES by resetting the EN bit in the AES_CR register.
2.
Configure mode 2 by programming MODE[1:0] = 01 in the AES_CR register.
Note:
CHMOD[2:0] bits are not significant in this case because this key derivation mode is
independent from the chaining algorithm selected.
3.
Select key length 128-bit or 256-bit via KEYSIZE bits configuration in AES_CR register.
4.
Write the AES_KEYRx registers with the encryption key to obtain the derivative key. A
write to the AES_IVRx has no effect.
5.
Enable the AES by setting the EN bit in the AES_CR register.
6.
Wait until the CCF flag is set in the AES_SR register.
7.
The derivation key is put automatically into the AES_KEYRx registers. Read the
AES_KEYRx registers to obtain the decryption key if needed. The AES is disabled by
hardware. To restart a derivation key calculation, repeat steps 3, 4, 5 and 6.
Advanced encryption standard hardware accelerator (AES)
Figure 235. Mode 1: encryption with 128-bit key length
Figure 236. Mode 2: key derivation with 128-bit key length
DocID029473 Rev 3
697/1284
715

Advertisement

loading
Need help?

Need help?

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

Questions and answers

Subscribe to Our Youtube Channel

This manual is also suitable for:

Stm32f423