Hash chains provide mathematical proof that audit logs have not been tampered with. Each log entry includes the SHA-256 hash of the previous entry, creating a linked sequence where any modification is immediately detectable.
1. First entry — Hash is computed from the event data
2. Each subsequent entry — Hash is computed from the event data + the previous entry's hash
3. Verification — Recompute all hashes from the beginning; if any hash doesn't match, the chain is broken
SHA-256 (Secure Hash Algorithm 256-bit) is a cryptographic hash function that produces a 256-bit (32-byte) digest. It is:
Hash chains and blockchains both use cryptographic linking, but they differ:
|---------|-----------|------------|
| Consensus | Single authority | Distributed consensus |
|---|---|---|
| Cost | Negligible | Gas fees / mining |
| Use case | Audit logs, tamper detection | Decentralized ledgers |
For audit logging, hash chains provide the same tamper-evidence guarantee without the overhead of blockchain.
Every event in Trailbase is cryptographically linked in a SHA-256 hash chain. You can verify the entire chain with a single API call (trailbase.verifyChain()). If any log has been modified or deleted, the verification will fail and alert you.
Deploy enterprise-grade audit logging and compliance automation in five minutes.