Aes Key Register 0 (Aes_Keyr0) - ST STM32L0x3 Reference Manual

Ultra-low-power advanced arm-based 32-bit mcus
Table of Contents

Advertisement

AES hardware accelerator (AES)
Bits 31:0 DOUT[x+31:x]: One of four 32-bit words of a 128-bit output data block being read from the peripheral
This bitfield fetches a 32-bit output buffer. A 4-fold sequential read of this bitfield, upon the
computation completion (CCF set), virtually reads a complete 128-bit block of output data from the
AES peripheral. Before reaching the output buffer, the data produced by the AES core are handled
by the data swap block according to the DATATYPE[1:0] bitfield.
The substitution for DOUT[x+31:x], from the first to the fourth read operation, is: 96, 64, 32, and 0. In
other words, data from the first to the fourth read operation are: DOUT[127:96], DOUT[95:64],
DOUT[63:32], and DOUT[31:0].
The data signification of the output data block depends on the AES operating mode:
- Mode 1 (encryption): ciphertext
- Mode 2 (key derivation): the bitfield is not used (AES_KEYRx registers used for output).
- Mode 3 (decryption) and Mode 4 (key derivation then single decryption): plaintext
The data swap operation is described in
page
451.
19.7.5

AES key register 0 (AES_KEYR0)

Address offset: 0x10
Reset value: 0x0000 0000
31
30
29
rw
rw
rw
15
14
13
rw
rw
rw
Bits 31:0 KEY[31:0]: Cryptographic key, bits [31:0]
This bitfield contains the bits [31:0] of the AES encryption or decryption key, depending on the
operating mode:
- In Mode 1 (encryption), Mode 2 (key derivation) and Mode 4 (key derivation then single
decryption): the value to write into the bitfield is the encryption key.
- In Mode 3 (decryption): the value to write into the bitfield is the encryption key to be derived before
being used for decryption. After writing the encryption key into the bitfield, its reading before
enabling AES returns the same value. Its reading after enabling AES and after the CCF flag is set
returns the decryption key derived from the encryption key.
Note: In mode 4 (key derivation then single decryption) the bitfield always contains the encryption
key.
The AES_KEYRx registers may be written only when the AES peripheral is disabled.
Refer to
Section 19.4.11: AES key registers on page 453
462/1043
28
27
26
25
rw
rw
rw
rw
12
11
10
9
rw
rw
rw
rw
Section 19.4.10: AES data registers and data swapping on
24
23
22
KEY[31:16]
rw
rw
rw
8
7
6
KEY[15:0]
rw
rw
rw
for more details.
RM0367 Rev 7
21
20
19
18
rw
rw
rw
rw
5
4
3
2
rw
rw
rw
rw
RM0367
17
16
rw
rw
1
0
rw
rw

Advertisement

Table of Contents
loading
Need help?

Need help?

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

Table of Contents