┌─────────────┐ ┌─────────────┐
│ Client │ │ Server │
└──────┬──────┘ └──────┬──────┘
│ Client Hello (versions, methods, random) │
├──────────────────────────────────────────▶
│ │
│ Server Hello (chosen method, random) │
│ Certificate (public key) │
◀──────────────────────────────────────────┤
│ │
│ Verify Certificate │
│ Create secret key, encrypt with public key│
├──────────────────────────────────────────▶
│ │
│ Decrypt secret key │
│ │
│ Finished message encrypted with secret key│
◀──────────────────────────────────────────┤
│ Finished message encrypted with secret key│
├──────────────────────────────────────────▶
│ │
│ Secure connection established │
This diagram shows the step-by-step message exchange between client and server during the SSL/TLS handshake.