Hash Chain
A sequence of audit log entries in which each entry includes the cryptographic hash of the previous entry — making post-hoc tampering detectable.
Hash Chain
A hash chain is a sequence of records (typically audit log entries) where each entry includes the cryptographic hash of the previous entry. Altering any past entry breaks the chain's integrity at every subsequent entry — detectable by anyone running a verification pass.
In Papyrus, the audit log is hash-chained. Every entry includes a prev_hash field that's the SHA-256 hash of the previous entry's content. A verification pass walks the chain, recomputing hashes and comparing.
An attacker who alters a past entry must also alter the prev_hash of every subsequent entry to keep the chain consistent. With external anchoring (periodic publication of the chain head to a third-party log or blockchain), even this becomes detectable.
Hash chains are the cryptographic primitive behind blockchain itself — but you don't need a blockchain to use them. Papyrus's audit log uses them in-place without external dependencies.