SHA3-256 Chain Merkle Root Anchoring Post-Quantum Signed

Tamper-Proof Audit Trails

Every log entry is cryptographically chained to the previous. Modify one entry and the entire chain breaks.
Immutable by math, not by access control.

31ns
Audit Read Latency
0
Entries Deletable
3
PQ Signatures
96ns
SHA3-256 Hash
Definition

A tamper-proof audit trail is a sequence of log entries where each entry includes the SHA3-256 hash of the previous entry. This creates a cryptographic chain: modifying, deleting, or reordering any entry produces a hash mismatch that is immediately and automatically detectable. Unlike traditional logs protected by file permissions and access controls, a hash-chained audit trail is tamper-evident by construction. You do not need to trust the storage medium. You verify the chain.

The Problem

Why Traditional Logging Fails

Traditional logs are text files. Text files can be edited, deleted, and fabricated. When someone asks "prove this happened," a text file is not proof.

Traditional Logging
Event occurs
Write to log file (append)
Store on disk (mutable)
No integrity proof. Deletable. Editable.
Root user can modify any entry. Insider threats go undetected.
Cachee Hash-Chained Audit
Event occurs
SHA3-256(event || prev_hash || timestamp)
Store with hash chain link (31ns read)
PQ-sign every entry (3 families)
Modify one entry and the chain breaks. Verifiable by anyone.
Architecture

The SHA3-256 Hash Chain

Every audit entry includes the hash of the previous entry. The chain is self-verifying.

Audit Chain Structure

Genesis
T=0
prev: 0x0000...0000
hash: 0xa3f1...e29c
User Login
T=1 (12:00:01)
prev: 0xa3f1...e29c
hash: 0x7b2d...f104
Record Access
T=2 (12:00:03)
prev: 0x7b2d...f104
hash: 0x91ca...8b37
Data Export
T=3 (12:00:05)
prev: 0x91ca...8b37
hash: 0x4ef8...cc12
Session End
T=4 (12:01:22)
prev: 0x4ef8...cc12
hash: 0xd6a0...7e5f

Each block's "prev" field links to the previous block's hash. Break one link and every subsequent hash becomes invalid.

Tamper Detected

An attacker modifies the "Record Access" entry. The chain immediately reveals the tampering.

User Login
T=1
hash: 0x7b2d...f104
MODIFIED
T=2 (altered)
prev: 0x7b2d...f104
hash: 0xFFFF...DEAD
Data Export
T=3
prev: expects 0x91ca...8b37
MISMATCH

The next entry's "prev" hash no longer matches. Tampering is cryptographically provable.

Comparison

Four Approaches to Audit Integrity

Every system needs audit trails. The question is how you guarantee their integrity. Traditional logs rely on trust. Append-only databases rely on the database vendor. Blockchain relies on consensus. Cachee relies on cryptographic hash chains — verifiable by anyone, with zero performance cost. This isn't logging — it's verifiable audit infrastructure.

ApproachTamper DetectionWrite LatencyRead LatencyVerifiableCost
Traditional LogsNone1-10ms5-50msNoLow
Append-Only DBVendor-dependent1-5ms1-10msNoMedium
BlockchainYes1-60s100-500msYes$0.01-$50/write
Cachee Hash ChainYes (SHA3-256)<1us31nsYes (PQ-signed)$0.000005/op

Blockchain gives you tamper-proof ordering at 1-60 seconds per write. Cachee gives you the same integrity guarantee at 31 nanoseconds — then optionally anchors the Merkle root to a blockchain for external attestation.

External Anchoring

Merkle Root Anchoring

The hash chain provides tamper evidence within the system. For external proof — proof that the chain existed at a specific time and was not reconstructed — Cachee periodically computes a Merkle root over the audit entries and anchors it externally.

// Merkle root anchoring merkle_root = SHA3-256( SHA3-256(entry_1 || entry_2) // leaf pair || SHA3-256(entry_3 || entry_4) // leaf pair || ... ) // Anchor to external ledger (optional) ANCHOR merkle_root TO bitcoin // 74 bytes via H33 Substrate ANCHOR merkle_root TO s3 // immutable object store ANCHOR merkle_root TO stdout // print for manual archival

The Merkle root is a 32-byte summary of the entire audit chain at a point in time. Anyone with the root can verify that any specific entry was part of the chain — without access to the full chain. This is the same mechanism that blockchains use for transaction inclusion proofs.

Performance

Traditional Audit Logging vs Cachee

