Notesfoundations🌱 seedling

Crypto-Shredding

Also: Cryptographic Erasure · Crypto Shredding · Cryptographic Erase

Crypto-shredding erases data by destroying keys instead of data: each subject's records are encrypted with their own key, and deleting that key makes every copy (log, replicas, backups) unreadable without rewriting anything.

Why it exists

Some stores can't delete one record: append-only event logs used for Event Sourcing, WORM archives, backup snapshots. Rewriting them to remove one person is impractical or impossible.

How it works

  • Generate a per-subject key (often a data key wrapped by a master key in a KMS) and keep it in a separate key store.
  • Encrypt that subject's personal fields before they're written to the log.
  • Readers fetch the key and decrypt; caching keys has to respect deletion too.
  • To erase: delete the key. All ciphertext for that subject, everywhere, becomes unreadable.
  • NIST's sanitization guidance (SP 800-88, revised 2025) recognises cryptographic erase as a purge technique.

Trade-offs

Gains Costs
erases from immutable logs and backups key store becomes critical infrastructure
one small, fast operation per-record crypto and key lookups on every read
other subjects untouched key backups need their own deletion story

In practice

  • Kafka: where the log can forget, prefer real deletion: a compacted topic treats a key with a null value (a tombstone) as a delete, and keeps the tombstone for delete.retention.ms (one day by default). Crypto-shredding covers topics that are never compacted.

Pitfalls

  • Plaintext copied out before key deletion (search indexes, warehouses, log lines) is not erased.
  • Ciphertext kept for decades must stay secure against future cryptanalysis.
  • Not settled law: no EU regulator has clearly confirmed that key deletion counts as erasure; use it as defence in depth.

Recall

These cards are also in your review deck, scheduled with spaced repetition.