By Russell Chapin
Why a firmware-managed secure boot anchored in a hardware security module (HSM) is essential for modern connected devices.
In the age of connected everything, from smart thermostats to industrial robots, ensuring firmware integrity is no longer optional. As attackers become more sophisticated, the first line of defense must begin before the operating system even boots. Verified boot is a mechanism that ensures only authorized, untampered firmware is executed on a device.
While full hardware root-of-trust implementations like secure enclaves offer robust protections, many embedded systems (especially cost-sensitive IoT devices) require a more flexible and affordable solution. This is where a firmware-managed verified boot process anchored by discrete hardware security modules (HSMs) offers a compelling balance between security and practicality.
What is firmware-managed verified boot?
Verified boot is the process of cryptographically validating firmware before it is executed. A firmware-managed approach delegates most of the verification logic to the bootloader or system firmware, but relies on a secure hardware element to protect root secrets and perform trusted operations like signature validation.
It’s worth distinguishing verified boot from measured boot, as the two are often conflated:
- Verified boot ensures that only authenticated, untampered code is allowed to run. If validation fails, the boot process is halted or diverted to a recovery mode.
- Measured boot, by contrast, does not block execution. Instead, it records the cryptographic hashes (measurements) of each stage of the boot process. These measurements can later be used for remote attestation, for example, proving the device’s integrity to a cloud service.
In short, verified boot enforces trust by preventing unauthorized firmware from running, while measured boot records trust to enable integrity verification after boot.
In this post, we focus on the verified boot approach, ensuring only trusted firmware is executed, via a software-orchestrated process anchored in hardware trust.
Example of a verified boot sequence using an HSM.
Why use a hardware security module?
Using an HSM introduces several key advantages:
- Tamper-resistant keystorage: HSMs securely store cryptographic keys in an isolated environment. Even if an attacker gains control of the main MCU, private keys remain out of reach. This is a significant improvement over software-only key storage.
- Cryptographic acceleration: The HSM offloads expensive ECC signature verification, freeing up the main processor and reducing boot latency. This is especially valuable on low-power MCUs.
- Immutable identity: HSMs can come pre-provisioned with a unique asymmetric key pair and a manufacturer-issued certificate. This provides a hardware root of trust used to verify firmware and device authenticity in the supply chain.
- Protection against rollback attacks: With monotonic counters or version enforcement logic managed in firmware, and optionally reinforced by the HSM, you can prevent unauthorized downgrades to older, vulnerable firmware versions.
How it works in practice
A typical firmware-enforced verified boot flow using an HSM looks like this:
- Boot ROM or early bootloader loads a first-stage firmware image.
- Firmware signature validation: The image includes a digital signature made using the vendor’s private key. The public key or certificate is validated against the HSM’s root key.
- HSM verifies signature: The HSM validates the signature on the firmware image.
- Execution continues if valid: If the signature is valid, boot continues. If not, the device halts or enters recovery mode.
This process ensures the firmware has not been tampered with and originates from a trusted source.
Real-world use cases
- IoT gateways and sensors: Prevent field-level compromise and maintain trust across firmware updates.
- Medical devices: Ensure firmware authenticity in highly regulated environments.
- Industrial controllers: Reduce the attack surface for lateral movement in SCADA and ICS networks.
- Consumer devices: Help meet regulatory requirements such as the EU Cyber Resilience Act and NIST 8259A.
Closing thoughts
Firmware-managed verified boot anchored in an HSM provides a practical way to secure embedded devices without overhauling hardware platforms. It enables developers to enforce firmware integrity, safeguard device identity, and defend against common attack vectors, all with minimal performance or cost overhead.
In a world where firmware is often the attacker’s entry point, booting securely isn’t just a best practice, it’s a baseline requirement.
Russell Chapin is a software engineer and product designer at Thistle Technologies, a company focused on securing the firmware supply chain. Based in California, he brings 15 years of engineering experience, including previous work on iOS at Apple.