Hash-chained log

Last checked · 2 min read

A hash-chained log is a list of entries where each one includes the hash of the entry before it. Editing, removing or reordering any entry changes every hash after it, so a reader who checks the chain can tell. It shows that the log is intact, not that each entry was true.

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.

An example

Export and check the chain (a real run of the demo)text
◐ Exporting records 1 → 35 for org_01m45g49…
✓ 35 records · 11.2 kB to stdout
✓ Bundle manifest matches · sealed by sk_01m448at…

How Deedglass uses it

Deedglass seals each action's record and links it to the one before, then publishes the public keys.1 Anyone can export the chain and check every seal and link on their own machine, or paste records into the checker on this site.2

Related on this site

Sources & Reference Citations (6)

Citations
  1. 1Deedglass docs: Records and the record chain · docs.deedglass.com · checked 18 October 2026
  2. 2Deedglass docs: Check records as an auditor · docs.deedglass.com · checked 14 October 2026
  3. 3RFC 8785: JSON Canonicalization Scheme (JCS) · rfc-editor.org · checked 18 October 2026
  4. 4RFC 8032: Edwards-Curve Digital Signature Algorithm (EdDSA) · rfc-editor.org · checked 18 October 2026
  5. 5Deedglass source: the record body (JCS digests, seq from 1 with no gaps) · github.com · checked 18 October 2026
  6. 6Deedglass source: the records table (one child per parent) · github.com · checked 18 October 2026

Last checked 18 October 2026. We re-check the glossary every month. If something here is wrong, write to hello@deedglass.com.