← All PBQs

Chapter 8

The Mad Hatter Rebuilds Teatime Tech's PKI

After the 3:17 a.m. outage caused by a quietly expired intermediate CA, the Mad Hatter — Lead Cryptographer at Teatime Tech — has been given a clean slate to redesign the company's cryptographic posture from the ground up.

His remit covers four fronts. First, a proper PKI hierarchy with monitored renewals, automated issuance for the customer-facing tier, and revocation that actually works under load. Second, end-to-end data protection across rest, transit, and use, including a sane key-management story for several petabytes of customer data sitting in an object store. Third, modernization of the company's authentication: passwords are out, hardware-backed keys are in, and service-to-service traffic inside the platform must mutually authenticate. Fourth — and most strategically — the Hatter has been asked by the board to begin a multi-year migration toward post-quantum cryptography for any data that must remain confidential beyond 2035.

A respected national news outlet recently ran a profile on the DigiNotar collapse from 2011, and the Hatter's CEO has read it twice. The CEO would prefer not to be the next case study.

Post-mortem — TLS outage, 2026-04-22 03:17 UTC.   Author: M. Hatter, on-call. Status: draft, not yet circulated. Do not forward.

What happened

At 03:17 UTC the intermediate CA cert expired, and every customer-facing TLS endpoint started returning SEC_ERROR_EXPIRED_ISSUER_CERTIFICATE. No monitor existed on the intermediate itself — only on the leaf certs that it signed. Restoration required a manual re-issuance ceremony nobody had walked through since 2023.

Contributing conditions

  • Root CA posture. The root signing key still lives on the issuance system, 24/7. Same blast radius as any production server; not what 'root' is supposed to mean.
  • Renewals. Manual every 90 days via emailed CSRs. Three were missed in the last year. We have been 'going to automate this' since 2023.
  • Revocation path. Every TLS client hits the CA's OCSP responder directly on each new connection. Adds ~200 ms. CA outage = our outage.
  • Legacy CN reliance. Two production certs name their hostname only in the Common Name field — the certificate extension meant to list valid hostnames is empty. Modern browsers ignore CN entirely, so only a few legacy clients still accept these.
  • Bulk object encryption. AES-256-CBC with no integrity tag. Last pen test flagged padding-oracle exposure on the decrypt API; the report is six months old and nobody has prioritized it.

Next

PKI redesign kicks off Monday. CEO has read the DigiNotar profile in The Atlantic twice and wants a plan, not a post-mortem.

Use the post-mortem to map each contributing condition to the Mad Hatter's redesign control, then click Check answers.

The Root CA posture condition is closed by moving the signing key into an HSM in a physically secured vault and bringing it online only for ceremonies — the root CA. Day-to-day issuance flows through an intermediate so a future intermediate compromise stays contained.

The Renewals condition is automated away by adopting the protocol for issuance and renewal. The Legacy CN reliance condition is closed by requiring all valid hostnames in the extension, since modern browsers ignore the Common Name field entirely. To detect rogue or accidental issuance against Teatime Tech domains by any CA in the world, the Hatter enables monitoring of public logs.

The Revocation path condition is fixed by — the server fetches a fresh signed OCSP response periodically and attaches it to the TLS handshake, so clients never call the CA directly.

For petabyte-scale customer data in object storage, the Hatter implements encryption: a per-object DEK encrypts the object, and a KEK held in the HSM wraps the DEK. The Bulk object encryption condition is closed by replacing CBC with AES-256 in mode, which provides confidentiality and integrity in a single primitive — eliminating the padding-oracle class entirely.

When a customer terminates their contract, instead of attempting to overwrite media in a multi-tenant store, Teatime Tech will simply destroy the customer's KEK. This is — the practical sanitization technique in shared cloud storage.

For authentication, employees are migrating from passwords to hardware authenticators implementing the standard, where the device holds a private key and the server stores only the public key — so a credential database breach yields nothing replayable. Service-to-service traffic inside the platform uses , with each workload identified by a short-lived certificate from an internal CA.

The board's quantum mandate drives the final piece. The Hatter knows that an adversary can record encrypted traffic today and decrypt it years later once a quantum computer arrives — the threat model. To address this for long-confidentiality data, he deploys a TLS configuration that combines classical X25519 with the NIST-standardized post-quantum key encapsulation algorithm in a key exchange, so the session is protected against both today's adversaries and a future quantum one. The TLS version selected is 1.3, in part because is mandatory in 1.3 — every session uses ephemeral key shares so that compromise of a long-term key cannot retroactively decrypt past traffic.