Semiconductor

Secure Boot and Firmware Authentication in Modern Microcontrollers

Industry Inspire Editorial Team Published Oct 24, 2026 Updated Oct 24, 2026 5 min read

A connected microcontroller may execute firmware for:

  • motor control,
  • sensing,
  • communications,
  • industrial automation,
  • IoT.

If an attacker can replace that firmware, almost every other security mechanism can be bypassed.

Secure boot addresses this problem.

Its purpose is simple:

run only firmware that the device is authorized to trust.

Fundamentals and Technology Overview

What Is Secure Boot?

Secure boot is a startup process that authenticates software before execution.

A typical chain is:

Boot ROM → Bootloader → Application Firmware

Each stage verifies the next stage.

Firmware Authentication

Firmware authentication verifies that the software came from an approved signer.

This commonly uses:

  • digital signatures,
  • public-key cryptography.

Integrity vs Authenticity

Integrity

Confirms firmware has not changed.

Authenticity

Confirms the firmware was signed by an approved authority.

A cryptographic hash provides integrity information.

A digital signature adds authentication.

Root Public Key

The device needs a trusted public key or trust anchor.

It may be stored in:

  • ROM,
  • OTP,
  • secure element,
  • protected Flash.

Boot ROM

Boot ROM is useful because it is:

  • immutable after manufacturing.

This makes it a strong first verification stage.

Secure Boot Flow

A simplified flow is:

  1. reset,
  2. boot ROM starts,
  3. firmware header is read,
  4. hash is calculated,
  5. digital signature is verified,
  6. version policy is checked,
  7. firmware runs only if valid.

Digital Signatures

Common signature systems include:

  • ECDSA,
  • RSA.

Newer devices are beginning to incorporate:

  • post-quantum signature verification.

Hashing

Hash algorithms such as SHA-256 produce a fixed-size digest of firmware.

Any firmware modification changes the hash.

Encryption vs Authentication

Firmware encryption hides the code.

Firmware authentication proves:

  • integrity,
  • origin.

A secure system may use both.

Secure Firmware Install

Manufacturing also creates security risk.

A contract manufacturer may have access to:

  • firmware binaries,
  • programming infrastructure.

ST's Secure Firmware Install mechanism protects firmware confidentiality and authenticity during programming into STM32 devices.

Secure Firmware Update

A device should authenticate every field update.

Never assume an update is trusted simply because it arrived through:

  • HTTPS,
  • USB,
  • local network.

The image itself should be cryptographically verified.

Safety, Security, and Reliability

OTA Update Flow

A secure OTA process may:

  1. download candidate firmware,
  2. verify signature,
  3. verify version,
  4. write inactive bank,
  5. boot test,
  6. commit,
  7. roll back if necessary.

Dual-Bank Flash

Dual-bank memory allows:

  • old firmware in one bank,
  • new firmware in another.

This improves update resilience.

Rollback Protection

An attacker may install a legitimate but old vulnerable image.

Anti-rollback mechanisms compare:

  • version number,
  • monotonic counter.

Key Revocation

If a signing key is compromised, the product needs a way to stop trusting it.

Recovery Mode

Secure recovery should also be authenticated.

An unsecured recovery loader can become a bypass around secure boot.

Debug Lock

A secure boot design is weakened if attackers can use debug interfaces to:

  • rewrite firmware,
  • read secrets.

Production devices should control:

  • JTAG,
  • SWD.

ST STM32 Security

ST's current MCU security guidance covers:

  • firmware IP protection,
  • private data protection,
  • communication security.

Secure firmware install is designed to provide:

  • confidentiality,
  • authentication,
  • integrity

during programming.

Microchip Secure Boot

Microchip security devices and controllers support features such as:

  • immutable root of trust,
  • secure boot,
  • secure updates,
  • rollback protection.

Secure Boot and TrustZone

TrustZone protects runtime domains.

Secure boot establishes that the trusted software loaded into those domains is authentic.

These technologies complement each other.

External Flash Boot

Systems booting firmware from external SPI/QSPI Flash face additional risk because the memory is physically accessible.

A root-of-trust controller can verify external firmware before the main SoC executes it.

Firmware Confidentiality

Encryption may be important when firmware contains:

  • proprietary algorithms,
  • AI models,
  • customer IP.

Implementation, Testing, and Optimization

Authentication Metadata

A secure image may include:

  • version,
  • image length,
  • algorithm ID,
  • signature,
  • hash.

The metadata itself must be protected from tampering.

Manufacturing Key Management

Signing keys should remain in:

  • HSM,
  • controlled signing service.

Never embed the private signing key into factory programming software.

Development vs Production Keys

Use separate keys for:

  • development,
  • production.

Production devices should not trust test keys.

Boot Time

Cryptographic verification adds startup latency.

Hardware crypto accelerators can reduce this cost.

Fail-Safe Behavior

If verification fails, the device should:

  • reject image,
  • enter secure recovery,
  • never execute untrusted code.

Common Mistake: Hash Without Signature

A stored hash is useless if an attacker can replace both:

  • firmware,
  • expected hash.

Common Mistake: No Anti-Rollback

Signed old firmware can still be dangerous.

Common Mistake: Unsecured Recovery Loader

Recovery must follow the same trust rules.

Common Mistake: Leaving Debug Open

Debug access can defeat firmware protection.

Common Mistake: Keys in Source Code

Private keys should never exist in application source or firmware images.

Design Workflow

  1. Select immutable trust anchor.
  2. Generate production signing keys.
  3. Implement image format.
  4. Verify hash and signature.
  5. Add version policy.
  6. Add rollback protection.
  7. Protect debug.
  8. Implement secure updates.
  9. Implement authenticated recovery.
  10. Test fault and power-loss cases.

Conclusion

Secure boot is the process that prevents an embedded device from executing unauthorized firmware.

The strongest implementations combine:

  • immutable root of trust,
  • digital signatures,
  • rollback protection,
  • key revocation,
  • authenticated updates,
  • secure recovery.

The key principle is:

every executable image should be authenticated before trust is extended to it.

Frequently Asked Questions

Secure boot authenticates firmware before execution, while encryption prevents unauthorized parties from reading the firmware content.

A signature proves that the firmware hash was authorized by a trusted private key, while an unprotected hash alone can potentially be replaced by an attacker.

Anti-rollback protection prevents older, vulnerable but correctly signed firmware versions from being reinstalled.

An unauthenticated recovery path can become a security bypass that allows malicious firmware to be installed.

Secure boot protects the startup chain. Runtime protection also requires memory isolation, privilege control, secure communication and other defenses.

References

  1. STMicroelectronics — Introduction to Security for STM32 MCUs: https://www.st.com/content/st_com/en/technical-documents/an5156-introduction-to-security-for-stm32-mcus-stmicroelectronics.html
  2. STMicroelectronics — Secure Firmware Install for STM32 MCUs: https://www.st.com/content/st_com/en/technical-documents/an4992-introduction-to-secure-firmware-install-sfi-for-stm32-mcus-stmicroelectronics.html
  3. Microchip — CEC1712 Root of Trust and Secure Boot: https://www.microchip.com/en-us/product/CEC1712
  4. Microchip — Platform Root of Trust Controllers: https://www.microchip.com/en-us/products/security/prot
  5. Arm — TrustZone for Cortex-M: https://www.arm.com/technologies/trustzone-for-cortex-m

Author

Industry Inspire Editorial Team

Editorial team covering industrial automation, manufacturing growth, and B2B strategy.

Share This Article