hash chain
A sequence of records in which each hash covers the previous hash as well as the new data, so changing any earlier record changes every hash after it.
In more detail
Because each link depends on everything before it, editing one old entry breaks that link and all later ones. Anyone holding a published copy of the latest hash can therefore detect tampering. To hide an edit, a forger would have to recompute every later link and replace every copy others already hold. Git history, tamper-evident audit logs and blockchains all use this idea.
Examples
data = prev + json.dumps(entry, sort_keys=True); prev = hashlib.sha256(data.encode()).hexdigest()Changing the first of three payments made all three recomputed links report brokenRelated terms
- hash — A short fixed-length fingerprint calculated from data, which changes completely if even one byte of the data changes.
- tamper-evident — Built so that any unauthorised change leaves visible signs, even if the change itself cannot be prevented.
- blockchain — A shared record of transactions kept as a chain of blocks linked by hashes, copied across many participants so that past entries are hard to change unnoticed.
- integrity — The guarantee that data has not been changed, by accident or on purpose, without the change being detected.
Taught in
- Cryptographic Hashing: SHA-256, SHA-3 & Passwords — Cybersecurity Fundamentals, GRC & Cryptography