![NXP Semiconductors LPC43Sxx Скачать руководство пользователя страница 103](http://html1.mh-extra.com/html/nxp-semiconductors/lpc43sxx/lpc43sxx_user-manual_1721827103.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
103 of 1441
NXP Semiconductors
UM10503
Chapter 7: LPC43Sxx Boot ROM for secure parts
Once the AES key1 is programmed in the OTP, the development mode is terminated and
JTAG access is automatically disabled for flashless parts.
7.3.3 Boot image header format
AES capable products with a programmed AES key1 will always boot from a secure
image and use CMAC authentication. A secure image should always include a header.
The image must be preceded by a header that has the layout described in
. For
encrypted images the header must be encrypted with the AES user key1 and initialization
vector iv = 0. The user key is stored in the OTP (see
Remark:
All values except 0x1A in the AES_ACTIVE field in the encrypted header are
considered valid. If the AES_ACTIVE field in the encrypted header has the value 0x1A
(AES encryption not active), then the header should be changed such that the
AES_ACTIVE field is not equal to 0x1A. A change in one of the AES_CONTROL bits will
produce an alternative value. The correct mechanism when creating an encrypted header
is to try every possible value in AES_CONTROL until the encrypted version does not
contain the value 0x1A in the AES_ACTIVE field.
[1]
Can only be active if device is AES capable, else is considered an invalid image.
[2]
16 extra bytes are required for the header bytes.
[3]
The image size should be set to no more than the size of the SRAM located at 0x1000 0000.
7.3.4 CMAC
The CMAC algorithm is used to calculate a tag which is used for image authentication.
The tag is stored in the header field HASH_VALUE.
Table 74.
Boot image header description
Address
Name
Description
size [bits]
5:0
AES_ACTIVE
AES encryption active
0x25 (100101): AES encryption active
0x1A (011010): AES encryption not active
all other values: invalid image
6
7:6
HASH_ACTIVE
Indicates whether a hash is used:
00: CMAC hash is used, value is HASH_VALUE
01: reserved
10: reserved
11: no hash is used
2
15:8
AES_CONTROL
When AES encryption is active, these bits can be set to a
value such that the AES_ACTIVE field after AES encryption is
not equal to the value 0x1A (AES encryption not active).
8
31:16
HASH_SIZE
Size of the part of the image over which the hash value is
calculated in number of 512 Byte frames. Also size of the
image copied to internal SRAM.
Hash size = 16
+ HASH_SIZE x 512 Byte.
16
95:32
HASH_VALUE
CMAC hash value calculated over the first bytes of the image
(starting right from the header) as indicated by HASH_SIZE.
The value is truncated to the 64 MSB.
64
127:96
RESERVED
11...11 (binary)
32