Free — no signup required

The Chain of Trust: Secure Boot vs. Measured Boot

3 min read

Two Different Strategies

These two mechanisms are often confused because they both involve firmware and cryptography at boot time. They solve different problems and are frequently used together.

Secure Boot is a preventive control. Before executing any bootloader, the UEFI firmware checks whether it is signed by a trusted certificate authority (typically Microsoft's key for Windows, or a distribution key for Linux). If the signature is missing or invalid, the firmware refuses to execute the code and the machine halts. Secure Boot says: "I will not run untrusted code."

Measured Boot is a detective control. It does not stop anything. Instead, before executing each stage of boot, it calculates the SHA-256 hash of that stage and records it in the TPM's PCRs. Measured Boot says: "I will record exactly what ran, so it can be verified later."

The two are complementary. Secure Boot prevents known-bad code from running. Measured Boot creates a verifiable record of what actually ran, which enables later verification even for code that Secure Boot allowed through.

Building the Chain Step by Step

Power On
  │
  ▼
CPU executes CRTM (Core Root of Trust for Measurement)
  │  ← immutable code burned into silicon, cannot be modified
  │  → Measures BIOS firmware → Extends PCR[0]
  ▼
BIOS/UEFI
  │  → Measures bootloader (grub.efi) → Extends PCR[4]
  │  → Checks Secure Boot signature (optional, preventive)
  ▼
GRUB Bootloader
  │  → Measures Linux kernel (vmlinuz) → Extends PCR[4]
  │  → Measures initramfs → Extends PCR[5]
  ▼
Linux Kernel
  │  → Initializes IMA subsystem
  │  → Measures kernel modules as they load → Extends PCR[10]
  ▼
Userspace Applications
     → Can now query TPM for sealed secrets

The Core Root of Trust for Measurement (CRTM) is the starting point of the entire chain. It is code burned into the CPU or chipset that cannot be modified by software. Because it is immutable, it is unconditionally trusted. Everything else in the chain derives its trustworthiness from this starting point.

By the time the login screen appears, the TPM contains a precise cryptographic fingerprint of the entire boot history — every piece of code that executed, in order.

Interview Tip

Interviewers frequently ask: "What's the difference between Secure Boot and Measured Boot?" A weak answer conflates them. The strong answer: Secure Boot is a gate (binary allow/deny based on signatures), while Measured Boot is a ledger (records everything that ran into PCRs regardless of whether it was allowed). They are complementary — Secure Boot prevents known-bad code; Measured Boot enables post-boot verification of what actually ran. In production, you want both.

Key Point: The chain of trust is only as strong as its root. The CRTM is the unconditional anchor. Every subsequent link is trusted only because the link before it was verified. If the CRTM itself were compromised (a hardware-level attack), the entire chain would be invalid — which is why physical hardware security and supply chain integrity matter.

This is one of 18 chapters

Every chapter is free — Kubernetes, Terraform, SRE, distributed systems, and more — with fast daily review built in.

Sign up free