TLS 1.3 Handshake: Faster, Simpler, More Secure

· James Thornton · 13 min read

Advanced

Transport Layer Security (TLS) is the cryptographic protocol that secures virtually all communications on the modern internet. Every HTTPS connection, every secure API call, every encrypted email in transit relies on TLS to provide confidentiality, integrity, and authentication. TLS 1.3, standardized as RFC 8446 in August 2018, represents the most significant overhaul of the protocol since its inception, reducing handshake latency by half, eliminating decades of accumulated cryptographic baggage, and making forward secrecy mandatory rather than optional.

This article provides a deep technical examination of the TLS 1.3 handshake, how it compares to TLS 1.2, the security vulnerabilities it closes, and how CDN providers leverage it for faster, more secure content delivery.

How Did TLS Evolve from SSL to Version 1.3?

The lineage of TLS begins at Netscape Communications in the early 1990s. SSL 1.0 (1994) was designed by Netscape engineer Taher Elgamal but was never publicly released due to serious security flaws. SSL 2.0 shipped with Netscape Navigator 1.1 in February 1995 but contained vulnerabilities including susceptibility to man-in-the-middle attacks during the handshake and weak MAC construction. SSL 3.0 (1996), a complete redesign authored by Paul Kocher in collaboration with Netscape, addressed these issues and became the foundation for all subsequent versions.

The transition from "SSL" to "TLS" came with TLS 1.0 (RFC 2246, January 1999), developed under the IETF rather than Netscape. Despite the name change, TLS 1.0 was essentially SSL 3.1 with minor cryptographic improvements. TLS 1.1 (RFC 4346, April 2006) added protection against CBC cipher attacks. TLS 1.2 (RFC 5246, August 2008) introduced support for SHA-256, AEAD cipher suites, and flexible signature algorithms, and remained the dominant protocol version for a decade.

The path to TLS 1.3 was motivated by a decade of devastating attacks against the protocol family: BEAST (2011) exploited CBC mode vulnerabilities in TLS 1.0, CRIME (2012) and BREACH (2013) targeted TLS compression, Heartbleed (2014) exploited an OpenSSL implementation bug that leaked server memory, POODLE (2014) attacked SSL 3.0's CBC padding, and DROWN (2016) exploited servers that still supported SSLv2. Each attack reinforced the same lesson: the protocol carried too much legacy complexity, and optional security features were routinely left disabled.

TLS 1.3 development began in April 2014 and went through 28 drafts over four years before publication as RFC 8446 in August 2018. The guiding philosophy was radical simplification: remove everything that had proven insecure or unnecessary, make the remaining options secure by default, and reduce the handshake latency that discouraged deployment.

How Does the TLS 1.3 Handshake Differ from TLS 1.2?

The most immediately visible difference is speed. A full TLS 1.2 handshake requires two round trips between client and server before encrypted application data can flow. TLS 1.3 reduces this to one round trip, and for returning clients, application data can be sent in zero round trips.

Performance Comparison: Edge vs Origin Processing
Metric Edge Processing Origin Processing Improvement
Latency (p50)8–15 ms120–300 ms15–20x faster
Cache Hit Ratio85–95%N/AReduces origin load
TLS Handshake1–5 ms (nearby PoP)50–150 ms10–30x faster
Bandwidth Cost$0.01–0.04/GB$0.05–0.12/GB3–5x cheaper
Availability99.99% (multi-PoP)99.9% (single DC)10x fewer outages
Comparison of TLS 1.2 two-round-trip handshake versus TLS 1.3 one-round-trip handshake TLS 1.2 (2-RTT) vs TLS 1.3 (1-RTT) Handshake TLS 1.2 Full Handshake CLIENT SERVER ClientHello (cipher list, random) ServerHello, Certificate, ServerKeyExchange RTT 1 ClientKeyExchange, ChangeCipherSpec, Finished ChangeCipherSpec, Finished RTT 2 Application Data (encrypted) TLS 1.3 Full Handshake CLIENT SERVER ClientHello + key_share (DH params) ServerHello + key_share, {Cert, Finished} RTT 1 Application Data + {Finished} 0-RTT Resumption Returning client sends encrypted data in the first message using cached PSK Caveat: vulnerable to replay attacks TLS 1.2: 2 RTTs (300ms at 150ms RTT) TLS 1.3: 1 RTT (150ms) or 0-RTT Note: TCP handshake (1 RTT) precedes both; QUIC combines TCP + TLS into 1 RTT total.

