
If no key is programmed in these registers, then an attempt is made to decrypt the file
using an all-zero key.
14.6.1 Decryption using MMCAU
The MMCAU code must flashed to the device memory in a separate step. The location of
MMCAU initialization, encryption, and decryption functions does not matter, as long as
it is on accessible memory. The provided functions are expected to have the following
prototypes:
void mmcau_aes_init(unsigned int* key, unsigned int* keySchedule, unsigned int* rcon);
void mmcau_aes_encrypt(unsigned int* in, unsigned int* key, unsigned int* keySchedule,
unsigned int* out);
void mmcau_aes_decrypt(unsigned int* in, unsigned int* key, unsigned int* keySchedule,
unsigned int* out);
NOTE
The mmCAU software library source code can be downloaded
from
In order to decrypt an encrypted SB file using the MMCAU peripheral, the following
information must be provided:
• The Bootloader Configuration Area (BCA) contains a pointer to an MMCAU set-up
structure. The location in the configuration area (relative to the BCA) is at offset
0x20, as shown in the BCA layout in this document. The pointer is a little endian
memory location that contains the following structure:
typedef struct mmcau_function_info
{
uint32_t tag;
uint32_t length;
uint32_t aes_init_start;
uint32_t aes_encrypt_start;
uint32_t aes_decrypt_start;
} mmcau_function_info_t;
For decryption to work properly, the mmcau_function_info structure must contain
valid values for all the fields in this structure:
a. The tag field must equal 'kcau'.
b. The length field must equal the size of the total length of the aes_init,
aes_encrypt, and aes_decrypt functions. All of these function must be in a
contiguous region of memory that fits within 1280 bytes. All code in the
functions must be relocatable.
c. aes_init_start contains the memory location of the aes_init function.
d. aes_encrypt_start contains the memory location of the aes_encrypt function.
e. aes_decrypt_start contains the memory location of the aes_decrypt function.
Chapter 14 Kinetis ROM Bootloader
K32 L2A Reference Manual, Rev. 2, 01/2020
NXP Semiconductors
317
Содержание K32 L2A Series
Страница 2: ...K32 L2A Reference Manual Rev 2 01 2020 2 NXP Semiconductors...
Страница 42: ...K32 L2A Reference Manual Rev 2 01 2020 42 NXP Semiconductors...
Страница 122: ...Flash Memory Clock K32 L2A Reference Manual Rev 2 01 2020 122 NXP Semiconductors...
Страница 146: ...Module operation in low power modes K32 L2A Reference Manual Rev 2 01 2020 146 NXP Semiconductors...
Страница 158: ...Debug and security K32 L2A Reference Manual Rev 2 01 2020 158 NXP Semiconductors...
Страница 174: ...Module Signal Description Tables K32 L2A Reference Manual Rev 2 01 2020 174 NXP Semiconductors...
Страница 246: ...Application information K32 L2A Reference Manual Rev 2 01 2020 246 NXP Semiconductors...
Страница 322: ...Kinetis Bootloader Status Error Codes K32 L2A Reference Manual Rev 2 01 2020 322 NXP Semiconductors...
Страница 344: ...Application initialization information K32 L2A Reference Manual Rev 2 01 2020 344 NXP Semiconductors...
Страница 374: ...CMP Trigger Mode K32 L2A Reference Manual Rev 2 01 2020 374 NXP Semiconductors...
Страница 384: ...Functional description K32 L2A Reference Manual Rev 2 01 2020 384 NXP Semiconductors...
Страница 592: ...Application Information K32 L2A Reference Manual Rev 2 01 2020 592 NXP Semiconductors...
Страница 602: ...Initialization and application information K32 L2A Reference Manual Rev 2 01 2020 602 NXP Semiconductors...
Страница 656: ...Functional Description K32 L2A Reference Manual Rev 2 01 2020 656 NXP Semiconductors...
Страница 664: ...Functional Description K32 L2A Reference Manual Rev 2 01 2020 664 NXP Semiconductors...
Страница 744: ...Functional description K32 L2A Reference Manual Rev 2 01 2020 744 NXP Semiconductors...
Страница 762: ...Functional description K32 L2A Reference Manual Rev 2 01 2020 762 NXP Semiconductors...
Страница 806: ...Functional description K32 L2A Reference Manual Rev 2 01 2020 806 NXP Semiconductors...
Страница 868: ...Integer square root K32 L2A Reference Manual Rev 2 01 2020 868 NXP Semiconductors...
Страница 976: ...Functional description K32 L2A Reference Manual Rev 2 01 2020 976 NXP Semiconductors...
Страница 1012: ...Functional description K32 L2A Reference Manual Rev 2 01 2020 1012 NXP Semiconductors...
Страница 1094: ...Functional description K32 L2A Reference Manual Rev 2 01 2020 1094 NXP Semiconductors...
Страница 1132: ...Functional description K32 L2A Reference Manual Rev 2 01 2020 1132 NXP Semiconductors...
Страница 1182: ...Functional description K32 L2A Reference Manual Rev 2 01 2020 1182 NXP Semiconductors...
Страница 1290: ...Functional description K32 L2A Reference Manual Rev 2 01 2020 1290 NXP Semiconductors...
Страница 1344: ...USB Voltage Regulator Module Signal Descriptions K32 L2A Reference Manual Rev 2 01 2020 1344 NXP Semiconductors...
Страница 1356: ...Initialization Application Information K32 L2A Reference Manual Rev 2 01 2020 1356 NXP Semiconductors...