Skip to main content
Be Bitwise

Trusted Platform Modules

Processor Security Features · CPU Architectures track

6 min read

In this module

Hardware Root of Trust

A Trusted Platform Module (TPM) is a dedicated security chip — or firmware implementation — that exposes cryptographic functions anchored in tamper-resistant hardware. Unlike a general-purpose CPU, a TPM is built from the start as a trusted foundation that software attacks shouldn't be able to subvert.

TPM Architecture

A TPM contains:

  • Cryptographic engines: RSA, ECC, AES, SHA-256 hardware accelerators
  • Random number generator: hardware-based entropy source
  • Non-volatile storage: for persistent keys and configuration data
  • Platform Configuration Registers (PCRs): special registers that accumulate measurements of the boot process
  • Endorsement Key (EK): a unique, non-extractable key pair burned in at manufacturing, serving as the TPM's identity

TPM 2.0, the current standard, is specified by the Trusted Computing Group (TCG). You'll find it as a discrete chip on the motherboard (dTPM), as firmware running inside a trusted execution environment (fTPM — used by AMD and Intel), or integrated straight into the SoC.

Platform Configuration Registers

PCRs are the workhorse of platform integrity. Each PCR is a hash-sized register (SHA-256 = 32 bytes). PCRs can only be extended, never set directly:

text
PCR_new = Hash(PCR_old || measurement)

The PCR value therefore reflects the entire sequence of measurements extended into it, in order. You can't fake a PCR value without reproducing the exact same sequence.

During boot, each stage measures the next:

  • PCR 0: BIOS/UEFI firmware
  • PCR 1: BIOS/UEFI configuration
  • PCR 2: Option ROMs
  • PCR 4: MBR/Boot manager code
  • PCR 5: MBR/Boot manager configuration
  • PCR 7: Secure Boot state
  • PCR 8-15: available for OS use (Linux IMA, measured boot)
Measured Boot vs Secure Boot

Secure Boot verifies each stage and halts on failure — it stops unauthorised code from running. Measured Boot just records (measures) each stage into PCRs without blocking execution. The two coexist happily. Secure Boot keeps known-bad code off the system; Measured Boot keeps an auditable trail of what actually ran. Sealed secrets and remote attestation lean on the measured boot record to make trust decisions after the fact.

Sealed Storage

Sealing ties data to specific PCR values. When you seal something — say, a disk encryption key — the TPM encrypts it under one of its own storage keys and attaches a policy naming the PCR values that must hold. The sealed data only unseals when the PCRs match the values they had at sealing time.

That binds secrets to the system's software configuration. Modify the bootloader and PCR 4 changes; the TPM refuses to unseal the disk encryption key, and the system can't boot into the compromised environment. BitLocker on Windows and LUKS with systemd-cryptenroll on Linux both use TPM sealing for disk encryption.

Sealing policies can get hairy: "unseal only if PCR 0 = X AND PCR 7 = Y AND the user provides a PIN." That mixes hardware measurement with user knowledge.

When the Bus Is the Weak Point

Sealing protects the key while it's inside the TPM. It doesn't protect it on the way out. A discrete TPM is a separate chip wired to the CPU over an LPC or SPI bus, and in BitLocker's default TPM-only mode the TPM unseals the volume master key and sends it across that bus, unencrypted, on every boot.

Researchers have repeatedly pulled BitLocker keys off laptops this way with a cheap logic analyser or a microcontroller clipped onto the bus, because a stolen laptop still boots cleanly and the PCRs still match. Three things close the gap. TPM plus PIN makes the unseal policy require something the thief doesn't have. A firmware TPM (Intel PTT, AMD fTPM) runs inside the CPU package, so there's no external bus to probe. And TPM 2.0's encrypted sessions can protect parameters on the wire, though the software has to ask for them. The probing technique itself is covered in Hardware Interfaces.

Remote Attestation

Remote attestation lets a device prove its integrity to a remote verifier, with the TPM as the trusted reporter.

The protocol:

  1. The verifier sends a challenge — a random nonce
  2. The device asks its TPM for a quote: a signed statement containing the current PCR values and the nonce, signed with the TPM's Attestation Key (a separate restricted signing key created inside the TPM; a certificate authority vouches for it after checking, via the Endorsement Key, that it lives in a genuine TPM)
  3. The device hands over the quote and the event log (the detailed list of measurements that produced those PCR values)
  4. The verifier checks four things: (a) the TPM signature is valid and chains back to a known TPM manufacturer CA, (b) the nonce matches (preventing replay), (c) replaying the event log produces the right PCR values, and (d) the measurements line up with expected, trusted software

If everything checks out, the verifier has hardware-backed assurance about the device's software state.

DICE: Device Identifier Composition Engine

DICE is a newer TCG standard built for resource-constrained devices — IoT, embedded — that can't fit a full TPM. DICE starts from a hardware-unique secret (UDS, Unique Device Secret) and derives a chain of keys tied to the firmware identity:

text
CDI_0 = KDF(UDS, Hash(firmware_layer_0))
CDI_1 = KDF(CDI_0, Hash(firmware_layer_1))
...

Each firmware layer ends up with a Compound Device Identifier (CDI) bound to both the hardware identity and the exact firmware running. Modify the firmware, the CDIs shift, and any secrets sealed to the previous CDIs are gone.

DICE is much lighter than a TPM — no dedicated chip, just a hardware secret and a KDF — which makes it suitable for microcontrollers and IoT. You still get the core attestation and sealed storage properties with minimal hardware requirements.

Practical Implications

TPMs and hardware roots of trust are sliding from optional to expected. Windows 11 won't install without TPM 2.0. Zero Trust enterprise device management increasingly hinges on hardware-backed attestation. If you're evaluating platform trust, configuring secure boot, managing disk encryption, or designing attestation protocols for distributed systems, these mechanisms are the job.