Skip to content
Secure Boot

Secure Boot for embedded systems: Building a complete chain of trust

Editoral Team
Editoral Team

Learn how secure boot protects embedded startup and connects trust from hardware to application.


Content

 

  1. What is secure boot in embedded systems?
  2. Does your embedded product need secure boot?
  3. How a secure boot chain of trust works
  4. Building a complete secure boot architecture
  5. How KiviBoot extends the chain of trust
  6. From application build to verified startup: A Zynq-7000 example
  7. Secure boot checklist for embedded systems

1. What is secure boot in embedded systems?

Your device loads its firmware and starts the application. But what establishes that the software is authorized to run?

Secure boot verifies software before execution. It connects a protected starting point to the bootloaders and subsequent software components through a cryptographic chain of trust. If a required verification fails, the rejected component does not execute.
This matters because application-level security depends on the software that starts first. A replaced bootloader could skip firmware checks, expose credentials or start an unauthorized application before higher-level protection becomes active.

For developers, secure boot connects the software release process to device startup: authorized images are prepared and signed, and the device verifies them before use.
The principles apply across microcontrollers, application processors and FPGA-based systems. The platform determines how trust is initially established. The boot architecture determines how that trust reaches the application.


2. Does your embedded product need secure boot?

Secure boot is relevant whenever unauthorized changes to startup software could compromise the product’s behaviour, security or availability. The decision depends on how software can be changed and what would happen if an attacker controlled it.

2.1 When unauthorized firmware becomes a product risk

If your device loads firmware from writable flash, an attacker who replaces that image could change its behaviour without modifying the hardware. The risks extend beyond confidential user data:

  • Firmware tampering: Modified firmware could manipulate control functions, disable security checks or disrupt operation.
  • Unauthorized code execution: A replaced image could give malicious software control of the device during startup.
  • Data exposure: Compromised software could expose sensitive data, credentials or cryptographic keys.
  • IP theft: Reading or copying stored firmware could expose proprietary code.

Secure boot addresses tampering and unauthorized execution by checking software before it runs. It can also reduce the risk of data exposure through compromised startup software. Protecting stored code against extraction requires additional confidentiality measures, such as firmware encryption.

To assess your product’s needs, start with three questions:

  • Can software be changed or extracted? Consider updates, service interfaces, external memory and physical access.
  • What prevents unauthorized software from running? A CRC check can detect accidental corruption, but does not establish who authorized an image.
  • What would a compromise expose or affect? Assess device functions, proprietary code, credentials and connected systems.

Include the bootloader in this assessment: application verification provides little protection if an attacker can replace the component performing the check. A device without internet access can still be exposed through maintenance tools, storage or physical access. The need for secure boot therefore depends on the actual loading paths and consequences of compromise, rather than connectivity alone.

2.2 How regulations and security standards influence the decision

Security requirements can also make startup integrity a product requirement. The relevant framework depends on your market and application:

  • Cyber Resilience Act (CRA): Requires products within its scope to address cybersecurity risks, including unauthorized modification of programs and configuration. Secure boot can contribute to these integrity goals.
  • IEC 62443-4-2: Defines technical security requirements for industrial automation and control system components, including system integrity. The applicable requirements depend on the component and intended security capability.
  • NIST SP 800-193: Provides firmware-resiliency guidance covering protection, detection and secure recovery, placing secure boot within a broader security architecture.
  • IoT guidance: NISTIR 8259A and NIST SP 800-213 provide context for IoT security capabilities and requirements, including secure updates. SP 800-213 specifically addresses US federal agencies.

3. How a secure boot chain of trust works

A secure boot chain starts from protected verification logic and credentials. Each trusted stage then checks the next component before allowing execution to continue.
Before any firmware, bootloader or operating system is allowed to run, its authenticity and integrity are verified using cryptographic techniques. If verification fails, the boot process is halted or the device enters a secure recovery mode, preventing unauthorized code from executing. Many embedded platforms additionally support firmware or bitstream encryption to protect confidentiality.


Simplified chain showing a hardware root of trust verifying a bootloader, which verifies the application before execution. Failed verification blocks execution.A simplified secure boot chain: a hardware-protected trust anchor enables verification of the bootloader, which verifies the application before execution.


3.1 Why secure boot needs a hardware root of trust

Suppose your bootloader verifies the application’s signature. What prevents an attacker from replacing that bootloader with one that accepts any image?
The chain needs an immutable starting point that cannot be replaced through the same untrusted loading path. This foundation is commonly called the Hardware root of Trust (HRoT).

On many MCUs, the HRoT consists of a Boot ROM together with a public key or public key hash stored in protected hardware such as OTP memory or eFuses. FPGA and SoC FPGA platforms follow the same principle, although the Root of Trust may also involve secure configuration logic or dedicated security hardware.

3.2 Code signing

Before firmware is released, it is digitally signed using the manufacturer's private signing key. The signature is distributed together with the firmware image, while the corresponding public key is securely provisioned onto the target device. During startup, the device verifies the signature using this public key before execution continues.

