Explain at a high level what happens in a TLS handshake.
Answer
- Client hello: supported TLS versions and cipher suites, a random value, a key share (TLS 1.3).
- Server hello: chosen cipher, its key share, and its certificate chain + a signature proving it owns the private key.
- The client validates the certificate (trusted authority, hostname, not expired).
- Both sides derive the same symmetric session keys with (EC)DHE key exchange, which gives forward secrecy.
- Finished messages confirm nothing was tampered with; application data then flows encrypted (AES-GCM or ChaCha20-Poly1305).
- TLS 1.3 needs one round trip (zero with resumption).
Practice this question in Repaso