![NXP Semiconductors LPC43Sxx Скачать руководство пользователя страница 114](http://html1.mh-extra.com/html/nxp-semiconductors/lpc43sxx/lpc43sxx_user-manual_1721827114.webp)
UM10503
All information provided in this document is subject to legal disclaimers.
© NXP B.V. 2015. All rights reserved.
User manual
Rev. 2.1 — 10 December 2015
114 of 1441
NXP Semiconductors
UM10503
Chapter 8: LPC43Sxx Security API
8.5.6 Storing AES keys in Deep power-down mode
In Deep power-down mode, all AES information is lost. After wake-up, the AES keys need
to be reloaded. If you want to use the same RNG key as before entering Deep
power-down mode, then you can store the RNG key in the backup registers at
0x4004 0000. Process the AES keys in the following order:
1. Generate a random number by calling the otp_GenRand() API.
2. Read the 128-bit random number at the following addresses: the addresses are
located in the OTP controller memory space - not in the physical otp memory.
–
Bits 31:0 at location 0x4004 5050
–
Bits 63:32 at location 0x4004 5054
–
Bits 95:64 at location 0x4004 5058
–
Bits 127:96 at location 0x4004 505C
3. Store this number in the RTC REGFILE registers.
4. Load this number in the AES engine using aes_LoadKeySW.
After every wake-up, perform the following operations:
1. Load the stored random number from the backup register.
2. Load this number in the AES engine using aes_LoadKeySW.
Fig 32. AES endianness
aaa-020544
0
RAM Offset
1
2
3
4
5
6
7
8
9
A
B
C
D
E
F
0F
IV: 000102030405060708090a0b0c0d0e0f
IV and Key: Always little endian
0E 0D 0C 0B 0A 09 08 07 06 05 04 03 02 01 00
3C
Key: 2b7e151628aed2a6abf7158809cf4f3c
4F CF 09 88 15 F7 AB A6 D2 AE 28 16 15 7E 2B
2A
Plain: 6bc1bee22e409f96e93d7e117393172a
Plain/Cipher: ROM API requires little endian
17 93 73
11 7E 3D E9 96 9F 40 2E E2 BE C1 6B
7D
Cipher: 7649abac8119b246cee98e9b12e9197d
19 E9 12 9B 8E E9 CE 46 B2 19 81 AC AB 49 76