security
Burn-After-Read and Sealed Storage
Burn-After-Read and Sealed Storage
Deleting a file doesn't reliably destroy it, and a delete made of several steps can be interrupted. Encrypting each item under its own data key turns destruction into destroying a small key.
store: random data key → encrypt payload chunks with a fast AEAD
wrap the data key to the machine identity → keep the wrapped key in the row
burn: 1. clear the wrapped key
2. delete the ciphertext
3. mark or remove the record
Key first. A crash after step 1 leaves ciphertext nobody can open. The reverse order can leave a readable orphan.
The user-facing half is ordering too. When opening destroys, ask where to save before opening, so cancelling costs nothing. Record the item as opened only after the write succeeded and was verified, or report the failure honestly if the destructive read already happened. Never write a secret to disk as plaintext on the way.
Keys in memory should be zeroed on drop and, where the platform allows, locked out of swap.
Limits. None of this stops the recipient copying what they read, or protects a compromised machine. Once ciphertext is copied to a third-party service, burn can no longer be promised.
Used in: Ferry