How the TLS Handshake Works: TLS 1.3 vs 1.2
The TLS handshake is the exchange of messages that turns an open TCP connection into an encrypted one. It authenticates the server, agrees on algorithms and produces the keys used for the rest of the session. The shorter overview is in what an SSL handshake is.
The TLS 1.3 handshake
TLS 1.3 is the current version and needs one round trip:
- ClientHello: the client sends supported versions, cipher suites, the server name (SNI) and a key share for an ephemeral Diffie-Hellman exchange.
- ServerHello: the server picks a cipher suite and sends its own key share. From here on, both sides can compute the handshake keys.
- Encrypted extensions and Certificate: the server sends its certificate chain, already encrypted.
- CertificateVerify: the server signs the handshake transcript with its private key, proving it owns the certificate.
- Finished: each side sends a MAC over the whole transcript. Application data can flow immediately after.
Because the certificate is encrypted in 1.3, a passive observer sees far less than in older versions.
The TLS 1.2 handshake
TLS 1.2 uses two round trips. The server sends its certificate in the clear and a ServerKeyExchange message with its key share, and the client replies with ClientKeyExchange. Then both sides send ChangeCipherSpec and Finished. With ECDHE it still provides forward secrecy, but RSA key exchange modes do not.
| Feature | TLS 1.2 | TLS 1.3 |
|---|---|---|
| Round trips for a new connection | 2 | 1 |
| Certificate visible to observers | Yes | No, encrypted |
| Static RSA key exchange | Allowed | Removed |
| Forward secrecy | Optional | Always |
| Weak ciphers such as RC4 or CBC modes | Possible | Removed |
| Cipher suites defined | Many | A small fixed set |
Where the certificate fits
The client validates the server's chain against its root store, checks the domain against the SAN list and checks the dates. Then CertificateVerify, or the signed key exchange in 1.2, proves possession of the private key. A stolen certificate file alone is useless without that key. The chain mechanics are in what a digital certificate is.
Session resumption and 0-RTT
After a first connection, the server can give the client a session ticket. A returning client presents it to skip the full handshake. TLS 1.3 also offers 0-RTT, where the client sends data in its first flight. That data can be replayed by an attacker, so only use it for safe, idempotent requests, and note that many servers leave it off by default.
Watch a handshake yourself
openssl s_client -connect example.com:443 \
-servername example.com -msg -tls1_3 | head -60
The -msg flag prints each handshake message type as it is sent or received. For a friendlier view, a packet capture in Wireshark with the "tls" filter shows the same steps.
Practical takeaways
- Enable TLS 1.3 and keep TLS 1.2 as the fallback. See Enable TLS 1.3 on Nginx, Apache, Cloudflare.
- Disable TLS 1.0 and 1.1. See how to disable them.
- Send the full certificate chain so clients do not have to fetch intermediates.
- Test the result with the TLS version checker.
Reading handshake errors by stage
| Stage | Typical error | Likely cause |
|---|---|---|
| ClientHello | Connection reset, no response | Firewall, wrong port or a server that does not speak TLS there |
| ServerHello | Protocol version or no shared cipher alert | Version or cipher mismatch |
| Certificate | Unknown CA, name mismatch, expired | Chain, SAN list or renewal |
| Finished | Decrypt error or bad record MAC | Middlebox interference or a corrupted proxy setup |
Knowing the stage cuts debugging time a lot. Read fixing SSL handshake failed for fixes by symptom, and TLS 1.2 versus TLS 1.3 for the version comparison in detail.
Key terms
- SNI: Server Name Indication. The client names the host it wants so one IP can serve many certificates.
- ALPN: a field that lets the client and server pick HTTP/2 or HTTP/3 during the handshake.
- Transcript hash: a running hash of all handshake messages, used to detect tampering.
- Key schedule: the process that turns the shared secret into several separate keys.
Knowing these words makes packet captures and error messages much easier to read.
Related reading: whether SSL stops hacking and HTTPS on a local XAMPP or WAMP server.
Frequently Asked Questions
How many round trips does TLS 1.3 need?
One, compared with two in TLS 1.2. Resumption can cut it to none, at the cost of the replay caveats that come with 0-RTT.
Where does the certificate appear in the handshake?
In the server's first flight. The client checks the chain, the name and the dates before it sends anything secret.
What is a session ticket for?
It lets a returning client resume without a full handshake, which saves a round trip and some CPU.
Does the handshake change if I use HTTP/2 or HTTP/3?
HTTP/2 still runs over TLS. HTTP/3 runs over QUIC, which builds TLS 1.3 into its own handshake.
Why do handshake errors mention a stage?
Because each stage fails differently. A protocol error and a certificate error point at different fixes.
✅ Post-Installation Verification & SEO Checklist
After applying the steps above, run through this 5-point checklist to prevent browser warnings and protect your Google SEO rankings:
- Verify full CA chain trust and TLS 1.3 support using our Live SSL Checker.
- Scan for Mixed Content HTTP links and check HSTS/CSP headers on Security Headers Checker.
- Enforce a permanent 301 HTTP-to-HTTPS redirect with our HTTPS Redirect Generator.
- Confirm both root and
wwwversions resolve cleanly to one canonical HTTPS URL. - Verify your HTTPS property and
sitemap.xmlinside Google Search Console and Bing Webmaster Tools.