What is secure boot and a chain of trust?
Short answer: Secure boot means each boot stage cryptographically verifies the next stage before running it, starting from code that cannot be changed (the boot ROM) and a key that cannot be changed (a hash of the public key burned into one-time-programmable fuses). If any check fails, the boot stops. The chain of trust extends from the ROM through the bootloaders and kernel to the root filesystem.
A typical ARM chain
- Boot ROM (immutable) reads the public key hash from OTP fuses and verifies the signature on the first-stage loader (SPL / BL2).
- The first stage verifies TF-A BL31, OP-TEE and U-Boot.
- U-Boot verifies a signed FIT image containing the kernel, DTB and initramfs (
CONFIG_FIT_SIGNATURE, key embedded in U-Boot's own DTB). - The kernel verifies the root filesystem with dm-verity (a hash tree checked on every block read; the root hash is signed or embedded in the signed initramfs/command line), and signed kernel modules.
- Optionally IMA/EVM or signed application packages extend trust into user space.
Signing vs encryption: secure boot is about authenticity (signatures). Encrypting images (for IP protection) is a separate feature that uses device-unique keys.
Important practical points
- Fuses are irreversible. Burning the key hash and then the "secure boot closed" fuse makes the device reject unsigned images forever. Test on development parts, and follow a manufacturing procedure.
- Key protection: the private signing keys live in an HSM or a secure signing server, never on a developer laptop or in the repository. Plan key revocation (most SoCs allow several key slots).
- Close the side doors: disable or lock JTAG, the U-Boot console and environment (or make the environment read-only), USB recovery modes, and
init=/bootargschanges. Otherwise an attacker bypasses the checks rather than breaking them. - Anti-rollback: version counters in fuses or eMMC RPMB stop signed but old, vulnerable images from being installed.
Related terms: "verified boot" (Android, Chrome OS), "measured boot" (each stage is hashed into a TPM so a remote server can check what booted, without blocking boot), and UEFI Secure Boot on PCs and servers.