Definition
Immutable evidence is a way of keeping records in which an accepted record is never changed or deleted. A mistake is corrected by adding a new record that names the record it corrects and states why, so the old record and its successor both remain, and readers find the current value by following these links. How strongly immutability holds depends on what enforces it: an agreement among people, file permissions, or storage that refuses changes. Digests chained from record to record make a silent edit detectable.
The idea
An analyst finds that a summary reported a duration in the wrong unit and fixes the number in place. Last month’s report quoted the old number. A reader who compares the two can no longer tell which is right, whether the old number was ever there, or which other results used it. The correction destroyed the evidence that a mistake happened.
Immutable evidence treats records like a bound laboratory notebook with numbered pages, written in ink. A wrong entry stays where it is; the correction goes on a new line, with a date and a reason, and refers back to the wrong entry. The history of what was believed, and when, survives. The picture stops being accurate at enforcement: ink stops nobody from rewriting the whole notebook. Digital records need a mechanism that makes such a rewrite either impossible or detectable.
How it works
Identify each record. Give each record a sequence number and compute its digest, a short fingerprint of the record’s bytes computed by a cryptographic hash function §5.1. Encode every record in one fixed way, so that the same content always gives the same bytes and therefore the same digest.
Append only. Add new records at the end, and never rewrite or remove an earlier one.
Chain the records. Put into each record the digest of the record before it, in a field often called
prev. The digest of the newest record, called the head, then depends on every earlier record. This structure is a hash chain.Anchor the head. Copy the head digest to a place that the record keeper cannot rewrite: give it to a reviewer, publish it, sign it with a key held elsewhere, or enter it in an independent append-only log §8.13.
Correct by appending. A correction is a new record. It names the corrected record by sequence number and digest, states the reason, gives the corrected value or the exact computation and inputs that produce it, and lists the results that used the old value.
Select the current version by rule. A record counts as current unless a later record names it as corrected. A correction can itself be corrected later, which forms a sequence of successors.
Verify. Recompute every digest, check every
prevfield, check that every correction names an earlier record with a matching digest, and compare the head with an anchored copy.
The digests give tamper evidence, meaning a change is detected; they do not give tamper resistance, meaning a change is prevented. Prevention comes from the storage, in increasing strength. A convention (“nobody edits these files”) stops only accidents. Read-only permission bits stop other users but not the file’s owner or an administrator, who can switch them back. On Linux the immutable file attribute, set with chattr +i, blocks every change, including by the owner, until a process with administrator privilege clears it. Write-once storage, which refuses to change or delete an object until a retention period ends, resists administrators as well. Copies held by independent parties protect against the loss or replacement of the whole store.
Worked example
A timer counts 32,768 ticks per second. Record R1 stores a measurement of run A as 655 ticks and, by mistake, converts it to 655 microseconds, as if each tick lasted 1 microsecond. Record R2 stores run B, measured with a different instrument, as 20,113 microseconds. Each record is one line of text. In the lines below, and stand for the 64 hexadecimal digits of the SHA-256 §5.2 (Secure Hash Algorithm with a 256-bit output) digests of R1 and R2.
R1:
seq=1;prev=none;run=A;ticks=655;us=655R2:
seq=2;prev=;run=B;us=20113
The correct conversion is 1 tick microseconds, so 655 ticks microseconds, about 19.99 milliseconds. The correction is appended as record R3:
R3:
seq=3;prev=;corrects=;why=timer runs at 32768 Hz;us=19989.01
R3 carries two links with different jobs. Its prev field points to R2, the record just before it, and keeps the log in order. Its corrects field points to R1, the record it supersedes. R1 stays unchanged: the count of 655 ticks was measured correctly, and only the conversion was wrong.
Computed over these exact lines, begins 6ace3673fa1f93f6, begins cab533f94ba6b031, and the head , the digest of R3, begins e5fa8d7ad35024a0. A reviewer keeps a copy of . Later, someone edits R1 in place to read us=19989.01, hiding the mistake. The edited R1 has a digest beginning 70777a297604d775, which no longer matches the stored in R2 and R3, so verification fails at R2. To hide the edit, the editor would also have to rewrite R2 and R3 with new digests. The new head would begin 53a5e822d29cf595, which differs from the reviewer’s copy of , so the rewrite is detected as well.
Stated precisely
Let be the records in order, let be the fixed byte encoding of record , and let be a cryptographic hash function. Each record with contains the field , and the head is . Suppose a verifier holds a copy of . If someone presents a different sequence of records that still passes every prev check and ends in a record whose digest is , then the two sequences contain two records with different encodings but the same digest under , which is a collision of .
The detection guarantee therefore rests on three assumptions.
Collision resistance §5.5: nobody can feasibly find two different byte strings with the same digest under .
An unambiguous encoding: different records always have different encodings, and a first record with no predecessor cannot be mistaken for a later one.
A trusted head: the verifier’s copy of came from an anchor that the record keeper cannot change, not from the record keeper’s own storage at the time of checking.
Without the third assumption, someone who controls the storage rewrites every record from the change onward, recomputes every digest and replaces the head, and the altered chain verifies.
A correction record that supersedes , with , contains . Record is current unless some later record names it as corrected; the current version of a fact is the last record in its sequence of successors. Superseding neither deletes nor declares that it never existed. It records that, from position onward, is selected in place of .
Limits and common mistakes
A hash chain detects changes; it does not prevent them, and it does not prevent loss. Deleting the whole store, or only its last few records, goes unnoticed unless someone holds the head digest or the record count.
A record keeper can show different chains to different readers. Publishing the head to several independent parties, who compare their copies, detects such a split. Logs built as a Merkle tree §5.43, a structure in which each node holds a digest of the nodes below it, such as the Certificate Transparency logs of RFC 9162, also give short proofs that a later state of the log extends an earlier one.
Immutability preserves records; it does not make them true. A faithfully preserved wrong measurement is still wrong. The preserved record of the error is exactly what lets a reader find the results that used it.
Read-only permission is a lock whose key the owner holds. A claim that evidence is immutable must name the mechanism and the parties it resists.
Questions answered
How are corrected records linked to their predecessors?
A corrected record is linked to its predecessor by a new correction record that names the predecessor; the predecessor itself is never edited. The correction record contains the predecessor’s identifier and digest (a fingerprint of its bytes computed by a cryptographic hash function), the reason for the correction, the corrected value or the exact computation and inputs that produce it, and the results that used the old value. The predecessor stays unchanged. A reader finds the current value by following these links: a record is current unless a later record names it as corrected.
When the records also form a hash chain, in which each record stores the digest of the record before it, a correction record carries two links with different jobs. One points to the record immediately before it in the log and keeps the log in order. The other points to the record it corrects, which may be much earlier. Editing the old record in place instead would change its digest and break the chain at every later record; appending a correction keeps every earlier digest valid and keeps the mistake itself visible.
Related entries: Chain of custody (§13.5), Raw data versus derived data (§13.16), Data lineage (§13.18), Append-only log (§8.13), Merkle trees and authenticated data structures (§5.43), Canonical record (§13.13). Further reading: [97].