P07 — FlexHEG-style Signed Compute Ledger with Attestation Receipts
Status
green· Claim PC7 · Corpus anchor L6 / maturity C1 (“receipts” + aggregation trick); PC4 remote attestation · Effort M · Execution host VM (swTPM)
What it proves
PC7 — FlexHEG’s “receipts”/FLOP-counting mechanism (maturity row C1) rests on a signed, verifiable accounting primitive; and a remote-attestation “receipt” is plain TPM tech a user can run today, on one host, without TEE silicon. When the gate prints, you will have produced one attested compute receipt: a compute counter that is (a) bound to an attested boot state via sealed TPM state, (b) signed externally, and (c) verifiable by a third party.
Why it matters
The corpus calls the whole networked receipt-stack “concept-only”; this runbook splits the one provable component from the un-provable whole (multi-GPU CC aggregation, still maturity M5). FlexHEG’s promise is hardware-attested receipts, and the TPM binding is what makes a receipt tamper-resistant without the machine being compromised. The actual scheme is that a third party trusts only the attestation, not the worker — so an honest PoC shows one attested compute-receipt and states that the aggregation step is what is missing.
Why this, not that
| We do (Y) | We don’t (X) | Because |
|---|---|---|
| Single-host: worker measures its iterations, binds the count to a PCR-sealed TPM object, quotes it, and a verifier checks the quote | Simulate multi-GPU distributed FLOP aggregation | Multi-GPU CC doesn’t ship (M5) — an honest PoC shows one attested compute-receipt and states the aggregation step is what’s missing |
| Seal the ledger record so it is only readable under the attested PCR | Sign a counter with a plain software key | FlexHEG’s promise is hardware-attested receipts; the TPM binding is what makes the receipt tamper-resistant without the machine being compromised |
External verifier (tpm2_checkquote + openssl) | Self-verify in the same process | That is the actual scheme: a third party trusts only the attestation, not the worker |
What you need
- P01 environment (swTPM + tpm2-tools) — or just run
00-start-swtpm.shhere. - swtpm 0.10.x: older swtpm builds (0.7/0.8) fail
tpm2_createakwith TPM_RC_POLICY 0x99D because the AK parent must be a proper EK. Debian sid / Ubuntu 25.04+ package 0.10.x; Homebrew on macOS ships 0.10.1. - If testing inside a Docker container, start swtpm with
swtpm socket ... --seccomp action=none(Docker blocks seccomp_load). - Python 3.9+.
How to run it
cd poc/P07-flexheg-ledger— enter the runbook directory.bash scripts/00-start-swtpm.sh— start the software TPM.python3 scripts/flop_ledger.py— happy path: quota measured -> receipt signed -> verified.python3 scripts/flop_ledger.py --tamper— negative: counter record drifted -> verification fails.
What “done” looks like
python3 scripts/flop_ledger.py
# MUST print: POC-P07-OK-RECEIPT-VERIFIED
python3 scripts/flop_ledger.py --tamper
# MUST print: POC-P07-TAMPERED-RECEIPT-REJECTEDWhere the evidence goes
Captured artifacts live in evidence/ (regenerate with the run commands above):
ledger_good.log— count, sealed object, quote, checkquote output.ledger_tamper.log— rejection output (this is the load-bearing negative line).
What this does not prove
- This proves receipt + attestation on one node, NOT FlexHeg cluster aggregation or on-device rule enforcement (those stay concept-only, corpus C1/C2).
- “FLOPs” is mocked (loop counts) — do not present it as a real FLOP meter; it is a placeholder counter demonstrating the receipt structure.
- The TPM quote over the sealed record is the honest analog of FlexHEG’s “attested receipt”; note the difference (no cross-device relay, no chronological chaining).