In many production systems, manufacturers use a hierarchy of signing keys. A long-term root key establishes the device's trust anchor, while operational signing keys are used to sign firmware releases. This architecture simplifies key rotation and allows compromised signing keys to be revoked without replacing the device's HRoT.

3.3 Cryptographic Verification

Signature verification confirms two essential security properties:

  • Authenticity: the image was signed by a key accepted by the device’s trust policy
  • Integrity: the signed content has not changed since signing.

Unlike CRCs or simple hash comparisons, digital signatures protect against intentional manipulation because an attacker cannot generate a valid signature without the manufacturer's private signing key.

3.4 Authentication vs. encryption

Secure boot is often confused with firmware or bitstream encryption. Although both mechanisms are complementary, they solve different security problems.

Mechanism Main question
Authentication Is this image authorized, and has its authenticated content remained unchanged?
Encryption Is the image content protected against unauthorized disclosure?

An encrypted application is not automatically authenticated and an authenticated application is not necessarily confidential. A product may need both mechanisms, but the architecture must define their purposes and protect the associated keys.

3.5 Typical secure boot flow

The mechanisms described above come together during startup. While the exact implementation depends on the target platform, most secure boot architectures follow the same chain. This sequential verification process establishes the chain of trust, ensuring that every software component originates from a trusted source and has not been modified since it was signed.

In an RTOS-based system, the RTOS and application may be packaged in one image or loaded separately. The boot architecture must authenticate the required image or images before execution.

  1. Power-on and root of trust: After reset, protected startup mechanisms provide the trusted starting point for verification.
  2. Verification of the first component: The platform checks the authenticity and integrity of the initial bootloader, configuration or firmware before allowing it to execute or become active. Encrypted content is also decrypted where required.
  3. Extending the chain of trust: Each subsequent component is verified by an already trusted stage before use. This extends protection to the software and configuration covered by the boot policy.
  4. Secure startup and failure handling: Accepted components start in sequence. If a required check fails, the rejected component remains blocked and the system stops or follows an authenticated recovery path.

Example boot chain from power-on through a hardware root of trust, two bootloaders, an operating system and an application, with verification before each subsequent stage executes.

Example of a multistage secure boot chain. Each trusted stage verifies the next component before execution. The stages vary by platform and boot architecture.


4. Building a complete secure boot architecture

Embedded platforms offer security primitives such as Boot ROMs, OTP memory, cryptographic accelerators, protected key storage and, on many FPGA families, bitstream authentication and encryption. These capabilities provide a foundation for secure boot, but they do not automatically create a complete chain of trust. A production architecture connects platform protection to software verification, image preparation and lifecycle processes. Begin with the actual boot path: identify what the system loads, where it is stored and which component decides whether it may be used.

Implementation effort depends on the platform’s existing boot mechanisms, the bootloader and image formats, key provisioning, and update and recovery requirements. For a PLC, sensor hub or other embedded product, prepared reference software can simplify evaluation, but production integration still requires a review of the complete boot path and lifecycle policies.

4.1 Define the boot path and verification responsibilities

Typical architectural building blocks include:

  • a hardware-protected root of trust
  • secure provisioning of trusted keys or key hashes
  • code signing and protected private signing keys
  • image authentication and integrity verification
  • rollback protection
  • authenticated updates, recovery and fallback paths
  • signing key rotation and revocation mechanisms

The required scope follows the product’s threat model. For each component in the boot path, document:

  • Which trusted component verifies it
  • Which credential or trusted reference authorizes it
  • Which image content and metadata are covered
  • What determines acceptance and what happens if verification fails
  • How the accepted content remains protected before use

The scope may include bootloaders, application firmware, operating-system components and security-relevant configuration data. A signed application provides little protection if an attacker can replace its verifier or verification key without authorization. Image metadata matters too. A valid image for another product or hardware revision should not be accepted merely because it carries a recognized signature. Product identifiers, compatibility information and other acceptance-critical metadata must be authenticated and checked against the device’s policy. Private signing keys require protection in the release environment. The device’s trusted verification keys and any key-authorization or revocation data also need protection against unauthorized changes.

4.2 Connect platform protection to software verification

The implementation depends on the target platform, but the objective remains consistent: connect a protected starting point to verification of subsequent software and configuration.

The essential foundation is protected verification logic and trusted keys or key hashes. Dedicated cryptographic accelerators are not a general requirement: verification can run in software where the platform and boot-time budget permit. Image size, available processor resources and acceptable startup time determine whether acceleration is useful.

On MCU-based systems, an immutable Boot ROM may authenticate the initial bootloader using protected keys or key hashes. Other devices require a different protected starting point. Developers must connect this foundation to application verification, updates and recovery. On ARM devices that support TrustZone, correctly configured isolation can additionally protect security-critical services and restrict access to keys.

