14.3 Secure Boot Mode
In Secure boot mode, the ROM code authenticates the user application before execution. If the ROM code fails to authenticate the user application , then this user application is not executed and either:
- the Secure SAM-BA Monitor is run (boot mode is 0b1010)
- the ROM code halts, running an endless loop (boot mode is 0b1100)
A cryptographic signature is appended to the user application in the internal Flash. The ROM code verifies this signature based on cryptographic data and algorithm choice stored in the first two 512-byte pages of the User Signature Block 0 (USB0) in SEFC0.
| Byte Offset | Bits[127:96] | Bits[95:64] | Bits[63:32] | Bits[31:0] |
|---|---|---|---|---|
| 0x000 | Reserved | |||
| 0x010 | ||||
| 0x020 | AES_256_CMAC_KEY | |||
| 0x030 | ||||
| 0x040 | Reserved | |||
| … | ||||
| 0x1F0 | ||||
AES_256_CMAC_KEY
256-bit secret key that the ROM code uses to compute the AES-CMAC signature of the user application before comparing it to the signature appended to the user application in the internal Flash. This private key is only used if AUTH_TYPE is 0 in USB0 page1.
| Byte Offset | Bits[127:96] | Bits[95:64] | Bits[63:32] | Bits[31:0] |
|---|---|---|---|---|
| 0x000 | PUBLIC_KEY_DIGEST | |||
| 0x010 | ||||
| 0x020 | ||||
| 0x030 | ||||
| 0x040 | Reserved | |||
| 0x050 | ||||
| 0x060 | Reserved | AUTH_TYPE | ||
| … | ||||
| 0x1F0 | Reserved | |||
PUBLIC_KEY_DIGEST:
SHA-512 digest of the X.509 root certificate in DER format. This public key digest is used by the ROM code only when AUTH_TYPE is 1. A chain of X.509 certificates in DER format is appended to the user application signature. The root certificate is the first certificate in this chain.
AUTH_TYPE: Authentication Type
Selects the cryptographic algorithm to be used for the user application authentication.
| Value | Description |
|---|---|
| 0 | AES-256-CMAC algorithm |
| 1 | Public Key algorithm (RSA or ECDSA) |
| Others | The ROM code fails to authenticate the user application |
