7 Securing the at91bootstrap Program
Once the at91bootstrap program successfully boots the u-boot.cip file, you can create a secure at91bootstrap binary named boot.cip from the boot.bin file. Similar to the uboot.cip file, which requires an application key, the at91bootstrap program requires a "customer key". This key is stored in OTP fuses and is used by the ROM code to authenticate and decrypt the at91bootstrap image.
The customer key is derived to produce an AES-CBC encryption key (used for decryption) and, if AES-CMAC authentication is selected, an AES-CMAC key (used for authentication). If RSA authentication is selected, the public key extracted from the last certificate in the chain is used to verify the RSA PKCS#1 v1.5 signature on the encrypted image. The customer key is then only used for AES-CBC decryption.
In both cases, the ROM code first authenticates the encrypted at91bootstrap image, and only proceeds to AES-CBC decryption if authentication passes. Two authentication methods are available — AES-CMAC or RSA PKCS#1 v1.5 — but only one can be configured per device. Both methods are described below.