The TLS 1.2 handshake (2 round trips)

In TLS 1.2, the handshake proceeds in two distinct phases. In Round Trip 1, the client sends a ClientHello message containing its supported cipher suites, TLS version, and a random nonce. The server responds with its selected cipher suite (ServerHello), its certificate chain, and optionally a ServerKeyExchange message containing Diffie-Hellman parameters (only when using DHE or ECDHE key exchange — static RSA key exchange skips this step but sacrifices forward secrecy).

In Round Trip 2, the client sends its key exchange contribution (ClientKeyExchange), signals the switch to encrypted communication (ChangeCipherSpec), and sends a Finished message encrypted with the newly derived keys. The server responds with its own ChangeCipherSpec and Finished messages. Only after this second round trip can encrypted application data begin flowing.

The TLS 1.3 handshake (1 round trip)

TLS 1.3 collapses the handshake into a single round trip by having the client speculatively include its key exchange contribution in the very first message. The client's ClientHello contains a key_share extension with Diffie-Hellman public values for one or more groups it supports (typically X25519 and P-256). Because the server receives everything it needs in the first message — cipher suite preferences, key share, and supported groups — it can immediately compute the shared secret and respond with its own key share, its certificate (now encrypted), and its Finished message, all in one flight.

The client receives this response, verifies the server's certificate and Finished message, computes the same shared secret, and can immediately begin sending encrypted application data along with its own Finished message. The entire handshake requires just one round trip.

0-RTT resumption: trading security for speed

For clients reconnecting to a server they have previously communicated with, TLS 1.3 offers 0-RTT resumption (also called "early data"). During a previous connection, the server issues a NewSessionTicket message containing a Pre-Shared Key (PSK) identity. On the next connection, the client includes this PSK in its ClientHello and uses it to encrypt application data that is sent alongside the ClientHello, before the handshake completes.

This means the server receives encrypted application data in the very first network packet, eliminating all handshake latency for returning visitors. For CDN providers, 0-RTT is particularly valuable because the majority of web traffic comes from returning visitors whose browsers have cached session tickets.

However, 0-RTT comes with an important security caveat: early data is not protected against replay attacks. An attacker who captures a 0-RTT ClientHello can replay it, causing the server to process the same request again. For this reason, 0-RTT should only be used for idempotent requests (like HTTP GET) and servers must implement replay mitigation strategies such as single-use session tickets, client hello recording, or freshness checks. RFC 8446 Section 8 provides detailed guidance on replay protection.

What Insecure Features Did TLS 1.3 Remove?

TLS 1.3's security improvement comes not just from what it added, but from what it ruthlessly removed. The protocol eliminated entire categories of cryptographic algorithms and protocol features that had been exploited in attacks.

Cipher suite evolution from SSL 3.0 through TLS 1.2 to TLS 1.3 showing removed and retained algorithms Cipher Suite Evolution SSL 3.0 / TLS 1.0-1.2 37+ cipher suites available Removed in TLS 1.3: ✗ Static RSA key exchange (no forward secrecy) ✗ CBC mode ciphers (BEAST, Lucky13, POODLE) ✗ RC4 stream cipher (biases in keystream) ✗ SHA-1 / MD5 for signatures ✗ DES / 3DES encryption (Sweet32 birthday attack) ✗ Export-grade cryptography (FREAK, Logjam) TLS 1.3 (RFC 8446) Only 5 cipher suites Cipher Suites (AEAD only): ✓ TLS_AES_256_GCM_SHA384 ✓ TLS_AES_128_GCM_SHA256 ✓ TLS_CHACHA20_POLY1305_SHA256 ✓ TLS_AES_128_CCM_SHA256 ✓ TLS_AES_128_CCM_8_SHA256 Key Exchange (separate): ✓ ECDHE (X25519, P-256, P-384) ✓ DHE (ffdhe2048+) ✓ PSK with (EC)DHE All modes provide forward secrecy