On FPGA-based systems, protecting the hardware configuration is essential when it establishes the processor and its initial execution environment. The bitstream configures the programmable logic and may include a softcore processor. Bitstream authentication checks the configuration’s authenticity and integrity, while encryption protects its confidentiality. Initial software included in the authenticated configuration may share that protection. Application firmware loaded separately afterwards requires its own verification before execution.

SoC FPGAs combine an integrated processor system with programmable logic. Their secure boot architecture must follow the actual startup sequence: the processor may start before the FPGA logic is configured. Processor boot components and FPGA configuration therefore need appropriate protection, with verification extending to subsequent software and security-relevant configuration.

fpga-configuration-and-software-trust

Protecting an FPGA configuration and authenticating separately loaded software cover distinct parts of the system. The figure shows protection scopes rather than a universal startup sequence.

Multiple bootloader stages can separate a small, protected initial verifier from more flexible, authenticated software stages. For application developers, the integration boundary is the image format and loading process through which the application is verified and started.

4.3 Plan for updates, recovery and rollback

A correctly signed image is not necessarily an acceptable image. An older release may carry a valid signature while containing a known vulnerability. Rollback protection therefore requires a version policy and appropriately protected state against which the device checks an image.

Recovery, service modes and alternative boot sources must preserve the required authentication checks. Damage to the normal image must not cause the device to execute an unchecked replacement.

The update process must define how images are authorized, installed and selected, including what happens if installation is interrupted. A fallback image must satisfy the applicable authentication and version policies too.

A complete architecture accounts for every component and loading path that can influence startup. It must also protect verified code against unauthorized modification before execution, so the device runs the content it actually checked.

For support with architecture and product integration, explore KiviCore’s secure boot and secure updates package, covering boot-chain review, update design and implementation support.


5. How KiviBoot extends the chain of trust

KiviBoot provides software bootloader components for extending the trust established by the target platform to subsequent software.
Its two-stage architecture separates initial startup from application loading and verification:

  • KiviBoot-NanoBL provides the initial software stage in protected on-chip memory and checks KiviBoot-SecureBL before transferring control.
  • KiviBoot-SecureBL loads the application image, performs the configured decryption and authenticity checks, and starts the application after successful verification.

Platform protection establishes a trusted entry into KiviBoot-NanoBL. NanoBL verifies SecureBL, which verifies the application. The two KiviBoot stages are grouped together.

KiviBoot-NanoBL verifies KiviBoot-SecureBL, which verifies the application image. The target platform must first establish a protected entry into NanoBL. The mechanism depends on the platform.

The initial boot components and credentials still require appropriate platform protection. KiviBoot integration therefore follows the selected processor, memory architecture and native boot mechanisms.

The variants address different application and processing requirements:

Variant Intended role
KiviBoot-Tiny Software-based cryptographic boot processing for suitable bare-metal and RTOS designs.
KiviBoot-Fast Software boot stages combined with AES and SHA acceleration in FPGA logic.
KiviBoot-Linux Integration of the KiviBoot stages and hardware-accelerated processing into a platform-specific Linux boot environment.

For Linux systems, the agreed verification scope determines which subsequent components are authenticated. Loading a component and authenticating it are distinct operations.

Explore the KiviBoot secure bootloader family to compare the architecture and variants.


6. From application build to verified startup: A Zynq-7000 example

For application developers, secure boot adds a defined image-preparation and acceptance process to the familiar build-and-deploy workflow.
You build the application, prepare its deployable image, sign it through the authorized process and provide it to the device. The boot software checks the image before starting it.

The KiviBoot-Tiny reference on the Digilent Arty Z7-20 illustrates this workflow on an AMD Zynq Z-7020. Its bootloader stages and application execute on the integrated Arm Cortex-A9 processor. Cryptographic boot processing runs in software, without dedicated AES or SHA accelerators in FPGA logic. Prepared boot components, a reference application and image-preparation tools provide a starting point for examining the workflow without first rebuilding the bootloaders.

Production integration additionally requires protected initial boot components, production credentials and defined update, recovery and rollback policies.

Read Secure boot on AMD Zynq Z-7020: Getting started with KiviBoot-Tiny to explore the architecture and application workflow.

From application build to verified startup

Explore how KiviBoot-Tiny connects application development, signed images and verified execution on AMD Zynq-7000. 

 


7. Secure boot checklist for embedded systems

Use these questions to review your design:

  • Need: What could unauthorized startup software do to the product or connected systems?
  • Trust anchor: How are the initial verifier and its trusted credentials protected?
  • Coverage: Which software and security-relevant configuration components are authenticated?
  • Release process: How are images prepared, signed and authorized for deployment?
  • Failure handling: What happens when verification fails?
  • Alternative paths: Do updates, recovery and service modes preserve the verification policy?
  • Rollback: Can an older, signed but vulnerable image still start?
  • Validation: Have rejection behaviour and alternative startup paths been tested?

A complete chain of trust gives each verification step a protected foundation. For developers, the goal is a documented connection between authorized software releases and the code the device actually executes.

Share this post