skip to content

Protecting Key Material

Protecting the keys behind everything else: hierarchies, custody in a device that never exports material, and rotation that keeps old ciphertext readable. Asked because few rotation plans survive it.

on this pageshow

questions

27

A key that encrypts stored records leaked in a contractor's backup — what does minting a new key version protect, and what is already lost?

level: middleimportance: must knowfreq 64%

answer

  1. forward-looking, not retroactive
  2. two things were taken, not one
  3. new writes versus existing ciphertext
  4. re-encrypt only what you still control
  5. retirement stops your own reads

basics

~20 s

Minting a new key version protects only data encrypted after the change. Anything the leaked version already encrypted stays readable to whoever holds it, along with any ciphertext copy they took, so rotation bounds future exposure and never past exposure.

solid answer

~40 s

A new key version changes which key encrypts new writes; it changes nothing about ciphertext that already exists. If whoever took the key also took a copy of the encrypted records, those records stay decryptable to them forever — no later version reaches a copy you do not control. Re-encrypting the data you still hold under the new key is what re-protects those copies, and retiring the old version is what stops your own systems reading anything with the leaked material. So minting buys two things: new writes protected by material the holder does not have, and a path to retirement. It does not buy recovery. Report the exposure as the set of records that key covered, not as fixed by rotation.

go deeper

for a junior

Recall that a key version decides what encrypts new writes. Records written earlier stay tied to the version that wrote them, so a new version changes nothing about data already on disk.

for a middle

Explain the mechanics: ciphertext records which version produced it, a read resolves that version rather than the newest one, and only a separate re-encryption pass moves data onto the new key.

for a senior

Separate what you control from what you do not. Re-encryption protects your own copies, including backups and exports; any copy already taken is permanently disclosed, and the response should be driven off the data the key covered.

for a principal

Own the reporting line. Rotation is a containment step, not a remedy, and the disclosure estimate is the set of records the exposed key protected. Decide what you tell stakeholders before the re-encryption finishes, not after.

