Crypto-shredding does not delete anything from your old backups
An erasure request comes in. The person's data is in your database, in three replicas, and in nightly backups you keep for five years because a regulator told you to. You cannot rewrite a backup. Most teams answer with crypto-shredding: encrypt every record under its own key, and when the record must go, delete the key. Ciphertext without a key is noise, so the backups are dealt with by…
Erasure requests in databases lead to a situation where data is in the database, replicas, and backups for several years. Crypto-shredding is a method where each record gets its own random data key (DEK) that encrypts the record, and a master key (KEK) encrypts the DEK. After erasing a record, the DEK is set to NULL, leaving only the ciphertext.
However, the fact that the wrapped DEK is stored in the same row as the ciphertext means that backups taken before the erasure still contain the wrapped DEK, rendering the erased record recoverable. The standard encryption method, envelope encryption, is vulnerable to this issue. To truly destroy the data, the master key must also be destroyed along with the wrapped DEK, a process called rotation with retirement.
This involves generating a new master key, re-wrapping every live DEK under the new key, and then destroying the old master key from all places it resides, including backups. This ensures that any erased record is unrecoverable from both the live database and backups older than the last master key destruction. The true guarantee of erasure depends on the rotation cadence, meaning that if the erasure promise is within a certain timeframe, the master key should be rotated and destroyed at least that frequently.
Written by urgent.news from Dev.to's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.