Skip to Content
PoC BatteryP01 — TPM Toolchain

P01 — TPM Toolchain Bring-Up (swTPM + tpm2-tools)

Status green · Claim PC8 · Corpus anchor L4 §4 item 1 (“The primitives are real and, in at least one case, in your hands”); maturity matrix E1 · Effort S · Execution host VM (swTPM)

What it proves

PC8 — the four root-of-trust primitives (device identity, measured boot, remote attestation, key sealing) are obtainable and runnable by a user with no vendor hardware and no TPM chip in the machine. “Proven” here means you have installed the software TPM, started it, and watched a real TPM 2.0 answer commands and enumerate its PCR banks. The software TPM (swtpm, built on libtpms) is the same implementation the TPM2 ecosystem uses in CI — it is a real TPM 2.0, not a toy.

Why it matters

The corpus anchor for this claim is L4 §4 item 1: “The primitives are real and, in at least one case, in your hands” — the book’s argument that a root of trust is something a reader can actually run, not a marketing term, starts here. It sits in the maturity matrix at E1, the “exists and is mature” row every later, heavier PoC leans on. If this claim were false — if you needed vendor hardware even to touch a TPM — the rest of the battery would collapse into paper claims.

Why this, not that

We do (Y)We don’t (X)Because
Run swTPM on any Linux box / macOSRequire a physical TPM 2.0 chipNot every machine has one; the maneuver must work on the machine you own, and swTPM is the standard emulator the tpm2-tools project itself tests against.
Use tpm2-tools (the standard CLI)Hand-roll cryptoThe point is proving standard, user-available tooling exists, not that we can write crypto ourselves.
One command line setBuying a TPM module / cloud TEEPC8 is about accessibility — a user with a stock server must be able to do this.

What you need

  • Linux server (Ubuntu 22.04/24.04 or Debian) with root/sudo, or macOS with Homebrew.
  • No TPM hardware required.
  • ~200 MB disk.

How to run it

  1. cd poc/P01-tpm-toolchain — enter this PoC’s directory.
  2. bash scripts/01-install.sh — installs swtpm + tpm2-tools (+ tpm2-tss on Linux).
  3. bash scripts/02-start-swtpm.sh — starts the socket TPM (ports 2321/2322).
  4. bash scripts/03-smoke-test.sh — runs startup + capability + PCR dump.

Docker alternative (no host install at all):

  1. docker build -t poc-tpm-toolchain -f Dockerfile . — builds the container image.
  2. docker run --rm -it poc-tpm-toolchain — runs the same smoke test inside the container.

What “done” looks like

bash scripts/03-smoke-test.sh # MUST print: # POC-P01-OK: TPM2 reachable, PCR banks enumerated (sha256 present)

Where the evidence goes

Copy into evidence/:

  • transcript.txt — full output of the three scripts.
  • swtpm.log — the emulator log (shows commands arriving over the socket).

What this does not prove

  • Ports 2321/2322 must be free; 02-start-swtpm.sh fails loudly if not.
  • The TPM socket is stateful — do not restart swtpm between P01 and P02/P07 unless you want to redo the setup (that’s fine — it’s part of the demo).
  • On macOS: brew install swtpm tpm2-tools — the same scripts work.
  • The TCTI env var is exported by 02-start-swtpm.sh; remember to source it or export it manually in new shells.
Last updated on
Superdefence II — defensive security research.