Skip to content

Interview question · Cryptography, PKI & TLS

Walk through a TLS 1.3 handshake. What does each step protect against?

Message names are table stakes. The interviewer is listening for why CertificateVerify exists and what Finished actually checks.

mediumEssentialNewPreparation tags: Google, Amazon, AppleUpdated Nov 2026

TL;DR: ClientHello carries an ephemeral key share; ServerHello returns the server's; both derive keys from ECDHE (forward secrecy) and everything after is encrypted. The server sends its Certificate (validated to a trusted root, name checked), CertificateVerify (a signature over the handshake transcript, proving it holds the private key for this connection), and Finished (a MAC over the transcript, detecting tampering or downgrade). The client sends its own Finished, and data flows under AEAD. One round trip; 0-RTT resumption is faster but replayable.

How to approach it

Go message by message, and after each one say what it protects against. That turns a memorised list into security reasoning, which is what the interviewer is grading. End with what TLS does not protect.

A strong answer

FIG · WALK THROUGH A TLS 13 HANDSHAKE WHAT DOES EACH STEP PROTECT
TLS 1.3, one round trip

Client

Server

  1. Client to Server

    1ClientHello + key share
1/7

1. ClientHello + key share

Ephemeral public key, supported AEAD suites, signature algorithms, server name (SNI).

StepWhat it doesProtects against
ClientHello / ServerHello key sharesEphemeral Diffie-Hellman (usually X25519, increasingly hybrid with ML-KEM)Eavesdropping; decryption of recorded traffic if long-term keys leak later (forward secrecy)
Encrypted handshake after ServerHelloCertificates and extensions travel encryptedPassive observers learning which certificate was presented
CertificateChain to a trusted root, name matches the requested hostConnecting to a server that cannot show a valid certificate for this name
CertificateVerifySignature over the transcript hashAn attacker replaying someone else's certificate without the private key; splicing handshakes
Finished (both sides)HMAC over the transcript with handshake keysTampering with negotiation, including downgrade to weaker options
Record layerAEAD with traffic keysReading or modifying data in transit

What 1.3 removed. RSA key transport (no forward secrecy), static DH, CBC-mode and other non-AEAD ciphers, compression and renegotiation. Fewer options means fewer downgrade paths.

Resumption and 0-RTT. A returning client can use a pre-shared key and send early data in its first flight. Early data is not protected against replay, so servers should accept it only for idempotent requests.

What TLS does not do. It does not protect the endpoints or data at rest, does not decide authorization, and exposes metadata (IP addresses, sizes, timing, and the server name unless Encrypted Client Hello is used). And it provides no authentication at all if the client skips certificate validation.

What interviewers probe next

  • "What if the client and server don't share a key-exchange group?" The server sends a HelloRetryRequest naming one it supports, costing an extra round trip.
  • "How does mutual TLS differ?" The server sends a CertificateRequest, and the client returns its own Certificate and CertificateVerify, giving the server a cryptographic client identity.
  • "Where does TLS commonly fail in practice?" Disabled verification in clients, missing hostname checks, expired certificates, and trusting overly broad internal roots.

What if?

What if · interview follow-ups

Hold your answer as the constraints change

A browser connects to https://shop.example using TLS 1.3, and an interviewer asks you to walk the handshake and then defend it as conditions change.

  1. Start here

    What happens in the first flight?

How it's scored

Weak: Lists messages from TLS 1.2 (ServerKeyExchange, ChangeCipherSpec) or says data is encrypted with the server's public key.

Hire: Describes the 1-RTT flow, ECDHE and forward secrecy, and the role of the certificate.

Strong Hire: Explains CertificateVerify and Finished precisely, covers 0-RTT replay, and states what TLS does not protect.

Common mistakes

  • Treating the certificate itself as proof of identity, without the private-key proof.
  • Forgetting the hostname check.
  • Claiming TLS hides which site you visit.
  • Accepting 0-RTT for state-changing requests.
You just read a free answer. Every topic opens its first 5 answers to anyone. Sign in and the count per topic goes to 10, and we keep track of how far you get in every topic.Google sign-in · free · no payment details
HOW DID IT GO?
0
READING SIGNED OUT

Signing in doubles your free answers, from 5 to 10 per topic, and the site starts remembering you: mastery per topic, bookmarks, and a next-focus recommendation. Free, no card.

Sign in free
UP NEXT ON YOUR JOURNEY
DISCUSSION · 0

No comments yet. Share a correction or a different way to answer it.