Articles

Secure Boot vs Measured Boot: How Boot Integrity Works

Secure Boot blocks unsigned boot code; Measured Boot records a hash of everything that ran. How each works, how they differ, and why you want both.

Chisato Chisato · · 5 min read
A padlock with streaks of light behind it

Secure Boot and Measured Boot are two complementary ways of protecting the earliest stage of a computer’s startup. Secure Boot enforces: it refuses to run any bootloader or kernel that isn’t signed by a trusted key. Measured Boot records: it lets everything run, but writes a cryptographic hash of each component into a tamper-resistant log that can be checked later. One is a gatekeeper, the other is a witness, and serious platforms use both.

Why the boot chain matters

Every security control on a machine — antivirus, disk encryption, endpoint agents, the operating system’s own permission model — is loaded by the code that ran before it. If an attacker controls the bootloader or the kernel, they control everything above it, and the tools you would use to detect them are running on a compromised foundation. That is the threat model behind boot-level malware such as bootkits and the kernel-mode variants of a rootkit.

The defense is a chain of trust. Each stage verifies or records the next stage before handing over control, starting from a root that is hard to modify: firmware in read-only memory, or a key fused into the processor. Secure Boot and Measured Boot are two different ways of building that chain.

How Secure Boot works

Secure Boot is a feature of UEFI firmware. The firmware holds a small set of key databases:

  • PK (Platform Key) — the owner of the platform, usually the device manufacturer. It authorizes changes to the KEK.
  • KEK (Key Exchange Keys) — keys allowed to update the signature databases.
  • db — the allow list: certificates and hashes of boot components that may run.
  • dbx — the deny list: signatures and hashes that have been revoked, such as a bootloader version with a known vulnerability.

When the machine starts, the firmware loads the bootloader image and checks its signature against db and dbx, using the same mechanics described in how digital signatures work. If the signature is valid and not revoked, the bootloader runs. The bootloader then does the same for the kernel, and on many systems the kernel enforces signatures on its drivers and modules.

If any check fails, the boot stops. That is the core property: Secure Boot is a prevention control. Unsigned or revoked code never executes.

Its limitation is just as clear. Secure Boot only answers “was this signed by someone in db?” It says nothing about which signed component ran, what configuration it was given, or whether an older signed component with a known flaw was swapped in before the deny list was updated. It also produces no evidence that a remote party can inspect.

How Measured Boot works

Measured Boot relies on a TPM, a small security chip (or firmware equivalent) with special registers called Platform Configuration Registers (PCRs). A PCR cannot be written directly. It can only be extended:

PCR_new = Hash(PCR_old || measurement)

Before each boot stage runs, the stage before it hashes it and extends the result into a PCR. Firmware measures the bootloader, the bootloader measures the kernel and its command line, and so on. Each extend operation folds the new measurement into everything that came before, so the final PCR value is a fingerprint of the entire ordered sequence. Change one byte of one component, or change the order, and the final value is different. Because PCRs reset only on a reboot, malware that loads later cannot rewind them to a clean value.

Alongside the PCRs, the system keeps an event log listing each measurement. The log itself isn’t protected, but anyone can replay it — recompute the hash chain — and compare the result with the PCR values. If they match, the log is an accurate record of what ran.

Measured Boot does not block anything. A compromised bootloader will still run. What changes is that its presence is now recorded in a place the bootloader cannot erase.

Turning measurements into decisions

Measurements are only useful when something acts on them. There are two common patterns.

Sealing. The TPM can encrypt a secret so that it will only be released when specific PCRs hold specific values. Full-disk encryption systems use this to tie the disk key to a known-good boot state. If the bootloader is replaced, the PCR values change, the TPM refuses to unseal the key, and the machine asks for a recovery key instead of silently booting into an attacker’s environment.

Remote attestation. The TPM can produce a quote: the current PCR values signed by a key that never leaves the chip. A remote verifier — a device management service, a corporate network gateway, a cloud control plane — checks the signature, replays the event log, and compares the results with a list of approved values. If the boot state looks wrong, the verifier can deny network access, withhold credentials, or flag the machine. This is a building block of zero trust security, where device health is checked on every access rather than assumed.

Secure Boot vs Measured Boot compared

Secure BootMeasured Boot
Core actionVerifies signatures before running codeHashes code into TPM registers before running it
Type of controlPreventiveDetective
Hardware neededUEFI firmware with key databasesTPM (discrete chip or firmware-based)
Blocks untrusted codeYesNo
Records what ranNoYes, as PCR values plus an event log
Detects signed-but-vulnerable componentsOnly if revoked in dbxYes, if the verifier knows the expected hashes
Supports remote verificationNoYes, via signed TPM quotes
Typical failure modeMachine refuses to bootSecrets stay sealed, attestation fails

Why you want both

The two mechanisms cover each other’s gaps. Secure Boot stops the crude attacks outright: a random unsigned bootkit simply won’t run. Measured Boot catches the subtle ones that pass a signature check — a downgraded but still-signed bootloader, a modified kernel command line that disables a security feature, an unexpected driver in the chain — and gives you evidence you can act on remotely.

It also helps to know what neither one covers. Both protect the boot path only. Once the operating system is running, a vulnerability in a user-space service or a malicious package installed through the software supply chain is outside their scope. And both depend on the root of trust being sound: if the firmware itself is compromised, or the signing keys in db leak, the chain is only as strong as its anchor. That is why firmware updates and deny-list updates matter as much as turning the features on.

The takeaway

Secure Boot is a gate that checks signatures and refuses to start untrusted boot code. Measured Boot is a tamper-evident log, kept in TPM registers, of exactly what did start. The first prevents, the second proves. Pair them, use sealing to bind disk keys to a known-good boot state, and use remote attestation when you need a server to trust a device it can’t physically inspect.

Chisato Chisato · · 4 min read

What Is a Side-Channel Attack?

A side-channel attack recovers secrets from a system's physical behavior — timing, power draw, cache access — rather than breaking its algorithm directly.

#Security #Hardware #Cryptography
Chisato Chisato · · 4 min read

What Is a Hardware Security Module (HSM)?

A hardware security module is a dedicated device that generates, stores, and uses cryptographic keys so private keys never leave secure hardware.

#Security #Cryptography #Hardware
Chisato Chisato · · 5 min read

Password Salt vs Pepper: What Each One Protects Against

A salt is a unique, public value per password; a pepper is one secret kept outside the database. How they differ, how to combine them, and common mistakes.

#Security #Authentication #Cryptography