DOCS / FAB-SECURITY
Fab security: every computer in the building
Research date for everything below: 2026-11-27, unless a line says otherwise.
Jon, 2026-11-27: "a persistent/trusted/tamperproof environment would be extemely important for a fab like this. you dont want anyone messing with important work, it could cost money, be dangerous". And: "we dont need to immediately buy anything, we are just speccing this out. for the fab. we can iteratively improve this over time until its sound enough to buy and test irl."
So nothing here is bought, and every claim about the design is unknown until it earns a grade.
It starts from a plan Jon drafted with Claude the same day ("Where this came from", below). What
already exists is in prior-art.md, "Attesting a fab's computers".
What it protects, and what it doesn't. It protects the work: designs, recipes, records, and the
time and money in them. It doesn't make the fab safe. That is the interlocks' job (fab.md, rule
2): a tampered computer must be unable to make a tool dangerous, whatever this check says.
Where it stands
As of 2026-11-29: each step of "Getting to v1.0" (below), then parts of the design still to build,
with what holds each. An item is done or partly done only with the tests that hold it, named here;
crates/repo fails if a named test doesn't exist (the_fab_security_status_names_real_tests). It
can't see a row the work left behind, such as one still "not started" after its code is written. Of
the eleven items of "Before anything is bought", one is answered, for Fedora's Cloud image and not
yet its bootc image.
| item | status | held by |
|---|---|---|
| 1a: the judge (checks 1 to 4, the findings table, the verifier's own list) | done | the_tpm_s_own_quotes_pass_the_checks, an_old_answer_sent_again_is_refused, the_findings_table_in_its_order, every_enrolled_computer_is_judged_from_the_verifier_s_own_list |
| 1b: the boot event log (check 5) | done | each_boot_s_log_replays_to_its_quote_and_is_the_reference, a_log_changed_by_the_hub_is_refused, each_boot_s_log_replays_to_the_pcrs_its_tpm_held |
| 1c: the IMA entries (check 6) | not started | — |
| enrollment: credential activation, and the fingerprint compared | not started | — |
| how the verifier is given its reference values | not started | — |
| the hub's messages: CBOR in frames with a length and a CRC32 | not started | — |
| 2: Kani on the parsers and the findings table | partly: the event log's reader never panics, up to a bound, and the rows of the findings table judge decides; not yet what a log reads as, the reference's list, the signature's reader, the verifier's own list, or the hub's messages, which aren't built | any_spec_id_event_is_read_or_refused_without_a_panic, any_entries_after_a_spec_id_event_are_read_or_refused_without_a_panic, each_verdict_is_the_first_row_of_the_findings_table_that_holds |
| 3: virtual machines | partly: Fedora's Cloud image, not yet its bootc image, Keylime, IMA entries per day or the staged attacks | boots_before_the_flag_is_set_are_the_same_boot, the_boot_success_flag_changes_pcrs_8_and_9 |
| a computer off while no one is there: the power-on table and the check stick | partly: the power-on table, on swtpm's power events and a TPM2_Clear under both hierarchies' keys, and checked by Kani; not yet the check stick, its disk check or the verdict's PCR, the storage-hierarchy key in enrollment, a real computer's cap, or its intrusion switch | the_power_on_table_on_real_power_events, an_off_computer_with_a_storage_key_is_red_after_a_clear, each_computer_is_judged_by_its_mode, each_power_on_verdict_is_the_first_row_of_its_table_that_holds |
| 4: the Pico 2 W (a P-256 check's time; the raw ring oscillator and its health tests) | not started | — |
| 5: an attack read by someone else | not started | — |
| the verifier's firmware on Tock: its processes, drivers, display and stored state, secure boot, and a second verifier | not started | — |
| disk unlock: the TPM and a PIN, and a signed policy on PCR 11 once the image boots unified kernel images | not started | — |
| the network: its zones, the router, and Keylime's agents pushing to the hub | not started | — |
| the room: the cabinet, the UPS read by NUT, intrusion switches, seals, cameras and sensors | not started | — |
| our own microcontrollers' identity, derived from their firmware as DICE does | not started | — |
| the list of the building's computers, each in a class | not started | — |
The goal
Leave the fab, come back, and show in about a minute, for each computer the verifier checks, that:
- it didn't restart while no one was there, or, for a computer that is off then, that it booted only once, when you came back ("Off while no one is there");
- its firmware, bootloader, kernel and initramfs are the ones our build made;
- nothing ran on it that the image and its containers don't hold;
- no case, cabinet or door was opened (seals and sensors, "The room", below).
And for every other computer in the building, what its class has instead ("Every computer in the building", next).
Every computer in the building
Jon, 2026-11-29: "this should be for every computer basically within an entire building". So each
computer in the building is to be in one of these classes, by what can show it was changed. The
classes are a proposal, unknown until each is checked, and the list of the building's computers is
still to write.
| class | for example | what shows a change |
|---|---|---|
| a computer with a TPM and measured boot, running our image | the hub, the stores' server, each tool's station, the cameras' recorder, a workstation | the verifier's check ("Each check, leaving and coming back"), on while no one is there or off ("Off while no one is there") |
| a microcontroller running our firmware | the sputter station's controller, the stores' shelf nodes (makerspace.md, "The nodes"), the mesh's nodes once they run our own firmware (mesh.md), the bench's supply enforcer | an identity derived from its firmware, as DICE does ("The tools' controllers"), unknown; until then, its firmware's hash recorded when it is flashed |
| a bought device that can't be checked | the tools' bought controllers, the router, switches, the UPS, the cameras what stands in for a check, as each applies: a zone with no internet ("The network"), the locked cabinet or a seal ("The room"), its firmware version recorded and its settings in the repo | |
| the building's own systems | the fire alarm, door access, heating and ventilation | not decided; those wired to mains are installed by a licensed electrician (fab.md, rule 3) |
| a person's own device | phones, laptops | none; which network one may join is not decided |
Trust only the device in your pocket
- Each computer's TPM signs a report, a quote, of what it booted and how often it has restarted, with a key that never leaves the TPM.
- A verifier you carry, a Raspberry Pi Pico 2 on Tock, sends each computer a fresh random challenge and holds each one's public key. A hub in the fab only carries the messages. It can't forge a quote or pass off an old one; it can only withhold one, which shows red.
- The verifier holds no secrets, only public keys, reference values and the last snapshot. What matters is that no one can change them.
| threat | what shows it |
|---|---|
| someone changes the firmware, bootloader or disk, then puts things back | a restart, or a boot measurement that isn't ours; firmware rewritten in its flash while the computer is off can report the old measurements, unless hardware checks it ("The computers the verifier checks") |
| a look-alike computer replaces a real one | it can't sign with the enrolled key |
| a compromised system reports "all clear" | the TPM signs the quote, not the system |
| an old clean answer, sent again | every challenge is new |
| the hub is compromised | the verifier makes the challenges and judges the answers |
Out of scope: attacks on the chips themselves, such as fault injection or decapping, given long unattended access. The seals and cameras are there to make those hard to do unseen. Not seen by any check here: an attack on a running computer that neither restarts it nor runs a file the image and its containers don't hold, such as one that uses only programs already there. What IMA measures is set by its policy, which is still to write.
Enrolling a computer
Once, when the computer is known to be clean:
- The computer makes an attestation key in its TPM, in the storage hierarchy, so that a TPM2_Clear makes it anew ("Off while no one is there").
- The verifier proves that key is in that TPM, by credential activation against the TPM's
endorsement key. It makes the challenge itself (MakeCredential). Checked against the TPM
maker's certificate, the endorsement key puts the verifier's trust in the TPM, not in the
system enrolling it. An endorsement key only recorded at enrollment trusts that system, at
that one clean moment. Whether the verifier can check the maker's certificate itself is
unknown. - The computer shows the key's fingerprint on its own screen and the verifier on its own, and a person compares at least 80 bits of it before pressing accept.
- For a computer off while no one is there, the verifier records the restart count the key signs
in a boot with no resume since it started (
Off, infirmware/verifier).
Each check, leaving and coming back
The verifier sends a challenge to every computer it enrolled, from its own list, not the hub's, so a computer the hub leaves out shows red. Each challenge is 32 bytes from the RP2350's random-number generator, hashed with SHA-256, new for each computer and each check. The computer answers with a quote of PCRs 0 to 10, its boot event log, and the IMA entries added since the last check. Each message is a CBOR object in a frame with its length and a CRC32.
The verifier checks that:
- the quote is signed by the enrolled key;
- the TPM made it, as a quote (
TPM_GENERATED_VALUE,TPM_ST_ATTEST_QUOTE), which means something because enrollment showed the key is the TPM's own; - it carries the challenge just sent;
- the PCR values the hub passed on hash to the digest inside the signed quote;
- the event log replays to PCRs 0 to 9, and its entries match the reference values;
- the new IMA entries replay from the last check's PCR 10 to this one, and each is a file the image or its containers hold.
It reads the reset and restart counts, the clock and the TPM's firmware version from the signed quote.
Checks 1 to 4, the verifier's own list, and the findings table's rows for restarts and for PCRs
against the last snapshot are tested on real quotes from swtpm, a software TPM, and on copies
changed as a hub could change them. Check 5, and the row for PCRs 0 to 9 against the reference,
are tested on those quotes with the event log of a made-up boot that swtpm was given entry by
entry, on logs changed as a hub could change them, and on the logs of seven real boots (step 3's
first slice, below). The rows for the TPM's firmware and for
the clock are tested on values made up for the test (firmware/verifier; architecture.md,
"Rules"). That the event log's reader never panics is also checked by Kani, up to the bounds
step 2 states ("Getting to v1.0"), and so are the rows of the table judge decides, for any
snapshot and quote.
Check 6 is not built yet, nor how the verifier is given its reference values.
| finding | result |
|---|---|
| the reset or restart count changed | red: restarted |
| a PCR changed since the snapshot, or a PCR from 0 to 9 or an event log entry isn't the reference | red: boot chain isn't ours |
| a new IMA entry isn't a file in the image | red: something new ran |
| the TPM's firmware version changed | red: TPM firmware changed |
| no valid answer | red: missing |
| the clock went backwards | amber: look into it |
| everything matches | green |
Why PCRs 0 to 10. GRUB puts the kernel command line in PCR 8, and every file it reads, the
kernel and initramfs included, in PCR 9 (GRUB 2.16's manual, "Measured Boot", read 2026-11-27). IMA
measures into PCR 10 by default (IMA_MEASURE_PCR_IDX, "default 10", in Linux's
security/integrity/ima/Kconfig at f4585067). Fedora 45's Cloud image, booted under QEMU on
2026-11-28, measures GRUB's commands and the kernel command line into PCR 8, and nothing else there,
and the files GRUB reads, the kernel and initramfs among them, into PCR 9 (tested:
fedora_s_grub_measures_its_commands_into_pcr_8_and_the_files_it_reads_into_pcr_9, step 3's first
slice, below). Fedora's bootc image is not yet run.
Reference values, not only the last snapshot. Comparing with the last check alone would pass a computer that was already wrong when it was left. So:
- Firmware is ours: built from Dasharo's public source, or a release whose sha256 Dasharo
signs. Its reference values are what a board reports on its first boot after that firmware is
flashed. Dasharo's tests on the ODROID-H4 include "Identical configuration results in identical
measurements" (MBO006.001, passed on v0.9.1), on one board. Whether two identical boards report
identical PCRs 0 to 7 is
unknownuntil two are measured; if they do, each computer is also checked against its twins, the other boards like it. - Boot software, the shim, GRUB, the kernel and initramfs: the image's build computes the
digests the event log will hold. The kernel command line, in PCR 8, is written on each computer
when an update is deployed; whether the build can compute it is
unknown. PCR 8 also holds GRUB's commands, some with values from GRUB's environment in their text, and those change with its boot_success flag (step 3's first slice, below). - What runs: the build publishes one Merkle root over the hashes of every file in the image
and in the container images it pins.
The hub sends a proof with each new IMA entry, and the verifier, holding only the root, checks
it. How many entries a quiet computer adds in a day is
unknownuntil measured.
Keylime, on the hub, keeps attesting every computer while no one is there, and raises an alarm on a failure. The hub is not trusted, so that alarm is a help, not the judgement. The judgement is the verifier's, at the next check.
Off while no one is there
Jon, 2026-11-29: a second mode, for a computer that is off while no one is there, as an
anti-evil-maid program keeps one. Each computer is enrolled in one of the two (Mode, in
firmware/verifier):
- on while no one is there, as above: Keylime keeps attesting it, and any restart since the snapshot is red;
- off while no one is there: shut down after the snapshot, and on return judged before its own disk runs at all. Which computers can be off is decided with the list of the building's computers.
The return, in order. It is a proposal, built only where a test is named below.
- Leaving: the verifier takes the snapshot quote; the computer is shut down.
- Coming back, it is booted from its check stick: a USB stick of our own, whose boot is pinned (its shim, boot loader, kernel and initramfs, and the check's own code, which the boot measures into PCR 9), never from the computer's own disk. That is the first boot since the snapshot.
- The stick's code answers the verifier's challenge with a quote of that boot by the computer's attestation key, and the verifier judges it by the power-on table, below, against a reference for this computer booting this stick, PCRs 0 to 9.
- Then the stick reads the computer's disk as data, never running it: every file of the EFI system partition and of /boot, as they are and as the next boot will leave them; the partition table and the space after it; each encrypted volume's header and key slots; the Secure Boot keys, the boot entries and the names of every EFI variable; the ACPI tables, less the fields the firmware fills in at every start; the firmware's and the hardware's identity. It compares them with a baseline the same stick recorded when the computer was known good, kept authenticated so that a stolen stick can't rewrite it. The verdict's digest is extended into a PCR the stick's boot leaves alone, and quoted, so the verdict the verifier shows is the one the attested boot reached, on the verifier's own screen. How the stick's session reaches the verifier, through the hub or by cable, is not designed yet.
- Only on green is the disk's passphrase typed, into the stick's session, which then reads the computer's root filesystem as data in the same way; then the computer is shut down, and booted from its own disk.
So the disk's passphrase goes only to a boot shown to be ours, as Qubes's Anti Evil Maid shows its
secret "before you enter your LUKS disk encryption or key file passphrase" (its README); and the
boot chain on the computer's own disk, unchecked, never runs before the check. What PCRs don't
measure, the disk check reads; what the screen could fake, the verifier shows. But firmware
rewritten in its flash while the computer is off can report the old measurements, which the power-on
table would take as ours; whether reading the flash as data, from the check stick, would show the
rewrite is unknown. What stands against it is in "The computers the verifier checks".
It rests on what a TPM counts across power (TPM 2.0 Library Part 1, Revision 01.59, read 2026-11-29). resetCount goes up by one on each TPM Reset and "is set to zero in TPM2_Clear()" (§36.4). restartCount goes up on a TPM Resume or Restart, as after a suspend, and goes back to zero on a TPM Reset (§36.5). The TPM lets no software set Clock backward, "except for changes in ownership (TPM2_Clear())" (§36.3): "When the owner of the platform changes (new SPS generated) Clock is reset to zero" (§36.6). Clock is also "reloaded from the NV Clock on each _TPM_Init", so it can come back behind a value reported before a power cut (§36.4, NOTE 2), and its flag safe "is CLEAR after a non-orderly shutdown" (§36.3). A key in the Endorsement hierarchy signs the counts as they are; a key in another has "a key-specific value added", which keeps their differences (§36.7).
The attestation key is to be in the storage hierarchy, so that a TPM2_Clear, which gives the
platform a new owner, makes it anew and the enrolled key no longer checks the quote: "Using Clock to
do time stamping with a non-duplicable key does not constitute a vulnerability because the signing
key also becomes inaccessible when the owner changes" (§36.6). Its counts then carry its offset, so
enrollment records the restart count it signs in a boot with no resume since it started
(Off, restart_at_boot), and "one more" wraps at the top.
| finding, at the first boot since the snapshot | result |
|---|---|
| the reset count isn't one more, the restart count isn't the key's at boot, or Clock advanced more than the computer's shutdown and one boot take | red: it ran while no one was there |
| a PCR from 0 to 9, or an event log entry, isn't the reference for this computer booting its stick | red: boot chain isn't ours |
| the stick's check of the disk found a change it can't name, or didn't run (not built) | red: the disk was changed |
| the TPM's firmware version changed | red: TPM firmware changed |
| no valid answer, as after a TPM2_Clear made the key anew | red: missing |
| the clock went backwards, or isn't safe | amber: look into it |
| everything matches | green |
PCRs aren't compared with the snapshot's, since a new boot extends them anew.
Measured on swtpm 0.10.2 (2026-11-29), made by examples/swtpm_quotes.rs and committed as
tests/swtpm_power.txt (power: one TPM across power events) and tests/swtpm_clear.txt
(clear: a storage-hierarchy key beside an Endorsement one, across a power cycle and a
TPM2_Clear), all tested in firmware/verifier:
- an orderly shutdown, 3 s off, and one boot: the reset count one more, no restart, and 102 ms
more Clock, none of it the time off
(
a_power_cycle_is_one_more_reset_and_clock_counts_none_of_the_time_off); - a boot by someone else, run for 2 s, before the one on return: two more, and its time in Clock
(
a_boot_while_no_one_is_there_is_a_reset_more_and_its_time_in_clock); - power cut with no shutdown: one more, and Clock not safe
(
power_cut_with_no_shutdown_left_clock_behind_and_not_safe), so that boot shows amber (the_power_on_table_on_real_power_events; not safe alone,the_power_on_table_in_its_order). In this run Clock also came back 1 ms behind the last quote's; in a second run, not committed, it came 2 ms ahead, and safe was clear in both; - a suspend and resume: a restart, not a reset (
a_suspend_and_resume_is_a_restart_not_a_reset); - TPM2_Clear, with the Endorsement-hierarchy key: the template makes the same key after it, so the
enrolled key still checks the quote, and five boots bring the count back to one past the
snapshot's (
after_a_clear_the_same_endorsement_key_signs_and_boots_bring_the_count_back). Clock read 10.6 s at that boot, at least the five boots' 2 s each, where a Clear sets it back near zero (next); the cap caught them only because the snapshot's Clock was 2.5 s, and from a snapshot powered for weeks the same boots show amber (the_power_on_table_on_real_power_events); - TPM2_Clear, with the storage-hierarchy key: the template makes another key after it, so its
quote is refused under the enrolled key, red: missing
(
a_clear_makes_a_storage_key_anew_and_not_an_endorsement_key,an_off_computer_with_a_storage_key_is_red_after_a_clear); Clock read 3 ms just after it (a_clear_set_clock_back_near_zero); the key's counts carry its offset and keep their changes, and the table reads them as one boot by the restart count at boot (a_storage_key_s_counts_carry_an_offset_and_keep_their_changes); - the table in its order on values made up for it (
the_power_on_table_in_its_order); each computer judged by its own mode (each_computer_is_judged_by_its_mode); and the table's order, for any snapshot, quote, answer and what the verifier holds for the computer,checkedby Kani (each_power_on_verdict_is_the_first_row_of_its_table_that_holds).
Not built: the check stick and its code, the disk check, the verdict's PCR (the quote covers PCRs 0
to 10 only), and enrollment, with its key in the storage hierarchy and the restart count it reads
at boot. unknown until a real computer is measured: whether its TPM's Clock counts time while the
computer is off, which on swtpm it doesn't, and which would leave the cap unable to tell time off
from a boot; and how long its shutdown and boot take, which sets the cap. What already exists is in
prior-art.md ("Attesting a fab's computers"): anti-evil-maid tools that show the person a secret
the TPM unseals only when the PCRs match, none of them, as read, checking the reset count or Clock.
The verifier
- Hardware: a Pico 2 (not the W, which has a radio), a small SPI display, two buttons
(accept, cancel), and a USB-to-UART adapter on the hub. Its carrier board is a draft build,
builds/verifier: the blocks a schematic starts from, its pins, and a hub link of TX, RX and ground only, none of them its power or its reset. Two verifiers, enrolled together and kept apart. GrapheneOS's Auditor is not a backup: its verifier is "another Android device running the app in the Auditor mode", or its attestation.app service (attestation.app/about, read 2026-11-27). - UART, not USB: over UART the hub can only send bytes to a small parser. Over USB it would drive a USB device stack.
- Tock's drivers: upstream's
chips/rp2350(tock/tock at b89939e0, 2026-11-23) has UART, SPI, GPIO and timers, and Jon'svia-balaena/tockaddstrng.rson itsmain. Drivers for the SHA-256 accelerator and the OTP are still to write; SHA-256 in software is the fallback. - Its randomness is the RP2350's own TRNG, an Arm block on its own ring oscillator, which
"Produces approximately 7.5 kb/s of entropy when the core runs at 150 MHz" (RP2350 datasheet,
build-date 2026-11-19, section 12.12). The bootrom "streams raw TRNG ROSC samples (the TRNG
random source) directly into the hardware SHA-256 accelerator", and so "bypasses all internal
checking and conditioning in the TRNG". The verifier would do the same, after running SP
800-90B's health tests on the raw samples: the tests of project #6's step 4 (
pbits.md), from the Rust model its gateware is checked against. A failed test stops the check. Jon'strng.rs(at d343c1e5) reads the conditionedEHR_DATAregisters, so reading the raw samples is new driver work. - Processes: the parser, the judge and the display run as separate Tock processes, so a bug in the part the hub talks to can't reach the keys or the snapshots.
- Signing its firmware: secure boot with our key's hash in OTP, and the debug port locked. Both are irreversible, so each needs a person's approval in the session, on a board approved for flashing (CLAUDE.md). Practise on a Pico 2 W first: it has the same RP2350.
- Its stored state lives in the Pico 2's external flash. Secure boot doesn't cover it, so anyone holding the board can rewrite it. Keeping the verifier on you covers that. A MAC over the state, with a key in OTP, would go further, and would make that key the verifier's one secret.
- How long the RP2350 takes to check a P-256 signature is
unknownuntil measured.
The computers the verifier checks
- One board for every computer the verifier checks: the hub, the stores' server, each tool's station, and a spare. One board means one firmware build, one set of reference values, twins to compare, and a spare that replaces any of them.
- The candidate is the ODROID-H5 (Hardkernel, May 2026): an i3-N300, "fTPM enabled" and
10 GbE, $230 for the board alone (hardkernel.com, read 2026-11-27). The H4, H4+ and H4 Ultra
are marked "(DISCONTINUED)" there. A used H4+ is the surplus route: our own build replaces what
its BIOS flash holds, and the board goes through incoming QA like any part (
sourcing.md). - Its firmware is Dasharo:
- For the H5, only a release candidate (
hardkernel_odroid_h5_v0.9.0-rc2, Dasharo/coreboot, 2026-10-15). - For the H4, v0.9.1 (2025-09-03). It passed all 35 of the TPM and measured-boot tests Dasharo
ran on it, among them "Check if event log PCRs match actual values", and two more were not
run (Dasharo/osfv-results,
v0.9.1_results.csv). - The H4's built binaries come with Dasharo's paid Pro Package. Its source is tagged in public and its docs give a building manual, so we build it.
- Not TrustRoot. It checks firmware "against a specific private key managed by the device vendor", so "neither adversaries nor the device owners themselves can change the firmware" to one that key didn't sign (Dasharo's glossary). That rules out our own builds.
- So nothing in hardware checks our firmware. Of measured boot's chain of trust, Dasharo's
glossary says "it's only as good as its root", and without TrustRoot the root is the firmware's
own first stage: "only the bootblock is intended to be locked to form Static Root of Trust for
Measurement" (Dasharo's docs for the KGPE-D16). Intel Boot Guard is "a static hardware-based
Core Root of Trust for Measurement" (Dasharo's knowledge base, "PCR measurements"), with "three
separate modes: verified boot or measured boot, or a combination of both", and "The verified
boot approach is the one used by the majority of OEMs" (a 2016 UEFI Forum paper by two Intel
engineers, "Establishing the Root of Trust"). So a firmware change that needs a restart shows
red on a computer on while no one is there, but firmware rewritten in its flash while the
computer is off can report the old measurements, which the off mode's power-on table would take
as ours. What stands against that: the seals and the intrusion latch ("The room"); a bootblock
held by the flash's write protection, though how far that holds with the case open is
unknown; or a hardware root, Boot Guard's, "designed to prevent malware and other unauthorized software from replacing or tampering with the low-level UEFI firmware" (the same paper). With Dasharo, that is TrustRoot, which "cryptographically validates firmware" with its signing keys' hashes in the chipset's "field programmable fuses", "refusing to proceed with the boot if firmware doesn't pass the checks" (Dasharo's glossary), under its vendor's key. In its measured mode "the platform shall record TCG_EfiStartupLocalityEvent and may report a EV_S_CRTM_CONTENTS event in PCR[0]", the startup locality being 3, and in its verified mode "the secure boot policy and authority shall also be reported in PCR[7]" (EDK II's "TCG Trusted Boot Chain"). The verifier refuses a log started from locality 3 today (a_pcr_0_started_from_locality_3_is_refused), so a measured-mode computer needs it to read the Startup Locality event first. Whether reading the flash as data, from the check stick, would show a rewrite isunknown. - Dasharo lists a known issue on the H4: "TPM is cleared after HAP disabling and then
reenabling ME". Whether the fTPM works with Intel's ME disabled is
unknown.
- For the H5, only a release candidate (
- Not fully open: Dasharo carries Intel's binary firmware, and its openness charts measure how much. Dasharo also supports a POWER9 board, Raptor's Talos II; how open its firmware is, and what it costs, weren't read here.
- Software: one bootc image, built from Fedora, on every computer the verifier checks, so one Keylime runtime policy covers them all; Keylime (7.14.3, 2026-07-06); Ansible for every configuration and update; and Podman for the services.
- Disks are unlocked by the TPM and a PIN (
systemd-cryptenroll). PCR 7 is the "Secure Boot state", which "changes when UEFI SecureBoot mode is enabled/disabled, or firmware certificates (PK, KEK, db, dbx, …) changes" (man/systemd-cryptenroll.xml, systemd at 39c2bf5f). Bound to PCR 7 alone, the unlock follows the Secure Boot keys, not what booted, so a swapped initramfs still unseals the disk and catches the PIN. A signed policy on PCR 11 follows the kernel and initramfs, once the image boots unified kernel images (systemd'sdocs/TPM2_PCR_MEASUREMENTS.md: "on systems that are not booted via a UKI, PCR 11 does not cover the kernel and initrd").
The network
| zone | holds | reaches |
|---|---|---|
| management | the hub | each computer's Keylime agent, until the agents push (below) |
| fab computers | the tools' stations, the stores' server | each other and the hub |
| tool controllers | the controllers we bought | their own station only; no internet |
| cameras | local cameras | their recorder only; no internet |
- Keylime's push model: keylime/rust-keylime has a push-model agent
(
keylime-push-model-agent), with which computers connect to the hub instead of the hub to them. Then the hub needs no way into the other zones. How ready it is isunknown. - The router is the OpenWrt project's own board, the OpenWrt One: an MT7981, 1 GB of RAM, NAND with NOR for recovery, and 2.5 GbE and 1 GbE ports (openwrt.org's table of hardware, read 2026-11-27). The verifier can't check it, so it goes in the locked cabinet.
- Alerts while no one is there need a way out of the lab network, which CLAUDE.md keeps
closed without approval (
fab.md, "Open decisions, Jon's").
The room
- A locked cabinet for the router, the hub, the servers and the UPS.
- A UPS that is bought and listed, used as sold (
fab.md, rule 3), and read over USB by NUT. Without it, a power cut would restart the computers and show red; its log says whether the power went. - Chassis intrusion switches, where a board has the header. Whether the H5 has one is
unknown. - Tamper seals on cases, the cabinet and unused ports, photographed when leaving and compared on coming back.
- Local cameras recording to Frigate, and door, smoke, water and temperature sensors: fire and water matter here as much as intrusion. Their alerts come through the hub, so, like Keylime's, they are a help, not the judgement.
The tools' controllers
- Bought controllers (GRBL, Teensys and Arduinos, as Hacker Fab's tools use:
fab.md, "Hacker Fab's other tools") can't be attested. They get their own zone with no internet. Their firmware versions are recorded and their settings kept in the repo. - Our own, the sputter station first, could carry an identity measured from their firmware:
a key derived inside the chip from a secret and the firmware's hash, as DICE does, for the same
verifier to check.
unknown. - Designs and recipes are kept in git with signed commits, as
mainalready requires, so a changed file shows up as a difference from a signed commit.
The routine
- Before leaving, if updates are due: run the update playbook, restart, and take a check. Nothing is updated while no one is there.
- Leaving: plug the verifier into the hub, wait for "snapshot saved" for every computer, and photograph the seals.
- Coming back: plug it in again and read each computer's result on the verifier's own screen, never the hub's; then the sensors' events. On any red, type no password on that computer until it has been looked at.
- A computer off while no one is there: leaving, its snapshot is taken, then it is shut down. Coming back, it is booted from its check stick, and its result is read on the verifier before its disk's passphrase is typed ("Off while no one is there").
Where this came from
Jon's plan, drafted with Claude on 2026-11-27. Changed here:
- The hub and server board: the H4 family is discontinued, so the H5 is the candidate, and Dasharo is still a release candidate for it.
- What ran is judged by the verifier from PCR 10, not by Keylime on a hub the plan itself calls untrusted.
- PCRs 0 to 7 became 0 to 10, to cover the kernel command line, the initramfs and what runs.
- Reference values and twins, beside the last snapshot.
- Enrollment proves the key is the TPM's own, and compares 80 bits, not a short fingerprint.
- TrustRoot is dropped.
- UART is chosen to keep the hub away from a USB stack, not as a fallback.
- The verifier's flash: what needs protecting is that no one changes it, not that no one reads it.
- The backup verifier is a second Pico, not a phone app that verifies phones.
- The hub's reach into every zone ends once the computers push to it, if Keylime's push model is ready.
- The verifier challenges the computers it enrolled, not the list the hub sends.
- Every computer in the building, not only the fab's (Jon, 2026-11-29), each in a class by what can show it was changed ("Every computer in the building").
- A computer can be off while no one is there (Jon, 2026-11-29), judged on return from a check stick, before its own disk runs ("Off while no one is there").
Left out: the plan's prices, which were estimates, and its computers that aren't the fab's.
Before anything is bought
- Dasharo for the H5 is released, with its TPM and measured-boot tests passed.
- Fedora's GRUB measures into PCRs 8 and 9: in Fedora 45's Cloud image under QEMU it does (step 3's first slice, below). Fedora's bootc image is not yet run.
- How many IMA entries a quiet computer adds in a day.
- Whether two identical boards report identical PCRs 0 to 7.
- How ready Keylime's push model is.
- How long the RP2350 takes to check a P-256 signature.
- Whether the H5 has a chassis intrusion header.
- Whether the H5's firmware starts its TPM from locality 3, which the verifier's replay doesn't read yet, so it refuses that computer's log (step 1b).
- Whether the H5's TPM counts Clock while the computer is off, and how long its shutdown and boot take: the power-on table's bound ("Off while no one is there").
- Whether the H5's firmware has a hardware root that checks or measures it (Boot Guard), and whether we can use one without its vendor's key ("The computers the verifier checks").
- Prices for everything but the board.
Getting to v1.0
Jon, 2026-11-27: "great idea", to auditing the design by making it run before anything is bought. The review that found the hub could leave a computer out did it by reading; a test of the verifier's own list would have failed.
v1.0 is reached when:
- every threat in "Trust only the device in your pocket" and every row of the findings table has
a named test, and taking out the check it covers makes that test fail (
tested); - the parser that the hub's messages reach is checked with Kani, up to a stated bound
(
checked); - one whole leave-and-return runs on virtual machines, with each attack staged;
- each item of "Before anything is bought" is answered, or marked as needing the board.
Then one H5 is worth buying, Jon's decision, and a second answers whether twins report identical PCRs.
| step | what | needs |
|---|---|---|
| 1a | The judge, in Rust, built for the host and for the RP2350 alike (no_std): the quote's signature, challenge, PCR digest and counts; the findings table; and the verifier's own list of computers. Its test inputs are real quotes from a software TPM, committed with the program that makes them, so the Quality Gate needs no TPM. | nothing bought |
| 1b | The boot event log, replayed to PCRs 0 to 9 and checked against reference values | nothing bought |
| 1c | The IMA entries since the last check, replayed to PCR 10, each with a proof against the image's Merkle root | nothing bought |
| 2 | Kani on the parser and the findings table | nothing bought |
| 3 | Virtual machines: Fedora's bootc image under QEMU, with a software TPM and UEFI measured boot, and Keylime's push model between them | nothing bought; whether this Mac runs it, or the x86 desktop is needed, is unknown |
| 4 | A Pico 2 W already on hand: how long a P-256 check takes; the raw ring oscillator with the health tests | Jon's approval to flash it, since it isn't a lab target; no OTP step; waits until Jon can reach the board (2026-11-27) |
| 5 | An attack read by someone else: a reviewer given only this section and Sperrle's security analysis, not the reviews before | nothing |
-
Step 2 (2026-11-29): Kani 0.68.0 checks, in the Quality Gate's step "Kani checks the fab verifier's log reader and findings table" (
firmware/verifier, itsproofs):- that the boot event log's reader, which reads the log as the hub passes it on, before anything
has checked it, never panics on any bytes up to a bound, in its two parts. Any first entry and
Spec ID event of up to 128 bytes is read or refused, and, read, holds its list of algorithms,
and is followed by the rest of the log, at the offsets the tests' own reader of the real boots
uses, in
tests/qemu_boots.rs(any_spec_id_event_is_read_or_refused_without_a_panic). Any entries of up to 100 bytes, room for two whole entries of the smallest kind, after a Spec ID event listing two banks of any algorithms and 20 to 64 bytes each, are read or refused, and each PCR the reader gives is from 0 to 9 (any_entries_after_a_spec_id_event_are_read_or_refused_without_a_panic); - that for any snapshot, quote and answer from the log, the verdict is the first of the rows
judgedecides that holds, in the findings table's order (each_verdict_is_the_first_row_of_the_findings_table_that_holds).
Tried and not kept, each
unknownpast what was measured on 2026-11-29: a harness that writes a log apart from the reader and checks it is read as its entries didn't finish in 5 minutes, even for one entry, uncut; one for whether a PCR's digests are the reference's list failed on inputs that pass when run outside Kani (Kani's own playback of them), and why is not known; and one for the quote's signature, which tpm2-protocol reads, didn't finish in 4 minutes for an ECDSA signature of up to 41 bytes. So what a log reads as, the reference's list, and the signature's reader staytested, notchecked.Not checked by Kani: logs past these bounds, and entries after a Spec ID event listing other than two banks of 20 to 64 bytes; SHA-256, which is sha2's, and the PCR extend, both of which the real boots test; P-256; checks 1 to 4; the verifier's own list, and with it the row for no valid answer; and the hub's messages, which aren't built. Kani 0.67.0 couldn't build the verifier: tpm2-protocol 1.2.4 declares Rust 1.95, past 0.67.0's compiler, so the Quality Gate moved to 0.68.0, and the enforcer's harnesses with it.
- that the boot event log's reader, which reads the log as the hub passes it on, before anything
has checked it, never panics on any bytes up to a bound, in its two parts. Any first entry and
Spec ID event of up to 128 bytes is read or refused, and, read, holds its list of algorithms,
and is followed by the rest of the log, at the offsets the tests' own reader of the real boots
uses, in
-
Step 3 answers, in a virtual machine, whether Fedora's GRUB measures into PCRs 8 and 9, whether a boot's entries for PCRs 0 to 9 are the same from one boot to the next, how many IMA entries an idle computer adds in a day, and how ready Keylime's push model is. Step 4 answers how long the RP2350 takes to check a P-256 signature. The H5's Dasharo release, the twins, its chassis header and the prices need the board or a later read.
-
Step 3's first slice (2026-11-28): Fedora 45's Cloud image (Fedora-Cloud-Base-Generic-45-1.4, its sha256 checked against Fedora's signed checksum file), booted seven times on one virtual machine under QEMU 11.1.3, with QEMU's own UEFI firmware (edk2) and swtpm 0.10.2, and no network. The disk, the UEFI variables and the TPM's state are kept between boots.
examples/qemu_boots.rsmakes the boots and commits them astests/qemu_boots.txt(firmware/verifier); the PCRs are as the guest's kernel read them from the TPM, not quoted. What it showed, alltestedintests/qemu_boots.rs:- each boot's log replays, through the verifier's own check, to PCRs 0 to 9 as its TPM held them:
each_boot_s_log_replays_to_the_pcrs_its_tpm_held; - the five boots before the flag is set are one boot: PCRs 0 to 10, and every entry for PCRs 0 to
9, the same (
boots_before_the_flag_is_set_are_the_same_boot); - GRUB's boot_success flag changes PCRs 8 and 9 and no other PCR from 0 to 9. The flag marks a
boot as successful: Fedora's GRUB can hide its menu, on a computer with one OS, if "The previous
boot has set a flag to indicate it successfully booted", and a reboot "without logging in"
"counts as a failed boot" (Fedora's Changes/HiddenGrubMenu, Fedora 29, read 2026-11-28). Boot
5's script sets the flag with
grub2-set-bootflag boot_success. In PCR 8, five commands differ, three of them testing the flag's value, now 1; in PCR 9, the environment file GRUB reads now holds the flag. So an exact reference made before the flag is set says the boot after it isn't ours (the_boot_success_flag_changes_pcrs_8_and_9); - the flag then stays set, in the file, and boot 7 is the same as boot 6 (the same test). The
save_envGRUB measures into PCR 8 writes to(hd0,gpt3)512+1, not to that file.
Not shown: Fedora's bootc image, which is what the fab would run; a boot that clears the flag again, which none of these did (
unknownwhether one can); firmware other than QEMU's; how many IMA entries an idle computer adds in a day; and Keylime. - each boot's log replays, through the verifier's own check, to PCRs 0 to 9 as its TPM held them:
-
Before step 1a's parser is written, an existing one is looked for (CLAUDE.md, "Conventions"). tpm2-tools'
tpm2_checkquotealready makes checks 1 to 4 on a host: its man page names the signature, the qualifying data and the PCR values, and its source checks the magic and the type (tools/misc/tpm2_checkquote.c, tpm2-software/tpm2-tools at 915443b3). A Rust one exists that runs on a microcontroller: tpm2-protocol 1.2.4 (MIT OR Apache-2.0, jarkkojs/tpm2-library at c77e90fa), "A unipolarno_stdTPM 2.0 implementation that does not require heap allocator and has zero dependencies", withTpmsAttest,TpmsQuoteInfoandTpmsClockInfoamong its types. Step 1a builds on it. Searched on crates.io, 2026-11-27, for "tpm2", "tpm quote", "tpms_attest", "tpm attestation" and "tpm2-protocol". -
The software TPM: swtpm 0.10.2 is in Homebrew; tpm2-tools is not (searched 2026-11-27). So step 1a's test inputs come from swtpm, driven by a small Rust program that writes the TPM's commands byte by byte, so the inputs don't come from the parser they test.
-
Step 1b's parser is our own: none found checks every size in a log it is handed, without the standard library or a heap (
prior-art.md, "A parser for the boot event log", searched 2026-11-27). It reads the log as the PC Client Platform Firmware Profile 1.05 r23 lays it out (§10), and replays PCR 0 from zeros: it doesn't read the Startup Locality event, which tpm2-tools starts PCR 0 from, so it refuses the log of a TPM started from locality 3. Its test logs are written by the tests, from the same boot that the quotes' program gives swtpm, so they don't come from the parser either. -
With the reference an exact list, the log adds only a refusal: PCRs 0 to 9 are the reference's exactly when the reference, replayed, gives the quoted values (
tested:the_reference_replayed_alone_gives_the_log_s_answer). The log is needed for a reference that lets an entry vary from one boot to the next, or to show which entry differs. A boot's entries do vary: GRUB's boot_success flag changes PCRs 8 and 9 (step 3's first slice, above). With PCR values alone, the boot after the flag is set would be red, as a changed boot chain is; the log's entries show which ones differ, here five of GRUB's commands and the environment file. Whether the fab's image keeps the flag out of its boot, or the reference lists each of its states, is not decided.
Written in docs/fab-security.md, on main; this page is made from it.