Audit logging should not be a performance tax. With hash chains stored in L1 cache, audit reads are faster than a single network packet.

Traditional audit log read (disk + parse + decrypt) 5,000,000 ns (5ms)
Disk seek + file parse + decryption
Cachee audit entry read (hash-chained, PQ-signed) 31 ns
161,290x
Same data. Same integrity guarantees. No disk. No parse. No decryption overhead.
Pipeline

The Audit Entry Pipeline

Every audit event goes through four stages. Total time: under 500 nanoseconds.

SHA3-256 hash (event || prev_hash || ts)96 ns (45%)
Chain link verification52 ns (25%)
Fingerprint computation42 ns (20%)
Cache store22 ns (10%)
Total per audit event ~212 ns
READ: 31 ns

PQ signing happens asynchronously in batches — 391us per 32-entry batch. Does not block the write path.

cachee-audit-trail-demo
[1] $ cachee audit append --event "user.login" --actor "uid:4821"
    OK chain_id=main seq=1847 hash=0xa3f1e29c...
    prev_hash=0x91ca8b37... latency=198ns
 
[2] $ cachee audit verify --chain main
    Verifying 1,847 entries...
    CHAIN INTACT 1,847/1,847 links verified in 0.34ms
 
[3] $ cachee audit merkle-root --chain main
    root=0xd6a07e5f... entries=1,847 depth=11
 
    Every entry chained. Every chain verifiable. 31ns reads.

Run it yourself: brew install cachee && cachee audit demo

Applications

Where Tamper-Proof Audit Trails Matter

💰
Financial Transaction Replay
SOX Section 404 requires provable transaction history. Hash-chained audit trails provide cryptographic proof that no transactions were altered, deleted, or reordered after the fact.
🏥
Healthcare Access Logs
HIPAA requires audit trails for all PHI access. Every access event — who, when, which record — is hash-chained. Prove to auditors that the access log itself was never tampered with.
🤖
AI Decision Audit
When an AI system makes a decision, the inputs, model version, and output must be logged immutably. Hash-chained audit trails provide verifiable provenance for every AI decision.
🛡
Security Incident Response
During a breach investigation, attackers often delete or modify logs to cover their tracks. Hash-chained logs make deletion detectable — the chain breaks at the point of tampering.
Regulatory Compliance
FedRAMP, CMMC, and SOC 2 all require audit log integrity. Cachee audit trails provide cryptographic proof of integrity — not just a policy document claiming logs are protected.
📦
Supply Chain Provenance
Track every handoff, transformation, and inspection in a supply chain. Each event is hash-chained to the previous, creating an unforgeable record from origin to delivery.
Trust Model

Three PQ Families. Every Entry Signed.

Each audit entry is signed by three independent post-quantum signature families via cache attestation. Forging an entry requires breaking all three simultaneously.

🔒
ML-DSA-65
Lattice-based (MLWE). NIST Level 3. Successor to Dilithium. 3,309-byte signatures.
🔐
FALCON-512
NTRU lattice-based. Compact signatures (656 bytes). Distinct mathematical basis from ML-DSA.
🔑
SLH-DSA
Stateless hash-based. No lattice assumptions. 17,088-byte signatures. Minimal attack surface.
Install

Get Started

brew tap h33ai-postquantum/tap && brew install cachee cachee init && cachee start # Append an audit event (hash-chained automatically) cachee audit append --event "user.login" --actor "uid:4821" # Verify the entire chain cachee audit verify --chain main # Get Merkle root for external anchoring cachee audit merkle-root --chain main # Query audit history for a specific actor AUDITLOG actor:uid:4821 SINCE 2026-05-01

140+ Redis-compatible commands. Every SET is already hash-chained and PQ-signed. The AUDITLOG command reconstructs the full lifecycle of any key or actor. Zero additional infrastructure required. You can take any key and replay its full lifecycle from genesis.

Every entry chained. Every chain verifiable. Every audit passed. These audit records exist because every result begins as verifiable computation.

Install Cachee Compliance Audit

Deep Dives

Knowledge Base

Explore Verifiable Computation Infrastructure

Every page in the Cachee knowledge base. Proven computation, not cached data.

Post-Quantum Caching
The category definition. Run computation once, serve forever.
Computation Fingerprinting
Identity for results. Provenance, not just output.
Cache Attestation
Signed cache entries. Three PQ families per SET.
ZK Caching
Cache STARK and SNARK verification results at 85ns.
Compliance-Ready Infrastructure
Pass audits without slowing down.
Data Lineage Verification
Prove where your data came from.