EVSM Studio

Security & SOC2 Compliance Engineering

Tamper-Evident SHA-256 Hash-Chain Audit Logs & Ed25519 Checkpoints for SOC2 (2026)

Updated 2026-12-05 · Compliance Infrastructure · 5 min read

Direct Answer Verifiable SaaS audit logs combine canonical sorted-key JSON SHA-256 chaining (so Node.js and Python verifiers agree byte-for-byte) with offline Ed25519 checkpoint seals that expose row deletion, reordering, and silent truncation.

1. Cross-Runtime Canonical Hash Chaining

Recursively sort object keys and eliminate formatting variance before computing each entry digest so SIEM exports and standalone auditor scripts compute identical SHA-256 hashes.

def canonical_json(obj) -> str:
    return json.dumps(obj, sort_keys=True, separators=(",", ":"))

def chain_digest(prev_hash: str, body: dict) -> str:
    return hashlib.sha256(f"{prev_hash}|{canonical_json(body)}".encode()).hexdigest()

2. Ed25519 Anti-Truncation Seals & PII Redaction

Mask emails, API tokens, and tax IDs prior to hashing so compliance exports remain GDPR-safe without invalidating the chain, and test full break/tamper detection live in AuditVault Kit ($49).

Run AuditVault Hash-Chain & Ed25519 Kit

Included inside the $79 25-Kit All-Access Commercial Pass with 10 Node tests and 6 Python tests.