Asymmetric encryption is credited with solving key distribution. What problem does it leave behind, and for a system that must encrypt data to many recipients, how would you decide how public keys are trusted and how long a private key may live?
answer
- distribution secrecy becomes distribution authenticity
- wrong key means silent perfect failure
- authority vs TOFU vs fingerprint vs transparency log
- static wrap key means retroactive compromise
- key id in envelope; hierarchy makes rotation a rewrap
basics
~20 sIt converts secrecy of distribution into authenticity of distribution: you must prove a public key belongs to the intended party, and encrypting to the wrong one fails silently. Key lifetime is driven by blast radius - a static wrapping key leaked later exposes everything ever wrapped under it.
solid answer
~60 sThe residual problem is binding a key to an identity. Confidentiality is only as strong as that binding, and a wrong binding produces perfect encryption to an attacker with no error and no signal. Three trust models trade differently: a hierarchical authority scales and centralises revocation but lets a compromised anchor impersonate anyone; trust on first use with pinning needs no third party and detects later substitution but is blind at first contact; manual fingerprint verification is strongest and scales worst. Transparency logs shift the goal from preventing mis-issuance to making it detectable. For lifetime, ask what an attacker gains from the key today versus from recorded ciphertext later. A long-lived static wrapping key gives no forward secrecy, so its compromise is retroactive. I would bound exposure with per-object data keys and a key hierarchy so rotation is a rewrap, keep private keys non-extractable in hardware, record a key identifier in every envelope, and set lifetime from the data's secrecy horizon and how fast we could re-encrypt if we had to.
go deeper
Say that you must verify a public key genuinely belongs to the recipient, or you encrypt to an attacker.
Contrast an authority-based hierarchy with trust on first use, and note that a static wrapping key has no forward secrecy.
Design the envelope, hierarchy and hardware boundary so rotation is cheap and compromise is bounded and answerable.
Drive the decision from the data's secrecy horizon, detectability, re-encryption capacity and recovery requirements, and state the non-retroactive nature of revocation explicitly.
## What is left behind Public-key encryption removes the need for a confidential setup channel, but it needs an authentic one. Nothing about a public key states whose it is. If an attacker substitutes theirs, you encrypt flawlessly to them and receive no error, no warning and no anomaly - the failure is silent, which is exactly why it is dangerous. The design question moves from 'how do I deliver a secret' to 'how do I know this key is theirs, and how do I stop trusting it later'. ## Four trust models and how they diverge - **Hierarchical authority.** A small set of trust anchors vouches for identities, possibly through intermediaries. It scales to strangers and provides a revocation mechanism. The cost is transitive trust: any anchor you accept can vouch for any identity, so your risk is the union of every anchor in the store, and revocation checking is itself an availability and privacy problem. - **Trust on first use with pinning.** No third party. The first key seen is remembered and a later change is loud. Strong continuity, zero protection at first contact, and painful legitimate rotation - you must plan how a key legitimately changes, or users learn to click through the warning. - **Manual verification of fingerprints out of band.** The strongest binding available and the least scalable; realistic for a handful of high-value peers, not a user base. - **Transparency logs.** Append-only public records of issued keys turn an undetectable mis-issuance into a detectable one. That is a different security goal - detection rather than prevention - and it is what makes a hierarchy tolerable at internet scale. Real systems blend them: an authority for scale, pinning for the highest-value peers, and a log so mis-issuance leaves evidence. ## Blast radius drives lifetime A static key pair used to wrap data keys has no forward secrecy: an attacker who records ciphertext for years and eventually obtains the private key decrypts all of it retroactively. Bound that: 1. **Ephemeral key agreement per session** for data in motion, so a later key compromise does not open recorded traffic. 2. **A key hierarchy** - a master key wraps intermediate keys, which wrap per-object data keys - so rotating the top is a rewrap of small keys rather than re-encrypting the corpus. This is what makes a short lifetime affordable. 3. **Non-extractable private keys** in a hardware module or dedicated service, so a host compromise becomes use-only: the attacker can decrypt while they hold access, but cannot walk away with the key or use it after eviction. That converts an unbounded retroactive loss into a bounded, rate-limited and auditable one. 4. **A key identifier in every envelope.** Rotation without an inventory of which key protected which object is a fiction; you cannot rewrap, cannot revoke, and cannot answer what a leaked key exposes. ## The decision inputs Set the secrecy horizon first: how long must this plaintext stay confidential. That is the floor on cryptographic margin and the ceiling on acceptable retroactive exposure. Then ask how fast you could re-key the corpus if you had to, whether compromise would be detectable at all, how often recipients join and leave, and who must be able to decrypt in a disaster. That last one is a genuine tension: losing the private key destroys the data, so availability and escrow are security requirements too, and every escrow copy is another place the key can leak. Decide it explicitly rather than discovering it during an incident. ## The honest limit Removing a recipient is not retroactive. Anyone who already unwrapped a data key keeps it forever, so 'revoking access' means re-encrypting under a new key going forward. Say this out loud in a design review, because product owners routinely assume otherwise.
- What exactly is exposed when a long-lived private key used to wrap data keys is compromised?Everything ever wrapped under it that an attacker has retained, including ciphertext captured years earlier, because the wrap is not forward-secret. The practical scope is whatever your key identifiers say was wrapped under that key, which is why envelope metadata determines whether the incident is answerable at all. Hardware-held keys narrow this to what could be decrypted during the window of access.
- Why does revoking a recipient's access not undo their access to already-encrypted data?Removing their wrapped-key entry only stops future unwrapping. If they ever unwrapped the data key, they hold a copy of it and of any ciphertext they retained, and no envelope change touches that. Genuine revocation requires generating new data keys and re-encrypting the affected objects, which is a bulk operation you must plan for rather than assume.
saying these in an interview costs you the question
- Claiming public-key crypto removes the trust problem, rather than converting it into key authenticity.
- Treating removal of a recipient from an envelope as retroactive revocation.
- Planning rotation without key identifiers recorded in ciphertext, so nothing can be located or rewrapped.
- Ignoring escrow and recovery, which turns a lost private key into permanent data loss.