System Design
13. Security ArchitectureAnimated
TLS Handshake
How client and server set up an encrypted session.
The idea
They agree on a version and cipher, verify certificates and derive shared keys.
Watch it work
Press play, pause, or step through. Some animations have settings you can change.
- current message
- earlier
- failure or attack
The browser lists what it supports and sends a random value.
- step:
- 1/6
- from:
- Browser
- to:
- Server
1/6
Time runs downward. Solid arrows are requests, dashed arrows are replies.
Step by step
- 1Client hello
- 2Server hello and certificate
- 3Key exchange
- 4Finished, encrypted traffic starts
Where it is used
Every HTTPS connection.
Watch out for
Each handshake adds round trips, so reuse sessions.