Static RSA key exchange was the most significant removal. In TLS 1.2, servers could use their long-lived RSA private key directly for key exchange. If that private key was ever compromised (through a server breach, a compelled disclosure, or cryptanalytic advances), an attacker could decrypt all past recorded traffic — there was no forward secrecy. TLS 1.3 mandates ephemeral (EC)DHE key exchange, ensuring that each session uses unique keys that cannot be derived even if the server's long-term key is compromised.

CBC mode ciphers were the source of numerous attacks including BEAST (Browser Exploit Against SSL/TLS, 2011), Lucky13 (2013), and the POODLE attack (Padding Oracle On Downgraded Legacy Encryption, 2014). These attacks exploited the inherent fragility of CBC mode's padding and chaining mechanisms. TLS 1.3 requires all ciphers to use AEAD (Authenticated Encryption with Associated Data) construction, which provides both encryption and integrity in a single, simpler operation.

RC4, once the go-to alternative when CBC attacks were discovered, was itself found to have statistical biases in its keystream (RFC 7465, February 2015). 3DES was vulnerable to the Sweet32 birthday attack (2016) due to its 64-bit block size. Export-grade cryptography — deliberately weakened algorithms mandated by 1990s US export regulations — enabled the FREAK (2015) and Logjam (2015) attacks. TLS 1.3 eliminates all of these.

The protocol also removed the renegotiation mechanism (which enabled the 2009 renegotiation attack), compression (which enabled CRIME), and the ChangeCipherSpec message (replaced by a key derivation schedule based on HKDF, as defined in RFC 5869).

How Does Forward Secrecy Work in TLS 1.3?

Forward secrecy (also called Perfect Forward Secrecy or PFS) ensures that the compromise of a server's long-term private key does not compromise the confidentiality of past sessions. In TLS 1.3, forward secrecy is not an option — it is a structural requirement of the protocol.

Every TLS 1.3 handshake uses ephemeral Diffie-Hellman key exchange. Both client and server generate fresh, temporary key pairs for each connection. They exchange public values and independently compute the same shared secret using the mathematical properties of the Diffie-Hellman problem. After the session, the ephemeral private keys are discarded.

The preferred key exchange group in TLS 1.3 is X25519, an elliptic curve Diffie-Hellman function designed by Daniel J. Bernstein. X25519 offers 128-bit security with 32-byte keys and is designed to be resistant to timing side-channel attacks. The NIST P-256 curve is also widely supported, and P-384 is available for organizations requiring 192-bit security levels.

Even in PSK-based resumption mode, TLS 1.3 strongly recommends combining the PSK with an ephemeral (EC)DHE exchange (psk_dhe_ke mode). This ensures forward secrecy even for resumed sessions — if a session ticket is compromised, the attacker still cannot decrypt the session without the ephemeral keys that were generated and destroyed during the connection.

How Do CDNs Leverage TLS 1.3 for Performance?

CDN providers were among the earliest and most enthusiastic adopters of TLS 1.3. Cloudflare enabled TLS 1.3 for all customers in September 2016, even before the RFC was finalized (using draft versions). This early adoption was driven by a clear performance incentive: reducing TLS handshake latency directly improves Time to First Byte (TTFB) for every HTTPS request.

CDNs perform TLS termination at the edge, meaning the TLS handshake occurs between the user's browser and the nearest CDN Point of Presence rather than the distant origin server. The CDN then communicates with the origin over a separate, persistent connection (often using a different TLS configuration optimized for the server-to-server path).

