PROPHET/OS
NAME
measure: what was started, measured into a chip nobody can rewrite
SYNOPSIS
measure [--tui]
DESCRIPTION
What was started, measured into a chip nobody can rewrite.
A signature says a thing is **allowed** to run. It does not say what **did** run: the seal of the boot stages compares the kernel against a number that lies in the stage itself, so a loader swapped together with its kernel passes it. This tool shows the other answer. Every stage is hashed and the hash is folded into a register of the TPM that can only be extended and never written, and a key is handed back out of the chip only while those registers carry the values it was sealed under.
The table is the bank of registers, twenty-four of them over SHA-256. Value is the whole value, so it can be compared against a build by eye or by pipe. State is the field that matters: a register nobody extended carries twenty-four zero bytes **by the standard**, so the value alone cannot say whether anything was measured into it. extended means something was, zero means nothing was.
Under the table stands the book of measurements, one line per thing that was hashed, with the register it went into, how many bytes it covered and the first characters of its digest. A register is its own measurements folded in order, and nothing else; measure shows both halves so the one can be followed into the other.
Three registers carry the start, and each is a different question:
| Register | What goes in | |---|---| | 0 | the boot stages as they lie in memory, and under BIOS stage2 carries the digest the seal compares the kernel against | | 1 | the kernel, as the **seal** measured it, out of the stage that measured it | | 2 | every module image on the root, each over exactly the bytes its signature covers |
absent in red is the honest line and not an error. The UEFI way leaves no stages in low memory and checks with ML-DSA-87 instead of a digest, so both of the first two stand absent there with their reason beside them. A line that said zero instead would be a value, and a value is read as a measurement.
The head line says whether there is a chip, how much was measured, and whether the mirror of the registers in the kernel agrees with what the chip gives back. chip - with a reason is a machine without a TPM: the measuring still runs and still folds its mirror, but nothing outside the machine holds it, so no key can be sealed against it.
key sealed means an index stands in the chip whose read policy is those registers. It survives a restart, and it stops being readable the moment one of the three measurements changes, which is what makes an encrypted volume unreadable on another machine and after another kernel.
The source is /state/measure.
EXAMPLE
$ measure --help measure [--tui] the registers of the chip and what was measured into them --tui live on the whole screen, q leaves