
Records a stranger can verify · Standard gear
You will be able to: explain, using the Post Office Horizon judgments, why a system's output must not be taken as reliable evidence against a person just because a computer produced it; design a tamper-evident record (canonical serialisation, a hash chain, a signature) and say exactly what it proves when checked against a pinned key and an expected checkpoint received through a separate channel, and what it never proves; and list what an evidence bundle must contain for an auditor who has never seen the system, and what it must never contain.
This module is as of November 2026. Reviewed and published, version 1.0.0. Big Widget Company and everything it does in this module are made up.
1. "The system said the cash was short, so it was"
Real case: Horizon
Horizon was a computerised accounting system used in branch post offices. Between 2003 and 2013, Post Office Limited prosecuted sub-postmasters and sub-postmistresses (SPMs) who ran those branches, and they were convicted of crimes of dishonesty.1 Two court judgments show what went wrong with treating the system's records as proof.
The civil judgment, 16 December 2019. In Bates v Post Office Ltd (No 6), the "Horizon Issues" judgment, Mr Justice Fraser found that the first version, Legacy Horizon, "was not robust". The later Horizon Online (in its HNG-X form) was better, but "its robustness was questionable, and did not justify the confidence placed in it by the Post Office in terms of its accuracy".2 The Court of Appeal later accepted his findings that bugs, errors and defects in Horizon gave rise to "a material risk that an apparent shortfall in the branch accounts did not in fact reflect missing cash or stock".1
Two further findings matter for anyone who designs records:
- The record could be changed by someone other than the person it was used against. Fraser J found that Fujitsu, the company that held Horizon's audit data, had the ability to "insert, inject, edit or delete transaction data or data in branch accounts", all "without the knowledge or consent of the SPM in question". If Fujitsu injected a transaction, "this would look as though the SPM had done it".1 2
- Better evidence existed, and was not used or disclosed. Fujitsu held audit data that the Court of Appeal described as "a complete and accurate record of all keystrokes" made on Horizon. The Post Office "did not use audit or ARQ data" when disputes arose, and relied on management data instead; Fraser J had said the audit data "will be far superior and the best evidence available of what has occurred on Horizon".1 Fujitsu's records of bugs (called PEAKs and KELs) were, so far as the court knew, not disclosed in any of the 42 prosecutions before it.1
The criminal appeals, 23 April 2021. In Hamilton v Post Office Ltd, the Court of Appeal heard the appeals of 42 former SPMs.1 In the cases it called the "Horizon cases", there was no independent evidence of an actual shortfall: "If the Horizon data was not reliable, there was no basis for the prosecution."1 The court said the Post Office "effectively sought to reverse the burden of proof": it "treated what was no more than a shortfall shown by an unreliable accounting system as an incontrovertible loss", and "Defendants were prosecuted, convicted and sentenced on the basis that the Horizon data must be correct, and cash must therefore be missing, when in fact there could be no confidence as to that foundation."1 All the convictions in the 39 Horizon cases were quashed. In the other three appeals the court found that Horizon data was not essential to the prosecution, and those convictions stood.1
What an engineer takes from it
A record tells you what a system wrote down. It does not, by itself, tell you what happened. Before a system's output is used against a person (a missing-cash claim, a fraud flag, a refused payment), three questions need answers that a stranger could check:
- Is there evidence independent of the system? In the Horizon cases there was none, and that was fatal.1 A system's output can start an investigation. It should not be the whole of the case.
- Who could change the record, and would anyone be able to tell? Horizon's data could be changed by a party other than the SPM, and an injected transaction would look like the SPM's own.1
- What known problems were disclosed? The bug records existed and were not disclosed in the prosecutions.1 A record shown without its known defects is a partial record.
Look at the three appeals that were dismissed: there, the court found the case did not rest on Horizon data.1 The judgment is not "computers are never evidence". It is that a computer record must be shown to be reliable before anyone relies on it, and the person accused must be able to challenge it.
The misconception this corrects: "Computer records are accurate unless someone proves otherwise." The Court of Appeal found that treating Horizon data that way put an improper burden on the accused, who had been denied the material they needed to challenge it.1
At Big Widget Company
Big Widget runs a made-up warranty-claim model that scores dealer claims for possible fraud. The model flags a dealer in Leeds: claims "do not match" parts usage. A manager wants to cut off the dealer's payments. Using the three questions, the engineer who owns the model says:
- Independent evidence? The flag is a model score. Someone must check the claims against parts invoices and the vehicles themselves before any action against the dealer.
- Who could change the record? The parts-usage table is fed by a nightly job that the data team can re-run and edit. Has it been edited since the claims were made, and could we tell?
- Known problems? The model's issue log lists a known fault with one region's part codes. That fault must be shown to whoever decides, and to the dealer.
Until those answers are in, the flag is a reason to look, not a finding. The gate's answer to the manager's request is hold (wait for a person), not no. What is held is the proposed cut-off, not the dealer's money: nothing is decided against the dealer, and their ordinary payments carry on while the checks run. Only the warranty operations lead, a named role, can take the request off hold or escalate it. A hold is not a back door to the cut-off. If a question cannot be answered, the honest answer is "not checked", and the cut-off does not go ahead on the flag alone.
Stopping a dealer's payments would itself be an adverse action. If someone thinks money must be stopped while the checks run, that is a separate decision: a person makes it, writes down why and for how long, and the dealer is told how to challenge it. A model flag does not make that decision.
2. Designing a record that shows tampering
Figure data as text
Three parts of a checkable record
- SAME BYTES — canonical JSON (JCS): properties sorted, array order kept, numbers written one fixed way. [s4]
- CHAIN — each entry hashes the last: change, remove or reorder one and every later hash changes. (course)
- SIGN — a signed checkpoint: the entry count and head hash, signed with an Ed25519 key. [s5, s6]
- CHECK — against what you got separately: verify with a key and checkpoint not taken from the bundle. (course)
Objective: 400.8-b. Text equivalent of figures/three-parts-of-a-checkable-record.svg.
Horizon shows why someone checking a record needs to know whether it has been changed. This section builds a record that makes changes visible. It is a design for detecting tampering, not preventing it. Researchers on tamper-evident logs put it this way: tamper-resistance "might be impossible", but tamper-detection "should be guaranteed".3 And detection only happens when someone checks: "If the log is never examined, then tampering cannot be detected."3
The design has three parts.
Part 1: the same content always gives the same bytes
A hash or a signature is computed over bytes, not over meaning. Two JSON records can say the same thing in different bytes: {"b":1,"a":2} and {"a":2,"b":1}, or the same record with different spacing. If the writer and the checker produce different bytes, an honest record fails to verify. RFC 8785, the JSON Canonicalization Scheme (JCS), addresses this: "Cryptographic operations like hashing and signing need the data to be expressed in an invariant format".4 Under JCS, object properties "MUST be sorted recursively", array order "MUST NOT be changed", and numbers are written one fixed way; a value of NaN or Infinity makes a compliant implementation stop rather than guess.4 Beacon, the Foundation's evidence tool used in this course, says it serialises each record in JCS form before signing it.5
Part 2: each record is chained to the one before
Each new entry in the log includes a hash of the previous entry. Change, remove or reorder any earlier entry and every hash after it changes. The checker recomputes the chain from the start and compares.
A plain hash chain has a cost: to check it, an auditor must walk every entry. Crosby and Wallach (2009) note that hash-chain logs "require auditors examine every intermediate event between snapshots", and that proving one event is in a log of 80 million events could need "an 800 MB trace", where their tree-based design "returns a 3 KB proof".3 Certificate Transparency, an Internet protocol for public logs of web certificates, uses Merkle trees for the same reason; its specification says "Merkle consistency proofs prove the append-only property of the tree".6 For a course-sized log a chain is enough. For a log of millions of events, use a tree. Section 2 of the technical gear shows both.
Part 3: a signature over a checkpoint
At intervals, the log owner signs a checkpoint: the number of entries so far and the hash at the head of the chain. Certificate Transparency calls its version a signed tree head, and says each log "SHOULD sign its current tree head information" periodically.6 This course uses Ed25519, specified in RFC 8032, whose public keys are 32 bytes and signatures 64 bytes.7 Beacon says it signs with an Ed25519 key.5 Checking the signature means checking the signed bytes against a public key; it fails if the signature does not match.7 Note what that means: comparing the key in the bundle with the key you expect is not the same as checking a signature. The check must actually verify a signature, made with that key, over the checkpoint you expect.
What a check proves, and what it never proves
Suppose the chain recomputes correctly and the signature on the checkpoint verifies. What do you know?
It depends on where the key and the checkpoint came from. If both came inside the bundle, a forger could have built the whole thing: their own key, their own shorter chain, their own checkpoint, all internally consistent. Two attacks matter:
- Truncation. Cut the last ten entries from a 100-entry chain. The 90 that remain still chain correctly. Only a checkpoint that says "100 entries, head hash X", received from somewhere the forger could not touch, shows that ten are missing.
- Two versions of history. A log owner can show one history to one auditor and another to a second. Crosby and Wallach describe a logger presenting "different views of the log to different auditors and clients", and say auditors must compare the commitments they receive, or the logger must publish its commitment "in a public fashion".3 The Certificate Transparency specification describes the same risk, "a misbehaving log that shows different, inconsistent views of itself to different clients".6
So the stranger needs two things that do not come in the bundle: the pinned public key (a copy of the signer's key received through a separate, trusted channel, such as the auditor's own records or a published registry) and the expected checkpoint (the entry count and the head hash, also received separately). The count alone is not enough: a log owner with the real key could sign a different history of the same length, and only the head hash would differ.
With those two, a check passes only if all of this holds: the bundle contains a checkpoint with exactly the expected count and head; its signature verifies under the pinned key; and the chain, recomputed from the start, reaches that same head at that count. A bundle with no signed checkpoint fails. So does one whose only signed checkpoint is an older, shorter one. When the check passes, it means something specific.
| Proved, when checked against the pinned key and the expected checkpoint | Not proved |
|---|---|
| The entries up to the checkpoint are byte-for-byte unchanged since they were signed | That what the entries say is true (a correct signature on a wrong number is still a wrong number) |
| They were signed by whoever holds the private key matching the pinned public key | Whose key it is, if the key came only from the bundle |
| No entry up to the checkpoint was removed, added or reordered | That nothing happened after the checkpoint, or that nothing was left out of the log entirely |
| That the decision recorded was the right one | |
| That the policy a receipt names was actually applied, or that the approval it records really happened | |
| Anything about what happened before the record was signed |
The last row is where Horizon comes back. Had Horizon's branch records been signed the moment they were written, a signature would show they had not been changed afterwards. It would not show that the system computed them correctly: a bug, or an injected transaction, written into the record before signing would be signed along with everything else, and would verify.1 Signing makes the record tamper-evident from the moment of signing. It does not make the system that wrote it reliable.
The same limit applies to evidence carried up this course. Your Level 300 hold card and audit receipt arrive in your 400 bundle with a label saying where they came from and whether they were signed when made. If you sign them now, while packaging, your signature proves the bundle has not changed since you packaged it. It proves nothing about what happened at Level 300.
A signature also has a lifetime. RFC 8032 says Ed25519 is intended to operate at around the 128-bit security level, and that "A sufficiently large quantum computer would be able to break both" of its curves.7 A record meant to be checked in many years should say which algorithm it used, so a future checker can judge whether it still holds.
The misconception this corrects: "A signed record proves that what it says is true, and a chain that verifies is complete." A signature proves who signed which bytes. A chain that verifies on its own proves only that it is self-consistent. Completeness needs an expected checkpoint from outside the bundle, and truth needs evidence from outside the system.
At Big Widget Company
The warranty team chains every model decision as a receipt and signs a checkpoint each night. An internal auditor receives a bundle with 4,000 receipts that verify perfectly. Before signing off, she asks two questions the bundle cannot answer by itself. Is this the key I expect? She compares it with the fingerprint the security team registered when the key was created, which she keeps in her own records. Is this all of it? She compares the last checkpoint in the bundle with the one the system emailed to the audit team's mailbox that night: count and head hash. The emailed checkpoint says 4,112 receipts, and the bundle has no signed checkpoint for 4,112. 112 are missing, and the bundle alone would never have shown it. She records the check as failed and holds the bundle; she does not guess what the missing receipts said. What they said is "not known yet", and she asks the owner of the receipt log to explain the gap and send a bundle that verifies. (The numbers in this example are made up.)
3. The bundle: what a stranger needs, and what they must never get
An evidence bundle is what you hand to an auditor who has never seen your system, so they can check your records offline, without asking you anything. Beacon's bundle, for example, contains "the manifest, the NDJSON receipt log, the public keys, the policy YAMLs, the checklists, and a one-page VERIFY.md".5 Beacon is the Foundation's own tool, so read its page as developer documentation, not as an independent test of what it does.
What the bundle must contain
| Item | Why the stranger needs it |
|---|---|
| The receipt chain and its signed checkpoints | The records themselves, in a form that shows tampering (section 2) |
| The public keys, plus a note saying where to get a trusted copy of each | To check signatures; the note tells the stranger how to pin each key from outside the bundle |
| The policy file and its hash | Each receipt names the hash of the policy it refers to, so the stranger can confirm the file in the bundle is that version |
| A framework crosswalk | A map from each requirement the system must answer to, to the receipts and files offered as evidence for it |
| VERIFY.md | Step-by-step instructions to verify everything offline, with nothing from you but the bundle |
| A signed manifest | A list of every other file and its hash, signed separately, so the stranger can tell if a file was added, removed or changed after packaging |
The manifest, built in one direction. A file cannot sensibly sign itself, so this course builds the manifest last. First write every other file. Then write MANIFEST.json, listing each of those files and its hash; it does not list itself or its signature. Then sign the manifest with a packaging key and put the signature in a separate file, MANIFEST.sig. The packaging key is pinned from outside the bundle, like the log key. The stranger checks in reverse: the manifest's signature, then each file's hash, then that no unlisted file has crept in, then the chain. The manifest proves only that the bundle has not changed since packaging. (This design is the course's own, not taken from Beacon's page.)
What the policy hash does and does not show. A matching hash shows which policy a receipt refers to. It does not show that the system actually applied that policy. That takes separate evidence, such as an independent test of the gate against the policy.
The crosswalk names requirements precisely and dates them. A made-up example: "Big Widget warranty policy v7, rule 4: every adverse dealer decision is held until the warranty operations lead approves it. Evidence: hold receipts followed by approval receipts from that role. Checked against policy-v7.yaml on 18 November 2026." If an entry cites a law or standard, it must say exactly which text it was checked against, and when. If nobody has read that text, the entry says "not checked".
VERIFY.md should end with the stranger's own statement, written in the bounded terms of section 2: "Entries 1 to 4,112 are unchanged since signing by the key with fingerprint F, as checked on [date] against a key and checkpoint received from [channel]." A person writes and signs that statement; a script that prints "pass" is not a sign-off. It should never say "the system is compliant".
What the bundle must never contain
- Prompts. They can hold customer details, trade secrets and anything else a user typed.
- Model outputs. The same risk, and they add nothing the stranger can verify.
- Personal data. No names, contact details or identifiers of customers, staff or dealers.
A receipt is the system's signed statement that a decision was made, naming the policy it refers to, the system, and the role that approved it. It holds no private content: it carries hashes, the decision, the policy hash and a key id, and never prompts, outputs, payloads or personal data. Beacon's page says its beacons "never store prompts or outputs" and keep "Only signed metadata".5 (The page does not say it excludes personal data in so many words; this course's rule does.) A bundle that includes prompts, outputs or personal data fails this course's check, however complete it looks: it turns an audit file into a data leak, and it travels to a stranger.
Who approved, without naming anyone. The receipt names a role, such as "warranty operations lead", and the id of the gate's key, never a person's name or staff number. A staff number is not a way round the rule: if it can be traced back to a person, it is personal data. Which person held the role that day stays in the company's own access-controlled records, released only through its own process (an HR or legal request, say). Be honest about the limit: from the bundle alone, the stranger can tell that an approval by that role was recorded. They cannot tell which person approved, or that the approval really happened. A signed receipt shows its words have not changed; it does not show they are true.
More is not better; the right evidence is
In the Horizon cases, the right data did not reach the people who needed it: the audit data that the court called "the best evidence available" was not used, and the bug records were not disclosed.1 A good bundle is small and complete for its purpose. Alongside the items above, include your known-issues log, written without personal data: the stranger needs to know what you knew was wrong, as the SPMs did.
The misconception this corrects: "More evidence is always better, so include the prompts and outputs." The stranger needs what lets them verify the records and judge the decisions: the chain, the key route, the policy, the crosswalk, the instructions and the known issues. Prompts and outputs add risk without adding proof.
At Big Widget Company
A draft bundle for the warranty model contains: the receipt chain; the nightly checkpoints; the public key and a note on where the security team publishes its fingerprint; policy-v7.yaml and its hash; a crosswalk; VERIFY.md; the known-issues log; a folder of 300 sample model inputs and outputs "for context"; and a spreadsheet of flagged dealers with names and contact details. The engineer removes the last two, then rebuilds the manifest from the files that remain and signs it again. The receipt chain and its checkpoints do not change, because the samples and the spreadsheet were never in the log. Everything else stays.
4. The three yeses for records
A gate has four answers: allow, constrain, hold, deny (go ahead, only this far, wait for a person, no). Every receipt records which one it gave.
- Get to Yes: a gate decides before a system's output is used against anyone. A bare model flag gets hold (wait for a person), not no, and what waits is the proposed action, not the person's ordinary dealings. Before the gate can say go ahead, write down what independent evidence is needed, who can change the records, where the known-issues log lives, and which named role can end the hold. A hold does not last for ever: if the evidence never arrives, the proposed action does not happen. Set up the chain, the keys and the checkpoint channel before the first decision, not after a dispute.
- Stay at Yes: an approval at setup is not the end. Sign checkpoints on a schedule and send each one, outside the bundle, to someone who does not run the system. Someone must actually check: a log nobody examines detects nothing.3 Keep checking that every decision, including operator edits, still lands in the chain.
- Recover to Yes: if a record is disputed, hand over the bundle and the known-issues log, and let the other side check it for themselves. If a check fails (a missing range, a key or head that does not match), say so, name who owns the fix, stop relying on the affected records, and find out why before anyone acts on them. If you do not know the cause yet, say "not known yet" and who is finding out. Stopping is not the same as recovering: claim you are back at yes only when a fresh bundle verifies and the cause is written in the known-issues log.
Practise on the course sandbox, and know which rules you are using
The bundle you design here is the kind you hand to a stranger in 400.9 and in the Level 400 project. To practise the check, the course repository's offline sandbox (apps/sandbox400/ on the main branch) has a verifier and a made-up project bundle, bw-svc-notes-400p, with a trust file that stands for the key fingerprints and checkpoint you would receive separately. Its README maps it to this module. There is a prepared output, prepared/400P-b-verify-bundle.txt, if you would rather read the result than run it.
That kit is not a copy of the check in section 2. It answers the same questions (right key? chain intact? a signed checkpoint matching the count and head you received separately?), but it is built differently, as each bundle's VERIFY.md says:
- it signs every record, as well as each checkpoint;
- it numbers records from seq 0 in the project bundle, and its checkpoint names the seq of the last record covered, so "seq 41" means 42 records;
- it starts the chain from 64 zeros and hashes each record in its own fixed form, so its fingerprints will not match ones worked out with this module's rules.
Since 19 November 2026 the kit, like this module's check, rejects a bundle with no signed checkpoint or with only an older one. Use this module's rules for this module's examples, the workbook and the quiz (records numbered from 1, a checkpoint that states a count). Use the kit's VERIFY.md for the kit. A kit "ACCEPT" is not a run of this module's check, and it is not a sign-off: its keys are public course test keys, so it shows how checking works, not who signed.
Words to know: canonical serialisation, hash chain, checkpoint, signature, pinned key, truncation, attestation, evidence bundle, signed manifest, crosswalk, VERIFY.md.