This architecture provides several advantages for TLS 1.3 deployment:

Protocol bridging. The CDN can offer TLS 1.3 to clients even when the origin server only supports TLS 1.2 or earlier. The edge server handles the modern handshake with the client and translates to whatever protocol the origin supports. This allows organizations to benefit from TLS 1.3 performance and security without upgrading legacy backend infrastructure.

0-RTT at the edge. Because users connect to nearby edge servers, the CDN can aggressively enable 0-RTT resumption for returning visitors. The short client-to-edge distance means the absolute latency saved is smaller, but the relative improvement is dramatic: the handshake goes from ~10ms (1-RTT at 5ms RTT) to essentially zero. For mobile users on congested networks where each round trip may take 50-100ms, the savings are substantial.

Session ticket management. CDNs operate thousands of edge servers across hundreds of locations. For 0-RTT to work, the session ticket a client received from one edge server must be valid at another edge server the client might connect to next. CDN providers implement distributed session ticket encryption key (STEK) rotation systems that synchronize keys across their global infrastructure while rotating them frequently (typically every few hours) to limit the window of vulnerability if a key is compromised.

Certificate optimization. TLS 1.3 encrypts the server's certificate in the handshake (unlike TLS 1.2 where the certificate is sent in plaintext). CDNs optimize certificate chains by using ECDSA certificates (which are smaller than RSA certificates — a P-256 ECDSA certificate is roughly half the size of a 2048-bit RSA certificate), removing unnecessary intermediate certificates, and implementing OCSP stapling to eliminate the client's need for a separate OCSP request to check certificate revocation status.

What Role Does QUIC Play Alongside TLS 1.3?

The QUIC protocol (RFC 9000, May 2021) integrates TLS 1.3 directly into the transport layer, replacing TCP. Where a traditional HTTPS connection requires a TCP handshake (1 RTT) followed by a TLS 1.3 handshake (1 RTT) for a total of 2 RTTs, QUIC combines both into a single round trip. For resumed connections with 0-RTT, QUIC can send encrypted application data in the very first packet.

QUIC uses TLS 1.3 for its cryptographic handshake but modifies the record layer. Instead of TLS records transported over TCP, QUIC encrypts individual UDP packets using keys derived from the TLS 1.3 handshake. This integration eliminates the layering overhead and enables QUIC's multiplexed streams to be independently encrypted.

CDN providers including Cloudflare, Fastly, and Akamai support QUIC (via HTTP/3) at their edge servers, offering the combined benefits of TLS 1.3 security, reduced handshake latency, and QUIC's congestion-resilient transport.

How Should Organizations Transition to TLS 1.3?

Organizations planning TLS 1.3 deployment should consider several practical factors. First, ensure that middlebox compatibility will not be an issue. Early TLS 1.3 deployments discovered that some enterprise firewalls and inspection proxies failed when encountering the new handshake format. The TLS 1.3 specification includes a "middlebox compatibility mode" that mimics TLS 1.2 message patterns to avoid these issues.

Second, audit any dependencies on features removed in TLS 1.3. Organizations using static RSA key exchange for passive traffic inspection (a common practice in enterprise security) will need to transition to alternative monitoring approaches, as TLS 1.3's mandatory forward secrecy makes passive decryption impossible.

Third, if enabling 0-RTT, implement replay protection at the application layer. Ensure that 0-RTT early data is only accepted for safe, idempotent operations and that your application correctly handles the Early-Data HTTP header (RFC 8470) that proxies use to indicate when a request was received as 0-RTT data.

For most organizations, the simplest path to TLS 1.3 is through a CDN or reverse proxy that handles TLS termination. This approach provides immediate benefits without modifying backend infrastructure, and the CDN's operational expertise ensures correct, optimized deployment from day one.

External References

References & Standards: OWASP CDN Security · HTTP/2 specification