Embedded Secure Boot and Chain of Trust
Embedded secure boot checks firmware before a device runs it. A protected first stage verifies the next image with a trusted public key, and each later stage checks what it loads. This prevents an altered image from entering the boot chain, provided the first stage, keys, and policy are protected.
itComputer architecture and hardware | OpenSkills.info
Course pathWalk it in order
Look it upDip in anytime
Go furtherLeaves this page
Don't Panic
Don't Panic: Embedded Secure Boot and Chain of Trust
A device starts with a rather awkward problem: before it can trust software, it has to run some software. Secure boot solves the part it can solve by starting in code and key material that ordinary firmware updates cannot replace. That first stage checks the next image before letting it run. Each checked stage can then check the one after it. There is your chain of trust, with considerably less ceremony than the name suggests.
The catch is at the beginning. If the first bootloader lives in writable flash and nothing checks it, an attacker can replace the referee. A perfectly signed application below it becomes a decorative feature. The root of trust is the protected starting point: often boot ROM or write-protected code plus a public key or key hash. The private signing key lives outside the device. The device needs to recognize authorized signatures, not produce them.
A signature is a permission slip for the covered bytes under a particular key. It is not a claim that the code is bug-free. It also is not a freshness stamp. An old image with a valid signature can be dangerous if that release has a known flaw. A security counter, stored where normal firmware cannot reset it, can set the oldest acceptable generation. This sounds tidy until a failed update needs the previous image and that image is now below the floor. Recovery and counter advancement need to be planned together.
Updates introduce another pair of jobs that look alike from a distance. The updater places a candidate in storage; the bootloader decides if it may execute. A second slot can preserve a previous image while the candidate starts. The candidate may need to confirm that it actually works. That confirmation helps availability. It does not make an old signed image safe against downgrade. The recovery image needs its own signature and policy check, because recovery code is still code.
On one board the chain might be ROM, bootloader, application. On another it might extend through a Linux kernel, device tree, and root filesystem. The names vary, but one question travels well: which protected stage checked this image before execution? If the answer disappears at any handoff, so does the chain.
For the compact map, open Slides. Use the Cheatsheet when you need the stage inventory and failure matrix. The Practice Reference turns that map into questions for a real board, and the Reference links take you to the platform-specific rules. Start with the board's own boot ROM and key-provisioning manual before touching irreversible device state.
Where this skill leads
Relevant careers
See how this topic contributes to broader role-level skill maps.
Sources
- https://csrc.nist.gov/pubs/sp/800/193/final
Supports
- Protection, detection, and recovery as separate firmware resilience functions
- Authenticated recovery paths and roots of trust
- Course update-source reference
- https://datatracker.ietf.org/doc/html/rfc9019
Supports
- Separation of firmware delivery, manifests, verification, and boot
- Firmware verifier role in secure boot
- https://tf-m.docs.trustedfirmware.org/en/latest/design_docs/booting/tfm_secure_boot.html
Supports
- Immutable first stage and root of trust public key requirements
- Authenticated image handoffs and trusted rollback counter
- Quiz answers about the chain anchor and downgrade rejection
- https://tf-m.docs.trustedfirmware.org/en/tf-mv2.3.0/design_docs/booting/bl1.html
Supports
- ROM first stage and second-stage verification
- Alternate image slots and counter checks
- https://docs.mcuboot.com/design.html
Supports
- Signed-image verification, image slots, swap, and boot confirmation
- Boot key and image metadata roles
- Failure-path and quiz answers
- https://github.com/mcu-tools/mcuboot/blob/main/docs/signed_images.md
Supports
- Separation of production private signing key and device public verification material
- Field note about provisioning custody
- https://docs.espressif.com/projects/esp-idf/en/stable/esp32/security/secure-boot-v2.html
Supports
- ROM to bootloader to application verification sequence on supported ESP32 revisions
- eFuse-backed key digest and rejection behavior
- https://docs.u-boot.org/en/latest/usage/fit/signature.html
Supports
- Verification of FIT images and selected configurations
- Later-stage embedded Linux handoff example
- https://www.wolfssl.com/documentation/manuals/wolfboot/
Supports
- wolfBoot as a microcontroller secure bootloader option
- https://github.com/wolfSSL/wolfBoot
Supports
- GPL-licensed source and product identity
- https://www.trustedfirmware.org/projects/tf-m/
Supports
- TF-M product identity and supported architecture context
- https://github.com/sindresorhus/awesome
Supports
- Discovery route to Embedded and IoT Security list
- https://github.com/hexsecs/awesome-embedded-security
Supports
- MCUboot, U-Boot, Binwalk, unblob, and related ecosystem link discovery
- https://github.com/ReFirmLabs/binwalk
Supports
- Firmware structure identification and extraction
- Awesome Links rationale
- https://unblob.org/
Supports
- Firmware chunk extraction and format coverage
- Awesome Links rationale
- https://openocd.org/pages/documentation.html
Supports
- Debug adapter and flash interface documentation
- Awesome Links rationale