## What a key version actually changes A **key version** is one generation of key material inside a key manager. When something asks the manager to encrypt, it uses the version currently marked as the encrypting one, and hands back ciphertext that normally carries an identifier — call it `keyVersion` — so a later read can find the right material again. Designs differ in where that identifier lives and whether it exists at all, but the model is the same everywhere. Minting a new version changes exactly one thing on its own: which version the manager reaches for the next time something asks it to encrypt. Nothing walks the stored data. Every record already written still carries the old `keyVersion` and is still bound to the old material. That is why "we rotated the key" is not an answer to "what did the leak cost us" — rotation is a statement about the future, and the question is about the past. ## The holder has two separate things After key material escapes, work out which of two situations you are in, because the remedy differs: - **The key material alone.** The holder can decrypt anything encrypted under it *that they can also obtain*. The scope is whatever ciphertext they can still reach — live systems, backups, an old export. - **The key material and a copy of the ciphertext.** The confidentiality of that copy is gone permanently. Nothing available to you touches bytes sitting on somebody else's disk. The second case is the one that makes people uncomfortable, and it is the honest default assumption when a key file turns up somewhere it was never meant to be: whoever bothered to keep the key usually kept something to use it on. | What you do | What it fixes | What it does not fix | |---|---|---| | Mint a new version | New writes use material the holder does not have | Anything already written | | Re-encrypt stored data | Copies you control stop opening with the old key | Copies already taken | | Retire the old version | Your own systems can no longer read with it | The holder's copy, which never used your systems | | Destroy the old material | Old ciphertext stops opening for anyone without the key | The holder, who has the key | ## Why the new version cannot reach the past Ciphertext is inert. It is not a live object that consults the manager for the current key; it is bytes that were produced once, under one key, and that only that key opens. A read resolves whichever version the record names, which is exactly why data written years ago still reads correctly after many rotations — and exactly why a rotation cannot retroactively protect it. Moving existing data onto the new key is therefore a **separate job**: read every record with the old key, write it back under the new one. It costs a full pass over the data, it takes real time on a large set, and on a big estate it is scheduled work rather than an incident action. Some managers offer to run that pass for you and some do not; the cost is the same either way, because the bytes have to be rewritten. ## The order the work runs in 1. **Mint** the replacement and point new writes at it. Cheap, immediate, and it stops the exposed set from growing. 2. **Re-encrypt** the copies you still control — and remember that backups, replicas and exports are copies you control too. 3. **Retire** the old version once nothing still needs it, so your own systems stop being able to read with leaked material. Note what is missing from that list: a step that recovers what was taken. There is none. ## Where this goes wrong in practice - An incident note that reads "key rotated, closed", with no statement of what the old key covered. - A disclosure estimate scoped to the data written *after* the leak was discovered, rather than everything the key ever encrypted. - Assuming the old version stopped working the moment the new one appeared. On most designs the earlier version keeps decrypting until it is explicitly disabled or destroyed — which is deliberate, since otherwise every rotation would be an outage. - Confusing **minting** with **retiring**. They are two actions, and only the second one closes anything, and only inside your own estate. - Treating re-encryption as the remedy for the leak rather than as hygiene for your own copies. ## What to say when asked Say that the new version bounds future exposure, that the old ciphertext is unchanged and still opens with the leaked material, that re-encryption helps only the copies you still control, and that the size of the incident is the set of records the exposed key protected — which is a scoping question, not a rotation question.

  • Does destroying the leaked key version make the old ciphertext safe?
    It makes that ciphertext unreadable to anyone holding only the ciphertext — including you — but it does nothing to whoever already has the key material. Destruction closes your own estate's ability to read old data; it does not recall what was taken, and it turns any record you failed to migrate into permanent data loss.
  • How do you decide whether re-encrypting the historical data is worth the effort?
    Weigh what it buys against what it costs. It buys one thing: the copies you still control stop opening with the leaked key. Where the holder plainly took the data as well as the key, re-encryption changes nothing for them, and the effort belongs on bounding what was taken and on the copies still inside your estate — backups and exports first, since they are the ones that outlive everything.

Changing the lock on the filing cabinet does not un-photocopy the pages somebody already carried out of the building.

saying these in an interview costs you the question

  • Says rotating the key fixed the leak
  • Assumes old ciphertext becomes unreadable once a new version exists
  • Forgets the holder may have taken ciphertext copies too
  • Treats minting a new version as retiring the old one
  • Scopes the disclosure to data written after discovery
open as a page

A worker encrypts an applicant field by calling a central service that holds the key — which decisions has the worker stopped making?

level: middleimportance: must knowfreq 54%

basics

~20 s

Key selection, key version, algorithm and rotation all move to the service. The worker still chooses which fields to protect and which logical key name they use, but it keeps ciphertext it cannot read on its own.

open as a page

A store of 20 million encrypted objects rotates the key that wraps every per-object data key — what changed for the objects themselves?

level: middleimportance: must knowfreq 62%

basics

~20 s

Nothing in the objects changed. Rotation rewrites each small wrapped data key under the new wrapping key and leaves every object's ciphertext and every data key exactly as they were, so any copy of a data key or of a ciphertext taken earlier still decrypts.

open as a page

When a settlement signing key is generated inside a device that will not export it, what crosses the boundary on each signature?

level: middleimportance: must knowfreq 60%

basics

~20 s

Only the request and its result cross. The service authenticates, sends a handle naming the key and the instruction's digest, and the device computes the signature internally and returns it. Key material never travels; the operation travels to the key.

open as a page

You inherit a key manager holding a hundred keys with only names - which facts must a key register record about each one?

level: middleimportance: must knowfreq 55%

basics

~10 s

A key register records, per key: one owning team, what the key is for, the systems and data it protects, when it entered service, its current state, and which identities may use it.

open as a page

Rotating which key leaves stored ciphertext untouched, and rotating which one forces you to rewrite every row?

