Lion Cipher Lab

Seal a LUKS disk-encryption key to the TPM's measured boot (auto-unlock only when the boot chain is intact)

Why it matters

Everyone learns that full-disk encryption protects a laptop that's lost or stolen. Far fewer can answer the very next question a real system has to solve: if the disk is encrypted, WHO types the passphrase when the server reboots at 3am in a locked cage? The mature answer is to bind the unlock key to the machine's MEASURED BOOT state using a TPM — the disk auto-unlocks with no human, but ONLY if the firmware, bootloader, and kernel that booted are the ones you trusted when you sealed the key. Tamper with the boot chain (an evil-maid swaps the bootloader, someone boots a rescue USB to read…

What you'll learn

Steps in this lab

  1. The mental model: 'encrypted' vs 'key protected', PCRs, and sealing
  2. Stand up the disposable VM, confirm the TPM, install the tools
  3. Build the THROWAWAY LUKS2 volume on a loop file — with a passphrase keyslot FIRST
  4. Seal a TPM keyslot to PCR 7 with systemd-cryptenroll
  5. Prove it: auto-unlock with NO passphrase via the TPM
  6. BREAK the seal: change PCR 7 and watch the fallback fire
  7. The named failure modes — brittleness, no-fallback data loss, DA lockout
  8. The judgment: raw-PCR vs SIGNED policy, Clevis/Tang, and what a TPM does NOT stop

Open the full interactive lab →