Home / Learn Embedded C / Secure Boot Concept

Secure Boot Concept

Cryptographically verifying that only authentic, trusted firmware is allowed to run at startup.

The gistCryptographically verifying that only authentic, trusted firmware is allowed to run at startup.

The idea, explained simply

CRC check vs secure bootCRC check (Bootloadersgroup)Catches accidental corruptionDoes NOT stop a deliberatelymalicious butinternally-consistent imageSecure bootCryptographically verifiesauthenticity, not justconsistencyStops a malicious image evenwith a "valid" CRC
CRC check vs secure boot

The basic idea

Secure boot cryptographically verifies (using a digital signature checked against a trusted key, often burned into the chip at manufacture) that the firmware about to run is genuine and unmodified, before allowing it to execute — extending the bootloader's CRC-integrity check into a full authenticity/trust guarantee.

Why this comes up

A CRC check (from the Bootloaders group) only catches accidental corruption; it does nothing to stop a deliberately malicious, intentionally-crafted firmware image with a perfectly valid CRC — secure boot specifically closes this gap by verifying the firmware is cryptographically authentic, not just internally consistent.

The mechanics

Secure boot typically relies on asymmetric cryptography: the manufacturer signs legitimate firmware with a private key, and the chip (holding only the corresponding public key, often in protected, unmodifiable storage) verifies that signature before trusting and executing any firmware image.

Where it is used

  • Firmware authenticity verification
  • Anti-tampering protection
  • Security-critical boot chains

Try it

Comparing a CRC-only check against a simulated signature checkC: edit and run

A crafted malicious image can be built with a perfectly matching CRC, but it cannot forge a valid signature without the manufacturer's private key.

Try it: a legitimate, properly-signed image passing both checks

A genuine image passing CRC and signature verificationC: edit and run

Unlike the malicious-image case, this genuine image signed with the manufacturer's private key passes both the consistency check and the authenticity check.

Quick check

1. Why does a plain CRC check alone fail to stop a deliberately malicious firmware image?