level: middleimportance: must knowfreq 55%

basics

~20 s

Rotating the key that wraps each object's data key is a rewrap: only the small wrapped keys change and the ciphertext is never read. Rotating the key the rows are encrypted under means decrypting and re-encrypting every row.

open as a page

A warehouse rotates its column-encryption key every year - why do seven-year-old encrypted rows still decrypt afterwards?

level: middleimportance: must knowfreq 62%

basics

~20 s

Rotation changes only which key version encrypts new writes. Each stored ciphertext records the version that produced it, and the manager still holds the earlier versions, so old rows decrypt under the key that actually made them.

open as a page

A backup of the metadata table holding every object's wrapped data key leaks — what does the holder actually have?

level: seniorimportance: must knowfreq 50%

basics

~20 s

Wrapped data keys decrypt nothing on their own. They are usable only by getting the key manager to unwrap them, so the leak turns into an access-control question: whoever the manager will still answer can read those objects, and every unwrap it performs is on the record.

open as a page

A settlement signing key never left its device, yet your clearing partner accepted instructions nobody authorised — where do you look?

level: seniorimportance: must knowfreq 52%

basics

~20 s

Look at invocation, not custody. Start with the device's operation count against the instructions the business issued, then the credential that authenticates to the device, the device's rule about who may invoke that key, and the code path that decides what gets submitted.

open as a page

A worker makes one encrypt call to a central service per record at hundreds of records a second — what does batching those calls buy?

level: middleimportance: should knowfreq 41%

basics

~20 s

Batching removes round trips, not work. A hundred fields in one call is still a hundred encryptions inside the service; what falls is the number of network waits, request authorisations and concurrent calls the worker must keep in flight.

open as a page

A suspect key file has no dates on it — how do you bound which stored data it protected, and over what window?

level: seniorimportance: should knowfreq 54%

basics

~20 s

Bound it from three sides: the period the key could encrypt, the datasets whose ciphertext names it, and what the manager's usage records show calling it. Where a side is missing, the honest scope is everything it could have covered.

open as a page

One exposed key signs stored records and another encrypts them — why do the two exposures demand different remedies?

level: seniorimportance: should knowfreq 42%

basics

~20 s

An exposed encryption key costs past confidentiality: whatever it encrypted and someone copied is readable forever. An exposed signing key costs future trust: its holder can mint records that verify until every verifier stops accepting it, and recent signatures fall into doubt.

open as a page

Every decrypt of an applicant field goes to the central service holding the key — what becomes countable that a key inside the worker would hide?

level: seniorimportance: should knowfreq 37%

basics

~20 s

Volume, per caller. Because each decrypt must be asked for, ten thousand decrypts in an hour is a number that exists outside the application and can be capped. A key inside the worker decrypts silently and leaves nothing to count.

open as a page

Every object read costs an unwrap call to the key manager, so a service caches unwrapped data keys for five minutes — what does that cache cost?

level: seniorimportance: should knowfreq 40%

basics

~20 s

The cache removes a manager call per read, and with it the manager's chance to refuse that read and its record of it. While an entry lives, withdrawing the service's right to unwrap changes nothing for those objects, and the decryption never appears in the manager's trail.

open as a page

A settlement signing key cannot leave its device — how do you plan recovery for the day that device fails?

level: seniorimportance: should knowfreq 40%

basics

~20 s

You cannot back up material that cannot leave, so you choose between replicating the key into sibling devices at generation, exporting it wrapped under a key that itself never leaves a device, or holding a second accepted key. Each weakens or costs something specific.

open as a page

Your key register was accurate at hand-over and wrong six months later - which events routinely escape it?

level: seniorimportance: should knowfreq 42%

basics

~20 s

Three events escape it: keys minted self-service in seconds, systems decommissioned without anyone retiring their keys, and owning teams dissolved in reorganisations. None of the three touches a document, so the register is stale without anybody being careless.

open as a page

