UM10503
All information provided in this document is subject to legal disclaimers.
© NXP B.V. 2012. All rights reserved.
User manual
Rev. 1.3 — 6 July 2012
39 of 1269
NXP Semiconductors
UM10503
Chapter 5: LPC43xx Boot ROM
[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.
5.3.4 Boot image creation
5.3.4.1 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.
The authentication process works as follows:
1. Use the CMAC algorithm to generate the 128-bit tag. Truncate the tag to 64 MSB and
insert this truncated tag in the header.
2. At boot time the tag is recalculated. Authentication passes when the calculated tag is
equal to the received tag in the image header.
To generate an l-bit CMAC tag T of message M using a 128-bit block cipher AES and
secret key K, the CMAC tag generation process works as follows:
1. Generate sub key K
1
:
–
Calculate a temporary value K
0
= AES
K
(0).
–
If msb(K
0
) = 0 then K
1
= (K
0
<< 1) else K
1
= (K
0
<< 1)
0x87
2. Divide message into 128-bit blocks M = M
1
|| ... || M
n-1
|| M
n
*, where M
1
...M
n-1
are
complete blocks.
3. The last block, M
n
*, should be padded to be a complete block and then M
n
= K
1
M
n
*.
4. Let c
0
= 00...0.
5. For i = 1, ..., n, calculate c
i
= AES
K
(c
i-1
M
i
).
6. Output T = msb
l
(c
n
).
15:14
AES_CONTROL
These 2 bits can be set to a value such that
when AES encryption is active, that the
AES_ACTIVE field, after AES encryption, is
not equal to the value 0x1A (AES encryption
not active)
2
31:16
Size of the part of the image over which the
hash value is calculated in number of 512
Byte frames. Also size of image copied to
internal SRAM at boot time.
+ 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
Table 21.
Boot image header description
Address
Name
Description
size [bits]