Security and auth / Beginner / 5 min / Updated
TLS handshake: HTTPS, round trips and certificates
Count the round trips before the first byte with TLS 1.2, TLS 1.3, QUIC and 0-RTT resumption, and break the certificate to see the browser stop.
Start the simulation → Change the load, break a part, watch what happens. Free, no sign-up.
In short
What is TLS handshake?
TLS encrypts HTTP. A handshake agrees on keys and checks the server certificate before the first request can be sent.
Why does it matter?
Without TLS anyone on the network can read or change traffic. Certificates prove you are talking to the real server.
What is the trade-off?
Each handshake round trip adds latency, far worse on distant mobile users. TLS 1.3, QUIC and resumption cut it; 0-RTT can be replayed.
How do you explain it in an interview?
"TLS 1.3 everywhere, terminated at the CDN edge near users, HTTP/3 where supported, session resumption, 0-RTT only for idempotent GETs."
Check yourself
Why is TLS 1.3 faster than TLS 1.2 for a new connection?
Answer: It needs 1 round trip for the handshake instead of 2. The client sends its key share in the first message, so keys are agreed after one round trip.
What is the risk of 0-RTT early data?
Answer: An attacker can replay the early request. Early data has no fresh server input, so it can be replayed. Only send idempotent requests like GET with it.
The certificate is valid but for another domain. What does the browser do?
Answer: Stops: the certificate does not prove this server is the site you asked for. Encryption to the wrong party is useless; the name in the certificate must match the host.