Cloudflare has announced the rollout of Automatic Key Exchange, a major enhancement to its Automatic SSL/TLS framework designed to optimize and secure the underlying connections between Cloudflare and origin servers across the global internet. The new feature replaces traditional, static assumptions about server configurations with active, out-of-band measurements, significantly reducing handshake latency while seamlessly scaling post-quantum cryptographic protection for hundreds of thousands of domains without requiring manual intervention from webmasters.
Every time Cloudflare opens a new TLS 1.3 connection to an origin server, the protocol requires the client to commit to a specific key agreement algorithm in the very first packet of the transmission. Because this occurs before the origin server has provided any information regarding its capabilities, the client must make a predictive guess. When the guess aligns with the origin’s supported algorithms, the handshake finishes swiftly in a single round trip. However, an incorrect guess forces the origin server to reply with a HelloRetryRequest, compelling the client to restart the handshake and doubling the connection cost to two network round trips.
For years, Cloudflare relied on a static default guess for every origin on the internet: the widely supported classical algorithm known as X25519. While this strategy was safe and compatible with the vast majority of web infrastructure, subsequent internal measurements revealed that it was suboptimal for roughly 30% of origin connections. Automatic Key Exchange eliminates this guesswork by actively probing each origin server to identify which key agreement algorithms it supports and prefers. Armed with this empirical data, Cloudflare can lead with the optimal algorithm on the very first try, prioritizing the post-quantum hybrid algorithm X25519MLKEM768 wherever the origin server is capable of handling it.
The deployment of Automatic Key Exchange has yielded dramatic operational improvements across the network. Since the rollout began, the frequency of HelloRetryRequests dropped sharply from approximately 52% to just 3.7% among scanned origins. This reduction in retries cuts more than 150 milliseconds off connection handshake latency at the 90th percentile. Furthermore, the ongoing rollout is automatically onboarding hundreds of thousands of domains to post-quantum origin connections daily, sparing website operators from the complexities of manual cryptographic configuration.
This automated transition carries profound implications for long-term cybersecurity. Across the globe, malicious actors are actively recording encrypted web traffic that they cannot currently read, banking on the assumption that future quantum computing advancements will eventually break classical encryption. This threat strategy, widely known as the "harvest-now, decrypt-later" attack, has set a high-stakes timeline for the technology industry. Cloudflare has established a corporate roadmap to make the internet quantum-secure by 2029—the year industry experts estimate classical cryptographic algorithms could be successfully breached by a quantum computer, a milestone frequently referred to as Q-Day.
Meeting this crucial deadline cannot realistically depend on millions of independent website operators becoming expert cryptographers. Until the introduction of Automatic Key Exchange, preferring post-quantum connections demanded deliberate manual configuration, either by enabling settings directly on Cloudflare or by having origin servers strictly insist upon them. Because manual configurations are prone to user error, automation is viewed by security architects as essential to safeguarding the broader web before cryptographic standards are permanently compromised.
TLS 1.3 Handshake and the Cost of the Safe Guess
Every secure web connection relies on a foundational TLS handshake, which authenticates the server and derives a shared secret key. Because Cloudflare functions as a reverse proxy, every visitor interaction actually involves two distinct secure connections: one between the visitor and Cloudflare, and a second between Cloudflare and the origin server. Each connection operates independently, featuring its own handshake, identity verifications, and encryption keys.
Automatic Key Exchange directly impacts this second leg of the journey. When Cloudflare connects to an origin server, it acts as the TLS client and initiates the handshake by transmitting a ClientHello message containing the target hostname alongside a list of supported key agreement algorithms. In an optimal scenario, TLS 1.3 establishes a secure connection in a single network round trip by including one or more client keyshares within the initial message. If the origin accepts the choice, the handshake completes immediately, an innovation that makes TLS 1.3 significantly faster than its predecessor, TLS 1.2.
If the origin server prefers an alternative option, it issues a HelloRetryRequest, prompting Cloudflare to generate a new client keyshare matching the requested algorithm and repeat the transmission. While the connection ultimately succeeds, the retry introduces a full network round trip of latency. For years, Cloudflare maintained a static initial keyshare guess of X25519 because over 95% of origin servers supported it, allowing incompatible servers to utilize the HelloRetryRequest safety valve without breaking connectivity.
However, classical X25519 is fundamentally vulnerable to quantum computing threats. Although Cloudflare began advertising post-quantum support to origins in late 2023—initially via draft specifications and later through the standardized X25519MLKEM768 algorithm—advertising support is distinct from leading with a keyshare. A post-quantum keyshare is significantly larger than a classical keyshare, measuring 1,216 bytes compared to just 32 bytes for X25519. This size increase pushes the ClientHello message past the threshold of a single network packet.

