How the chain works
Each entry is written in a fixed byte form, hashed, and the next entry includes that hash. Change one byte of entry 12 and its hash changes, so entry 13 no longer points at it, and every link after that fails too. Remove entry 12 and entry 13 points at a hash nobody holds. Swap two entries and both links break.
Two details make the hashes mean something:
- One way to write each entry. The same content has to produce the same bytes every time, or honest copies would disagree. JSON has many spellings of one value, so systems pick a canonical form such as RFC 8785,3 which is what Deedglass uses for its records (source 5).
- Numbers with no gaps. Numbering entries 1, 2, 3 per chain lets a reader notice a missing entry by its number as well as by its hash. Deedglass numbers each org’s records from 1 with no gaps, and its database refuses a second record with the same predecessor, so the chain can’t fork (source 5, source 6).
Signatures on top
A hash chain alone shows the entries agree with each other. It doesn’t show who wrote them: anyone who can rewrite the whole log can recompute every hash. Signing each entry, or the latest one, with a private key closes that gap for anyone who holds the matching public key. Ed25519 (RFC 8032, source 4) is a common choice because its signatures are small and quick to check.
What it doesn’t show
- That an entry was true. A chain records what the writer said happened. If the writer was wrong, the chain is a well-kept record of a wrong statement. That is why it matters what the writer checked before it wrote: the tool’s own answer, a read-back, or the database’s change log.
- The newest entries. If the last entries are deleted, what’s left is still a valid chain. A reader who kept the latest sequence number or hash, or who receives it some other way, can tell; a reader with nothing to compare against can’t.
- A stolen key. Whoever holds the signing key can write a convincing new chain. Deedglass’s docs say a record is as trustworthy as the instance that signed it and its seal key (source 1).
The useful word is tamper-evident: changes can be detected by anyone who checks. It isn’t a promise that nothing can be changed.