What is the TLS 1.3 Handshake A Simple Security Guide

Every time you see a padlock icon in your browser’s address bar, you are witnessing the result of a complex cryptographic process called the TLS Handshake. Transport Layer Security (TLS) is the protocol that powers HTTPS, securing the communication between your browser and a web server. For years, TLS 1.2 was the standard, but it required a slow, multi-step handshake. TLS 1.3, the latest major revision of the protocol, is a significant overhaul designed to be both more secure and much faster, primarily by redesigning and simplifying its handshake process.

The Problem: The Slow and Chatty Handshake of TLS 1.2

While secure, the TLS 1.2 handshake was inefficient. Establishing a fully secure connection required two full round trips of communication between the client (your browser) and the server before any actual application data (like the website content) could be sent.

The TLS 1.2 handshake looked roughly like this:

  • Round Trip 1:
    1. ClientHello: The client says hello and lists the cipher suites it supports.
    2. ServerHello: The server replies, chooses a cipher suite, sends its public certificate, and signals it’s done.
  • Round Trip 2:
    1. ClientKeyExchange: The client generates a shared secret, encrypts it with the server’s public key, and sends it to the server. It then sends a “ChangeCipherSpec” message to switch to encrypted communication.
    2. Server’s ChangeCipherSpec: The server decrypts the shared secret and also sends a “ChangeCipherSpec” message to confirm.

Only after these two full round trips could the client finally send its HTTP request. This back-and-forth communication added hundreds of milliseconds of latency to every new connection, which is a significant delay in the modern web.

Introducing the TLS 1.3 Handshake: Faster and More Secure

TLS 1.3 completely redesigns this process, cutting the number of required round trips in half. It achieves this by being less “chatty” and more speculative. The client assumes what kind of key agreement algorithm the server will likely use and sends the necessary information in its very first message.

Key Improvements in the TLS 1.3 Handshake:

  • 1-RTT Handshake: For new connections, the handshake is completed in a single round trip, slashing connection latency.
  • 0-RTT Handshake (Session Resumption): For connections to a server you’ve recently visited, TLS 1.3 supports a “zero round-trip” mode where the client can send encrypted application data in its very first message.
  • Improved Security: It removes obsolete and insecure cryptographic primitives (like MD5, SHA-1, and static RSA key exchange) and encrypts more of the handshake itself, improving privacy.

How the TLS 1.3 Handshake Works Internally

Let’s examine the new, streamlined flows for both a first-time connection and a resumed connection.

The 1-RTT Handshake (First Visit)

When your browser connects to a website for the first time using TLS 1.3, the handshake is a model of efficiency.

Single Round Trip:

  1. ClientHello: The client initiates the connection. But instead of just announcing its capabilities like in TLS 1.2, it does much more:
    • It lists the cipher suites it supports (a much smaller, more secure list than in 1.2).
    • It makes a guess about which key agreement protocol the server supports (e.g., elliptic curve Diffie-Hellman – ECDHE) and sends its public key share for that protocol. This is the key optimization.
  2. Server Response: The server receives the ClientHello. Since the client already sent its key share, the server has everything it needs to generate the shared session keys. The server then sends back a single flight of messages:
    • ServerHello: It confirms the chosen cipher suite and sends its own public key share.
    • EncryptedExtensions: Additional parameters for the session.
    • Certificate: The server’s public certificate.
    • CertificateVerify: A signature to prove it owns the certificate.
    • Finished: An encrypted message, authenticated with the newly derived session keys, to confirm the handshake is complete.

At this point, both the client and server have derived the same set of symmetric encryption keys. The client verifies the server’s “Finished” message, and the handshake is complete. The client can immediately start sending its encrypted HTTP request. The entire process takes just one round trip.

 Client Server ------ ------ ClientHello + key_share ------------------------> ServerHello + key_share {EncryptedExtensions} {Certificate} {CertificateVerify} <------------------ {Finished} {Finished} [HTTP Request] ------------------------> 

The 0-RTT Handshake (Resuming a Session)

For even faster connections, TLS 1.3 introduces a 0-RTT (Zero Round-Trip Time) mode. On a previous visit, the server can give the client a special token called a Pre-Shared Key (PSK) Resumption Ticket.

When the client reconnects later, it can send:

  1. ClientHello: This message includes the PSK ticket.
  2. Early Application Data: Along with the ClientHello, it can immediately send the first batch of encrypted application data (e.g., an `HTTP GET` request).

The server uses the PSK to derive the session keys, decrypts the early data, and can immediately begin processing the HTTP request while it sends its own `ServerHello` and `Finished` messages back. This makes subsequent visits to a site feel almost instantaneous. However, 0-RTT has some security caveats (it is not forward-secret and is vulnerable to replay attacks), so it’s typically only used for idempotent requests like `GET`.

TLS 1.3 vs. TLS 1.2 Handshake

Feature TLS 1.2 Handshake TLS 1.3 Handshake
Round Trips (New Connection) 2 RTTs 1 RTT
Session Resumption 1 RTT (Session IDs/Tickets) 0-RTT (with PSK)
Security Supports older, weaker ciphers. Parts of handshake are unencrypted. Mandates Perfect Forward Secrecy. Encrypts more of the handshake (e.g., the certificate).
Complexity More complex, with many optional parameters and states. Simpler, more deterministic, and less prone to misconfiguration.

The technical details of the protocol are defined in its IETF specification, RFC 8446.

Frequently Asked Questions

Is TLS 1.3 widely supported now?

Yes, overwhelmingly so. All modern web browsers (Chrome, Firefox, Safari, Edge) have supported TLS 1.3 for years and make it their preferred protocol. All major web servers, CDNs, and cloud providers also fully support and enable it by default. Today, the vast majority of HTTPS traffic on the web is secured by TLS 1.3.

How does the TLS 1.3 handshake improve privacy?

In TLS 1.2, the server’s certificate was sent in plaintext. This meant a passive eavesdropper on the network could see which website you were connecting to, even if they couldn’t read the content. In TLS 1.3, almost everything after the initial `ClientHello` and `ServerHello` messages, including the server certificate, is encrypted. This makes it much harder for passive observers to snoop on your browsing activity.

Do I need to do anything to enable TLS 1.3?

As a user, no. Your browser will automatically negotiate the best possible protocol with the server. As a website operator, you should ensure your web server software (like Nginx, Apache, or Caddy) is up to date and configured to support TLS 1.3. Most modern server configurations and all major CDNs enable it by default. It’s generally a good practice to disable support for older protocols like TLS 1.0 and 1.1, which are now considered insecure.

How does this relate to QUIC and HTTP/3?

TLS 1.3 is a foundational piece of the modern web stack. The QUIC protocol, which is the transport for HTTP/3, has TLS 1.3’s cryptographic handshake built directly into its own connection handshake. It takes the 1-RTT and 0-RTT concepts of TLS 1.3 and integrates them at the transport layer, creating an even faster and more streamlined connection setup process. Essentially, TLS 1.3’s design philosophy paved the way for QUIC.