No team claims a key in your manager and the register has no owner for it - how do you decide it is dead?

level: seniorimportance: should knowfreq 36%

basics

~20 s

Silence is not evidence. Gather recorded use over a window longer than the slowest cycle that could call the key, then deny it reversibly and watch for failures through a full cycle before anyone destroys material.

open as a page

An external review names one key in your manager and asks which data it protects - what must the register already carry?

level: seniorimportance: should knowfreq 41%

basics

~20 s

The systems and stores recorded as calling that key, the date it entered service, and the class of data those systems hold. Without the caller list the honest answer is "we do not know", and it cannot be reconstructed reliably afterwards.

open as a page

Where a key manager can refuse decrypts below a chosen key version, what does raising that floor buy and what must precede it?

level: seniorimportance: should knowfreq 38%

basics

~20 s

A floor turns retirement from an intention into something the manager enforces and you can demonstrate, and it is the only completion test a backfill has. First, every copy anyone may still read - live rows, backups, replicas, archives - must already name a version at or above it.

open as a page

Re-encrypting a decade of records under a new key will take six weeks — how do you order minting, re-protection, retirement and confirmation, and what exposure do you accept meanwhile?

level: principalimportance: should knowfreq 33%

basics

~20 s

Mint and redirect new writes first, keep the old key able to decrypt while data migrates, order the queue by what disclosure costs most, confirm from both the data side and the usage side, and only then retire — destruction last, because it is the irreversible step.

open as a page

For 20 million customer uploads across 5,000 tenants, how would you choose between one data key per object and one per tenant?

level: principalimportance: should knowfreq 30%

basics

~20 s

Granularity trades blast radius against volume. A key per object confines a leaked data key to one file and makes discarding that key an erasure; a key per tenant cuts wrapped keys and unwrap calls by a factor of 4,000 and makes one leaked key expose that tenant's entire set.

open as a page

Which keys across a payments estate earn custody in a device that will not export them?

level: principalimportance: should knowfreq 34%

basics

~20 s

Keys you cannot re-key quickly because outside parties verify them, with low operation rates and high per-misuse consequence. High-rate data-path keys and keys you can replace in an afternoon do not earn the cost, the latency or the extra failure domain.

open as a page

Across forty teams, how do you make key ownership a standing property rather than a spreadsheet refreshed before each review?

level: principalimportance: should knowfreq 30%

basics

~20 s

Make an owner a precondition of creating a key, point that owner at a team identifier an independent list can prove still exists, expire unattested claims, and give orphaned keys a named custodian with a deadline rather than a permanent home.

open as a page

With seven years of retained ciphertext and a yearly key rotation, do you backfill old rows or carry every version forever?

level: principalimportance: should knowfreq 30%

basics

~20 s

Start from the arithmetic: with no backfill, live versions converge to retention divided by rotation period - about seven here. Decide what that number should be, then choose between letting retention age versions out, funding a rolling backfill, or making rotation a cheap rewrap.

open as a page

A new key version changes the algorithm as well as the key material - what must every reader still be able to do?

level: middleimportance: nice to knowfreq 24%

basics

~20 s

Readers must resolve the algorithm from the version the ciphertext names, not from a global setting. A version binds material and algorithm together, so one corpus can legitimately hold rows produced several different ways at once.

open as a page

A device attests that your settlement signing key was generated inside it — what does that statement actually prove?

level: seniorimportance: nice to knowfreq 26%

basics

~20 s

An attestation proves provenance, not behaviour: a signed claim that this public half's private counterpart was generated inside a genuine device, with stated attributes, at a stated time. It says nothing about who may invoke it or what was signed.

open as a page

You are choosing which data across the estate must be encrypted by calling a central service on every operation — what decides where that line falls?

level: principalimportance: nice to knowfreq 22%

basics

~20 s

Read shape and the value of custody, per data class. A field read once at case closure pays one call; one rendered on every page view pays a call every time. Weigh that against what custody buys here.

open as a page