While the TLS standard accommodates multi-packet segments, legacy middleboxes, firewalls, and certain origin servers can fail when receiving ClientHello messages split across multiple TCP packets. Previous studies indicated that a fraction of scanned origins failed to complete the TLS handshake when receiving a post-quantum keyshare first. Consequently, Cloudflare previously relied on the HelloRetryRequest mechanism as a safety buffer, advertising post-quantum readiness while leading with classical X25519 to prevent widespread site outages.
Between 2023 and the introduction of Automatic Key Exchange, the percentage of origin servers natively supporting post-quantum key exchange grew from 0.5% to 12.8%. Yet, relying on the retry mechanism to negotiate post-quantum connections imposed an unavoidable latency penalty. By actively scanning origin servers to map their exact cryptographic capabilities, Cloudflare’s Automatic Key Exchange eliminates these wasted round trips, maximizing post-quantum connections securely and efficiently.
Extending Automatic SSL/TLS and Configuring Compliance
Automatic Key Exchange is active by default for all new and existing domains, requiring no manual configuration for the vast majority of users. For administrators seeking custom controls, settings can be managed independently within the Cloudflare dashboard under the SSL/TLS configuration menu. Enabling the feature prompts Cloudflare to perform out-of-band scans of the origin servers, dynamically tailoring the initial keyshare based on empirical measurements. Disabling the toggle halts the scanning process and reverts the system to a fixed, static default key agreement order.
Additionally, Cloudflare has introduced compliance requirement settings under the Automatic Key Exchange framework, allowing administrators to filter the specific key agreement algorithms that Cloudflare is permitted to use and advertise for origin connections. When configured, traffic strictly adheres to these rule sets. Selecting multiple options requires an algorithm that satisfies all active criteria simultaneously, and configurations lacking a valid overlapping key agreement are automatically rejected.
While these controls allow organizations to align their network traffic with specific internal policies or regulatory frameworks, they require careful handling. Enforcing a post-quantum hybrid preference on an origin server that lacks actual support for X25519MLKEM768 leaves no mutually supported algorithm, resulting in complete failure for all TLS 1.3 connections. Unless strict policy obligations mandate the enforcement of post-quantum exchange across every connection, administrators are advised to leave compliance filters unselected and allow Automatic Key Exchange to negotiate optimal algorithms safely.
Measuring Adoption and Performance Gains
Automatic Key Exchange functions exclusively with domains whose origin servers support TLS 1.3, as predictive key agreement is a protocol-specific capability. The automated scanning pipeline has already assigned preferences to well over a million domains, with enrollment continuing across the remaining network infrastructure.
Data gathered from the initial cohort indicates that roughly 64% of scanned domains retained classical X25519 as their preferred algorithm, resulting in no operational change for their underlying connections. Approximately 33% of domains successfully transitioned their preference to X25519MLKEM768, instantly shielding their origin traffic from harvest-now, decrypt-later quantum threats within a single round trip. The remaining 3% adopted alternative classical curves preferred by their specific origin configurations, such as P-256, P-384, or P-521.
Before the activation of Automatic Key Exchange, nearly half of all origin connections within the scanned cohort required a HelloRetryRequest. Following the rollout, that failure rate plummeted to 3.7%, with 99.2% of post-quantum TLS 1.3 connections now completing in a single round trip. This efficiency gain translates to a reduction of more than 150 milliseconds in p90 connection handshake latency for scanned origins, providing tangible performance benefits for dynamic requests and cache misses that necessitate fresh origin connections.
Cloudflare Radar provides diagnostic tools allowing administrators to verify whether their server infrastructure supports post-quantum key agreement and check for potential implementation bugs, such as middleboxes or server buffers dropping multi-packet payloads. Because Automatic Key Exchange will not automatically upgrade domains whose origins fail these validation checks, clearing these diagnostics ensures smooth, error-free transitions.
For origins that do not yet support post-quantum encryption, enabling Automatic Key Exchange remains advantageous. The system automatically identifies compatible classical key agreements, sparing the connection from unnecessary retry latency. As modern TLS server software libraries increasingly incorporate post-quantum standards, enterprise stacks and cloud load balancers continue to upgrade organically.
Cloudflare’s ongoing development roadmap includes plans to introduce per-origin preference granularity to handle complex multi-origin domain architectures, on-demand scanning capabilities to let administrators trigger immediate capability reassessments after upgrading server stacks, and automated defenses against certificate downgrade attacks to ensure comprehensive post-quantum security across the entire web ecosystem.
Leave a Reply