9. TLS
One-liner. A handshake establishes keys; certificates prove identity; everything after is symmetric crypto.
Memorize
- TLS 1.3: 1-RTT handshake (0-RTT on resumption); TLS 1.2 needed 2 RTTs.
- Certificate chain: leaf → intermediate(s) → root in the trust store; SNI selects the cert (sent in clear in ClientHello).
- ALPN negotiates
h2/http/1.1; OCSP stapling avoids a separate revocation fetch. - Session tickets/PSK enable resumption; 0-RTT data is replayable — don't send non-idempotent writes.
- mTLS requires the client to present a certificate (service-to-service auth).
- TLS 1.3 removed static RSA key exchange and legacy ciphers; forward secrecy is mandatory.
- Certificates expire — monitoring expiry is part of the design, not an operational afterthought.
Trap. Treating 0-RTT as free — a replayed request can duplicate a payment or a state change. Do this. Restrict 0-RTT to idempotent reads.
Check
What is the security caveat of TLS 1.3 0-RTT data?
Why
Early data is sent before the handshake completes, so a captured flight can be replayed; only send idempotent requests.