
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:media="http://search.yahoo.com/mrss/">
    <channel>
        <title><![CDATA[ The Cloudflare Blog ]]></title>
        <description><![CDATA[ Get the latest news on how products at Cloudflare are built, technologies used, and join the teams helping to build a better Internet. ]]></description>
        <link>https://blog.cloudflare.com</link>
        <atom:link href="https://blog.cloudflare.com/" rel="self" type="application/rss+xml"/>
        <language>en-us</language>
        <image>
            <url>https://blog.cloudflare.com/favicon.png</url>
            <title>The Cloudflare Blog</title>
            <link>https://blog.cloudflare.com</link>
        </image>
        <lastBuildDate>Fri, 03 Apr 2026 19:02:37 GMT</lastBuildDate>
        <item>
            <title><![CDATA[Fresh insights from old data: corroborating reports of Turkmenistan IP unblocking and firewall testing]]></title>
            <link>https://blog.cloudflare.com/fresh-insights-from-old-data-corroborating-reports-of-turkmenistan-ip/</link>
            <pubDate>Mon, 03 Nov 2025 13:00:00 GMT</pubDate>
            <description><![CDATA[ Cloudflare used historical data to investigate reports of potential new firewall tests in Turkmenistan. Shifts in TCP resets/timeouts across ASNs corroborate large-scale network control system changes.
 ]]></description>
            <content:encoded><![CDATA[ <p>Here at Cloudflare, we frequently use and write about data in the present. But sometimes understanding the present begins with digging into the past.  </p><p>We recently learned of a 2024 <a href="https://turkmen.news/internet-amnistiya-v-turkmenistane-razblokirovany-3-milliarda-ip-adresov-hostingi-i-cdn/"><u>turkmen.news article</u></a> (available in Russian) that reports <a href="https://radar.cloudflare.com/tm"><u>Turkmenistan</u></a> experienced “an unprecedented easing in blocking,” causing over 3 billion previously-blocked IP addresses to become reachable. The same article reports that one of the reasons for unblocking IP addresses was that Turkmenistan may have been testing a new firewall. (The Turkmen government’s tight control over the country’s Internet access <a href="https://www.bbc.com/news/world-asia-16095369"><u>is well-documented</u></a>.) </p><p>Indeed, <a href="https://radar.cloudflare.com/"><u>Cloudflare Radar</u></a> shows a surge of requests coming from Turkmenistan around the same time, as we’ll show below. But we had an additional question: Does the firewall activity show up on Radar, as well? Two years ago, we launched the <a href="https://blog.cloudflare.com/tcp-resets-timeouts/"><u>dashboard on Radar</u></a> to give a window into the TCP connections to Cloudflare that close due to resets and timeouts. These stand out because they are considered ungraceful mechanisms to close TCP connections, according to the TCP specification. </p><p>In this blog post, we go back in time to share what Cloudflare saw in connection resets and timeouts. We must remind our readers that, as passive observers, there are <a href="https://blog.cloudflare.com/connection-tampering/#limitations-of-our-data"><u>limitations on what we can glean from the data</u></a>. For example, our data can’t reveal attribution. Even so, the ability to observe our environment <a href="https://blog.cloudflare.com/tricky-internet-measurement/"><u>can be insightful</u></a>. In a recent example, our visibility into resets and timeouts helped corroborate reports of large-scale <a href="https://blog.cloudflare.com/russian-internet-users-are-unable-to-access-the-open-internet/"><u>blocking and traffic tampering by Russia</u></a>.</p>
    <div>
      <h3>Turkmenistan requests where there were none before</h3>
      <a href="#turkmenistan-requests-where-there-were-none-before">
        
      </a>
    </div>
    <p>Let’s look first at the number of requests, since those should increase if IP addresses are unblocked. In mid-June 2024 Cloudflare started receiving a noticeable increase in HTTP requests, consistent with <a href="https://turkmen.news/internet-amnistiya-v-turkmenistane-razblokirovany-3-milliarda-ip-adresov-hostingi-i-cdn/"><u>reports</u></a> of Turkmenistan unblocking IPs.</p>
          <figure>
          <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/3Kqaxxjv9g52RVMWg92AYu/e57468cf523702cadd634c34775be033/BLOG_3069_2.png" />
          </figure><p><sup>Source: </sup><a href="https://radar.cloudflare.com/traffic/tm?dateStart=2024-06-01&amp;dateEnd=2024-06-30"><sup>Cloudflare Radar</sup></a></p>
    <div>
      <h3>Overall TCP resets and timeouts</h3>
      <a href="#overall-tcp-resets-and-timeouts">
        
      </a>
    </div>
    <p>The Transmission Control Protocol (TCP) is a lower-layer mechanism used to create a connection between clients and servers, and also carries <a href="https://radar.cloudflare.com/adoption-and-usage#http1x-vs-http2-vs-http3"><u>70% of HTTP traffic</u></a> to Cloudflare. A TCP connection works <a href="https://blog.cloudflare.com/connection-tampering/#explaining-tampering-with-telephone-calls"><u>much like a telephone call</u></a> between humans, who follow graceful conventions to end a call—and who are acutely aware when conventions are broken if a call ends abruptly.  </p><p>TCP also defines conventions to end the connection gracefully, and we developed <a href="https://blog.cloudflare.com/tcp-resets-timeouts/"><u>mechanisms to detect</u></a> when they don’t. An ungraceful end is triggered by a reset instruction or a timeout. Some are due to benign artifacts of software design or human user behaviours. However, sometimes they are exploited by <a href="https://blog.cloudflare.com/connection-tampering"><u>third parties to close connections</u></a> in everything from school and enterprise firewalls or software, to zero-rating on mobile plans, to nation-state filtering.</p><p>When we look at connections from Turkmenistan, we see that on June 13, 2024, the combined proportion of the four coloured regions increases; each coloured region represents ungraceful ends at a distinct stage of the connection lifetime. In addition to the combined increase, the relative proportions between stages (or colours) changes as well.</p>
          <figure>
          <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/1hNDpdNS9lDPKg3jFHigiL/ff3de33af7974c5d32ba421cbbc3c42e/BLOG_3069_3.png" />
          </figure><p><sup>Source: </sup><a href="https://radar.cloudflare.com/security/network-layer/tm?dateStart=2023-10-01&amp;dateEnd=2023-11-30#tcp-resets-and-timeouts"><sup>Cloudflare Radar</sup></a></p><p>Further changes appeared in the weeks that followed. Among them are an increase in Post-PSH (orange) anomalies starting around July 4; a reduction in Post-ACK (light blue) anomalies around July 13; and an increase in anomalies later in connections (green) starting July 22.</p>
          <figure>
          <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/6IavKOkF7tB02MtNqJPqqD/f08c78f65894e751b7c9fce9820dee85/BLOG_3069_4.png" />
          </figure><p><sup>Source: </sup><a href="https://radar.cloudflare.com/security/network-layer/tm?dateStart=2024-07-01&amp;dateEnd=2024-07-30#tcp-resets-and-timeouts"><sup>Cloudflare Radar</sup></a></p><p>The shifts above <i>could</i> be explained by a large firewall system. It’s important to keep in mind that data in each of the connection stages (captured by the four coloured regions in the graphs) can be explained by browser implementations or user actions. However, the scale of the data would need a great number of browsers or users doing the same thing to show up. Similarly, individual changes in behaviour would be lost unless they occur in large numbers at the same time.</p>
    <div>
      <h3>Digging down to individual networks</h3>
      <a href="#digging-down-to-individual-networks">
        
      </a>
    </div>
    <p>We’ve learned that it can be helpful to look at the data for individual networks to reveal common patterns between different networks in different regions <a href="https://blog.cloudflare.com/tcp-resets-timeouts/#zero-rating-in-mobile-networks"><u>operated by single entities</u></a>. </p><p>Looking at individual networks within Turkmenistan, trends and timelines appear more pronounced. July 22 in particular sees greater proportions of anomalies associated with the <a href="https://www.cloudflare.com/learning/ssl/what-is-sni/"><u>Server Name Indication</u></a>, or domain name, rather than the IP address (dark blue), although the connection stage where the anomalies appear varies by individual network.</p><p>The general Turkmenistan trends are largely mirrored in connections from <a href="https://radar.cloudflare.com/as20661"><u>AS20661 (TurkmenTelecom)</u></a>, indicating that this <a href="https://www.cloudflare.com/learning/network-layer/what-is-an-autonomous-system/"><u>autonomous system</u></a> (AS) accounts for <a href="https://radar.cloudflare.com/tm#autonomous-systems"><u>a large proportion of Turkmenistan’s traffic</u></a> to Cloudflare’s network. There is a notable reduction in Post-ACK (light blue) anomalies starting around July 26.</p>
          <figure>
          <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/5ukNOB1CYUAPW2s7ofdqMK/7d1dca367374db90627413e2c40a6ee3/BLOG_3069_5.png" />
          </figure><p><sup>Source: </sup><a href="https://radar.cloudflare.com/security/network-layer/tm?dateStart=2023-10-01&amp;dateEnd=2023-11-30#tcp-resets-and-timeouts"><sup>Cloudflare Radar</sup></a></p><p>A different picture emerges from <a href="https://radar.cloudflare.com/as51495"><u>AS51495 (Ashgabat City Telephone Network)</u></a>. Post-ACK anomalies almost completely disappear on July 12, corresponding with an increase in anomalies during the Post-PSH stage. An increase of anomalies in the Later (green) connection stage on July 22 is apparent for this AS as well.</p>
          <figure>
          <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/7btBYWx2VVVg0MH10yY9ot/17e87bf94f97b1cd43139e432f189770/BLOG_3069_6.png" />
          </figure><p><sup>Source: </sup><a href="https://radar.cloudflare.com/security/network-layer/tm?dateStart=2023-10-01&amp;dateEnd=2023-11-30#tcp-resets-and-timeouts"><sup>Cloudflare Radar</sup></a></p><p>Finally, for <a href="https://radar.cloudflare.com/as59974"><u>AS59974 (Altyn Asyr)</u></a>, you can see below that there is a clear spike in Post-ACK anomalies starting July 22. This is the stage of the connection where a firewall could have seen the SNI, and chooses to drop the packets immediately, so they never reach Cloudflare’s servers.</p>
          <figure>
          <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/4pxUHjzkRwnbmaSsgkhiKd/b56fbc84e2fdcd8b889b6e8b3a68dc40/BLOG_3069_7.png" />
          </figure><p><sup>Source: </sup><a href="https://radar.cloudflare.com/security/network-layer/tm?dateStart=2023-10-01&amp;dateEnd=2023-11-30#tcp-resets-and-timeouts"><sup>Cloudflare Radar</sup></a></p>
    <div>
      <h3>Timeouts and resets in context, never isolation</h3>
      <a href="#timeouts-and-resets-in-context-never-isolation">
        
      </a>
    </div>
    <p>We’ve previously discussed <a href="https://blog.cloudflare.com/tcp-resets-timeouts/"><u>how to use the resets and timeouts</u></a> data because, while useful, it can also be misinterpreted. Radar’s data on resets and timeouts is unique among operators, but in isolation it’s incomplete and subject to human bias. </p><p>Take the figure above for AS59974 where Post-ACK (light blue) anomalies markedly increased on July 22. The Radar view is proportional, meaning that the increase in proportion could be explained by greater numbers of anomalies – but could also be explained, for example, by a smaller number of valid requests. Indeed, looking at the HTTP request levels for the same AS, there was a similarly pronounced drop starting on the same day, as shown below. </p>
          <figure>
          <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/2PAYPpcFeInis6zo4lWrSx/f28a1f84fbe5b1c21659911b11331c30/BLOG_3069_8.png" />
          </figure><p><sup>Source: </sup><a href="https://radar.cloudflare.com/security/network-layer/tm?dateStart=2023-10-01&amp;dateEnd=2023-11-30#tcp-resets-and-timeouts"><sup>Cloudflare Radar</sup></a></p><p>If we look at the same two graphs before July 22, however, rates of reset and timeout anomalies do not appear to mirror the very large shifts up and down in HTTP requests.</p>
    <div>
      <h3>Looking ahead can also mean looking behind</h3>
      <a href="#looking-ahead-can-also-mean-looking-behind">
        
      </a>
    </div>
    <p>These charts from Radar above offer a way to analyze news events from a different angle, by looking at requests and TCP connection resets and timeouts. Does this data tell us definitively that new firewalls were being tested in Turkmenistan? No. But the trends in the data are consistent with what we could expect to see if that were the case.</p><p>If thinking about ways to use the resets and timeouts data going forward, we’d encourage also looking at the data in retrospect—or even further past to improve context.</p><p>A natural question might be, for example, “If Turkmenistan stopped blocking IPs in mid-2024, what did the data say beforehand?” The figure below captures October and November 2023. (The red-shaded region contains missing data due to the <a href="https://blog.cloudflare.com/post-mortem-on-cloudflare-control-plane-and-analytics-outage"><u>Nov. 2 Cloudflare control plane and metrics outage</u></a>.) Signals about the Internet in Turkmenistan were evolving well before the <a href="https://turkmen.news/internet-amnistiya-v-turkmenistane-razblokirovany-3-milliarda-ip-adresov-hostingi-i-cdn/"><u>news article</u></a> that prompted us to look.</p>
          <figure>
          <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/2W4MfieKNV24PmvynAAIfO/af42a2328059eb15fba0619372973887/BLOG_3069_9.png" />
          </figure><p><sup>Source: </sup><a href="https://radar.cloudflare.com/security/network-layer/tm?dateStart=2023-10-01&amp;dateEnd=2023-11-30#tcp-resets-and-timeouts"><sup>Cloudflare Radar</sup></a></p>
    <div>
      <h3>What’s next?</h3>
      <a href="#whats-next">
        
      </a>
    </div>
    <p>To learn more, see our guide about <a href="https://blog.cloudflare.com/tcp-resets-timeouts/"><u>how to use the resets and timeouts data available on Radar</u></a>, as well as the technical details about our <a href="https://blog.cloudflare.com/connection-tampering/"><u>third-party tampering measurement </u></a>and some perspectives by a former <a href="https://blog.cloudflare.com/experience-of-data-at-scale/"><u>intern who helped drive</u></a> the study. </p><p>We’re proud to offer a unique view of TCP connection anomalies on Radar. It’s a testament to the long-lived benefits that emerge when approaching <a href="https://blog.cloudflare.com/tricky-internet-measurement/"><u>Internet measurement as a science</u></a>. In keeping with the open spirit of science, we’ve also shared how we<a href="https://blog.cloudflare.com/tricky-internet-measurement/"><u> detect and log resets and timeouts</u></a> so that others can reproduce the observability on their servers, whether by hobbyists or other large operators.</p> ]]></content:encoded>
            <category><![CDATA[Radar]]></category>
            <category><![CDATA[Research]]></category>
            <category><![CDATA[Internet Shutdown]]></category>
            <category><![CDATA[Internet Trends]]></category>
            <category><![CDATA[Trends]]></category>
            <category><![CDATA[Consumer Services]]></category>
            <guid isPermaLink="false">404c64k0KinGRYZkfe0xum</guid>
            <dc:creator>Luke Valenta</dc:creator>
            <dc:creator>Marwan Fayed</dc:creator>
        </item>
        <item>
            <title><![CDATA[Keeping the Internet fast and secure: introducing Merkle Tree Certificates]]></title>
            <link>https://blog.cloudflare.com/bootstrap-mtc/</link>
            <pubDate>Tue, 28 Oct 2025 13:00:00 GMT</pubDate>
            <description><![CDATA[ Cloudflare is launching an experiment with Chrome to evaluate fast, scalable, and quantum-ready Merkle Tree Certificates, all without degrading performance or changing WebPKI trust relationships. ]]></description>
            <content:encoded><![CDATA[ <p>The world is in a race to build its first quantum computer capable of solving practical problems not feasible on even the largest conventional supercomputers. While the quantum computing paradigm promises many benefits, it also threatens the security of the Internet by breaking much of the cryptography we have come to rely on.</p><p>To mitigate this threat, Cloudflare is helping to migrate the Internet to Post-Quantum (PQ) cryptography. Today, <a href="https://radar.cloudflare.com/adoption-and-usage#post-quantum-encryption"><u>about 50%</u></a> of traffic to Cloudflare's edge network is protected against the most urgent threat: an attacker who can intercept and store encrypted traffic today and then decrypt it in the future with the help of a quantum computer. This is referred to as the <a href="https://en.wikipedia.org/wiki/Harvest_now,_decrypt_later"><u>harvest now, decrypt later</u></a><i> </i>threat.</p><p>However, this is just one of the threats we need to address. A quantum computer can also be used to crack a server's <a href="https://www.cloudflare.com/application-services/products/ssl/">TLS certificate</a>, allowing an attacker to impersonate the server to unsuspecting clients. The good news is that we already have PQ algorithms we can use for quantum-safe authentication. The bad news is that adoption of these algorithms in TLS will require significant changes to one of the most complex and security-critical systems on the Internet: the Web Public-Key Infrastructure (WebPKI).</p><p>The central problem is the sheer size of these new algorithms: signatures for ML-DSA-44, one of the most performant PQ algorithms standardized by NIST, are 2,420 bytes long, compared to just 64 bytes for ECDSA-P256, the most popular non-PQ signature in use today; and its public keys are 1,312 bytes long, compared to just 64 bytes for ECDSA. That's a roughly 20-fold increase in size. Worse yet, the average TLS handshake includes a number of public keys and signatures, adding up to 10s of kilobytes of overhead per handshake. This is enough to have a <a href="https://blog.cloudflare.com/another-look-at-pq-signatures/#how-many-added-bytes-are-too-many-for-tls"><u>noticeable impact</u></a> on the performance of TLS.</p><p>That makes drop-in PQ certificates a tough sell to enable today: they don’t bring any security benefit before Q-day — the day a cryptographically relevant quantum computer arrives — but they do degrade performance. We could sit and wait until Q-day is a year away, but that’s playing with fire. Migrations always take longer than expected, and by waiting we risk the security and privacy of the Internet, which is <a href="https://developers.cloudflare.com/ssl/edge-certificates/universal-ssl/"><u>dear to us</u></a>.</p><p>It's clear that we must find a way to make post-quantum certificates cheap enough to deploy today by default for everyone — not just those that can afford it. In this post, we'll introduce you to the plan we’ve brought together with industry partners to the <a href="https://datatracker.ietf.org/group/plants/about/"><u>IETF</u></a> to redesign the WebPKI in order to allow a smooth transition to PQ authentication with no performance impact (and perhaps a performance improvement!). We'll provide an overview of one concrete proposal, called <a href="https://datatracker.ietf.org/doc/draft-davidben-tls-merkle-tree-certs/"><u>Merkle Tree Certificates (MTCs)</u></a>, whose goal is to whittle down the number of public keys and signatures in the TLS handshake to the bare minimum required.</p><p>But talk is cheap. We <a href="https://blog.cloudflare.com/experiment-with-pq/"><u>know</u></a> <a href="https://blog.cloudflare.com/announcing-encrypted-client-hello/"><u>from</u></a> <a href="https://blog.cloudflare.com/why-tls-1-3-isnt-in-browsers-yet/"><u>experience</u></a> that, as with any change to the Internet, it's crucial to test early and often. <b>Today we're announcing our intent to deploy MTCs on an experimental basis in collaboration with Chrome Security.</b> In this post, we'll describe the scope of this experiment, what we hope to learn from it, and how we'll make sure it's done safely.</p>
    <div>
      <h2>The WebPKI today — an old system with many patches</h2>
      <a href="#the-webpki-today-an-old-system-with-many-patches">
        
      </a>
    </div>
    <p>Why does the TLS handshake have so many public keys and signatures?</p><p>Let's start with Cryptography 101. When your browser connects to a website, it asks the server to <b>authenticate</b> itself to make sure it's talking to the real server and not an impersonator. This is usually achieved with a cryptographic primitive known as a digital signature scheme (e.g., ECDSA or ML-DSA). In TLS, the server signs the messages exchanged between the client and server using its <b>secret key</b>, and the client verifies the signature using the server's <b>public key</b>. In this way, the server confirms to the client that they've had the same conversation, since only the server could have produced a valid signature.</p><p>If the client already knows the server's public key, then only <b>1 signature</b> is required to authenticate the server. In practice, however, this is not really an option. The web today is made up of around a billion TLS servers, so it would be unrealistic to provision every client with the public key of every server. What's more, the set of public keys will change over time as new servers come online and existing ones rotate their keys, so we would need some way of pushing these changes to clients.</p><p>This scaling problem is at the heart of the design of all PKIs.</p>
    <div>
      <h3>Trust is transitive</h3>
      <a href="#trust-is-transitive">
        
      </a>
    </div>
    <p>Instead of expecting the client to know the server's public key in advance, the server might just send its public key during the TLS handshake. But how does the client know that the public key actually belongs to the server? This is the job of a <b>certificate</b>.</p><p>A certificate binds a public key to the identity of the server — usually its DNS name, e.g., <code>cloudflareresearch.com</code>. The certificate is signed by a Certification Authority (CA) whose public key is known to the client. In addition to verifying the server's handshake signature, the client verifies the signature of this certificate. This establishes a chain of trust: by accepting the certificate, the client is trusting that the CA verified that the public key actually belongs to the server with that identity.</p><p>Clients are typically configured to trust many CAs and must be provisioned with a public key for each. Things are much easier however, since there are only 100s of CAs instead of billions. In addition, new certificates can be created without having to update clients.</p><p>These efficiencies come at a relatively low cost: for those counting at home, that's <b>+1</b> signature and <b>+1</b> public key, for a total of <b>2 signatures and 1 public key</b> per TLS handshake.</p><p>That's not the end of the story, however. As the WebPKI has evolved, so have these chains of trust grown a bit longer. These days it's common for a chain to consist of two or more certificates rather than just one. This is because CAs sometimes need to rotate<b> </b>their keys, just as servers do. But before they can start using the new key, they must distribute the corresponding public key to clients. This takes time, since it requires billions of clients to update their trust stores. To bridge the gap, the CA will sometimes use the old key to issue a certificate for the new one and append this certificate to the end of the chain.</p><p>That's<b> +1</b> signature and<b> +1</b> public key, which brings us to<b> 3 signatures and 2 public keys</b>. And we still have a little ways to go.</p>
    <div>
      <h3>Trust but verify</h3>
      <a href="#trust-but-verify">
        
      </a>
    </div>
    <p>The main job of a CA is to verify that a server has control over the domain for which it’s requesting a certificate. This process has evolved over the years from a high-touch, CA-specific process to a standardized, <a href="https://datatracker.ietf.org/doc/html/rfc8555/"><u>mostly automated process</u></a> used for issuing most certificates on the web. (Not all CAs fully support automation, however.) This evolution is marked by a number of security incidents in which a certificate was <b>mis-issued </b>to a party other than the server, allowing that party to impersonate the server to any client that trusts the CA.</p><p>Automation helps, but <a href="https://en.wikipedia.org/wiki/DigiNotar#Issuance_of_fraudulent_certificates"><u>attacks</u></a> are still possible, and mistakes are almost inevitable. <a href="https://blog.cloudflare.com/unauthorized-issuance-of-certificates-for-1-1-1-1/"><u>Earlier this year</u></a>, several certificates for Cloudflare's encrypted 1.1.1.1 resolver were issued without our involvement or authorization. This apparently occurred by accident, but it nonetheless put users of 1.1.1.1 at risk. (The mis-issued certificates have since been revoked.)</p><p>Ensuring mis-issuance is detectable is the job of the Certificate Transparency (CT) ecosystem. The basic idea is that each certificate issued by a CA gets added to a public <b>log</b>. Servers can audit these logs for certificates issued in their name. If ever a certificate is issued that they didn't request itself, the server operator can prove the issuance happened, and the PKI ecosystem can take action to prevent the certificate from being trusted by clients.</p><p>Major browsers, including Firefox and Chrome and its derivatives, require certificates to be logged before they can be trusted. For example, Chrome, Safari, and Firefox will only accept the server's certificate if it appears in at least two logs the browser is configured to trust. This policy is easy to state, but tricky to implement in practice:</p><ol><li><p>Operating a CT log has historically been fairly expensive. Logs ingest billions of certificates over their lifetimes: when an incident happens, or even just under high load, it can take some time for a log to make a new entry available for auditors.</p></li><li><p>Clients can't really audit logs themselves, since this would expose their browsing history (i.e., the servers they wanted to connect to) to the log operators.</p></li></ol><p>The solution to both problems is to include a signature from the CT log along with the certificate. The signature is produced immediately in response to a request to log a certificate, and attests to the log's intent to include the certificate in the log within 24 hours.</p><p>Per browser policy, certificate transparency adds <b>+2</b> signatures to the TLS handshake, one for each log. This brings us to a total of <b>5 signatures and 2 public keys</b> in a typical handshake on the public web.</p>
    <div>
      <h3>The future WebPKI</h3>
      <a href="#the-future-webpki">
        
      </a>
    </div>
    <p>The WebPKI is a living, breathing, and highly distributed system. We've had to patch it a number of times over the years to keep it going, but on balance it has served our needs quite well — until now.</p><p>Previously, whenever we needed to update something in the WebPKI, we would tack on another signature. This strategy has worked because conventional cryptography is so cheap. But <b>5 signatures and 2 public keys </b>on average for each TLS handshake is simply too much to cope with for the larger PQ signatures that are coming.</p><p>The good news is that by moving what we already have around in clever ways, we can drastically reduce the number of signatures we need.</p>
    <div>
      <h3>Crash course on Merkle Tree Certificates</h3>
      <a href="#crash-course-on-merkle-tree-certificates">
        
      </a>
    </div>
    <p><a href="https://datatracker.ietf.org/doc/draft-davidben-tls-merkle-tree-certs/"><u>Merkle Tree Certificates (MTCs)</u></a> is a proposal for the next generation of the WebPKI that we are implementing and plan to deploy on an experimental basis. Its key features are as follows:</p><ol><li><p>All the information a client needs to validate a Merkle Tree Certificate can be disseminated out-of-band. If the client is sufficiently up-to-date, then the TLS handshake needs just <b>1 signature, 1 public key, and 1 Merkle tree inclusion proof</b>. This is quite small, even if we use post-quantum algorithms.</p></li><li><p>The MTC specification makes certificate transparency a first class feature of the PKI by having each CA run its own log of exactly the certificates they issue.</p></li></ol><p>Let's poke our head under the hood a little. Below we have an MTC generated by one of our internal tests. This would be transmitted from the server to the client in the TLS handshake:</p>
            <pre><code>-----BEGIN CERTIFICATE-----
MIICSzCCAUGgAwIBAgICAhMwDAYKKwYBBAGC2ksvADAcMRowGAYKKwYBBAGC2ksv
AQwKNDQzNjMuNDguMzAeFw0yNTEwMjExNTMzMjZaFw0yNTEwMjgxNTMzMjZaMCEx
HzAdBgNVBAMTFmNsb3VkZmxhcmVyZXNlYXJjaC5jb20wWTATBgcqhkjOPQIBBggq
hkjOPQMBBwNCAARw7eGWh7Qi7/vcqc2cXO8enqsbbdcRdHt2yDyhX5Q3RZnYgONc
JE8oRrW/hGDY/OuCWsROM5DHszZRDJJtv4gno2wwajAOBgNVHQ8BAf8EBAMCB4Aw
EwYDVR0lBAwwCgYIKwYBBQUHAwEwQwYDVR0RBDwwOoIWY2xvdWRmbGFyZXJlc2Vh
cmNoLmNvbYIgc3RhdGljLWN0LmNsb3VkZmxhcmVyZXNlYXJjaC5jb20wDAYKKwYB
BAGC2ksvAAOB9QAAAAAAAAACAAAAAAAAAAJYAOBEvgOlvWq38p45d0wWTPgG5eFV
wJMhxnmDPN1b5leJwHWzTOx1igtToMocBwwakt3HfKIjXYMO5CNDOK9DIKhmRDSV
h+or8A8WUrvqZ2ceiTZPkNQFVYlG8be2aITTVzGuK8N5MYaFnSTtzyWkXP2P9nYU
Vd1nLt/WjCUNUkjI4/75fOalMFKltcc6iaXB9ktble9wuJH8YQ9tFt456aBZSSs0
cXwqFtrHr973AZQQxGLR9QCHveii9N87NXknDvzMQ+dgWt/fBujTfuuzv3slQw80
mibA021dDCi8h1hYFQAA
-----END CERTIFICATE-----</code></pre>
            <p>Looks like your average PEM encoded certificate. Let's decode it and look at the parameters:</p>
            <pre><code>$ openssl x509 -in merkle-tree-cert.pem -noout -text
Certificate:
    Data:
        Version: 3 (0x2)
        Serial Number: 531 (0x213)
        Signature Algorithm: 1.3.6.1.4.1.44363.47.0
        Issuer: 1.3.6.1.4.1.44363.47.1=44363.48.3
        Validity
            Not Before: Oct 21 15:33:26 2025 GMT
            Not After : Oct 28 15:33:26 2025 GMT
        Subject: CN=cloudflareresearch.com
        Subject Public Key Info:
            Public Key Algorithm: id-ecPublicKey
                Public-Key: (256 bit)
                pub:
                    04:70:ed:e1:96:87:b4:22:ef:fb:dc:a9:cd:9c:5c:
                    ef:1e:9e:ab:1b:6d:d7:11:74:7b:76:c8:3c:a1:5f:
                    94:37:45:99:d8:80:e3:5c:24:4f:28:46:b5:bf:84:
                    60:d8:fc:eb:82:5a:c4:4e:33:90:c7:b3:36:51:0c:
                    92:6d:bf:88:27
                ASN1 OID: prime256v1
                NIST CURVE: P-256
        X509v3 extensions:
            X509v3 Key Usage: critical
                Digital Signature
            X509v3 Extended Key Usage:
                TLS Web Server Authentication
            X509v3 Subject Alternative Name:
                DNS:cloudflareresearch.com, DNS:static-ct.cloudflareresearch.com
    Signature Algorithm: 1.3.6.1.4.1.44363.47.0
    Signature Value:
        00:00:00:00:00:00:02:00:00:00:00:00:00:00:02:58:00:e0:
        44:be:03:a5:bd:6a:b7:f2:9e:39:77:4c:16:4c:f8:06:e5:e1:
        55:c0:93:21:c6:79:83:3c:dd:5b:e6:57:89:c0:75:b3:4c:ec:
        75:8a:0b:53:a0:ca:1c:07:0c:1a:92:dd:c7:7c:a2:23:5d:83:
        0e:e4:23:43:38:af:43:20:a8:66:44:34:95:87:ea:2b:f0:0f:
        16:52:bb:ea:67:67:1e:89:36:4f:90:d4:05:55:89:46:f1:b7:
        b6:68:84:d3:57:31:ae:2b:c3:79:31:86:85:9d:24:ed:cf:25:
        a4:5c:fd:8f:f6:76:14:55:dd:67:2e:df:d6:8c:25:0d:52:48:
        c8:e3:fe:f9:7c:e6:a5:30:52:a5:b5:c7:3a:89:a5:c1:f6:4b:
        5b:95:ef:70:b8:91:fc:61:0f:6d:16:de:39:e9:a0:59:49:2b:
        34:71:7c:2a:16:da:c7:af:de:f7:01:94:10:c4:62:d1:f5:00:
        87:bd:e8:a2:f4:df:3b:35:79:27:0e:fc:cc:43:e7:60:5a:df:
        df:06:e8:d3:7e:eb:b3:bf:7b:25:43:0f:34:9a:26:c0:d3:6d:
        5d:0c:28:bc:87:58:58:15:00:00</code></pre>
            <p>While some of the parameters probably look familiar, others will look unusual. On the familiar side, the subject and public key are exactly what we might expect: the DNS name is <code>cloudflareresearch.com</code> and the public key is for a familiar signature algorithm, ECDSA-P256. This algorithm is not PQ, of course — in the future we would put ML-DSA-44 there instead.</p><p>On the unusual side, OpenSSL appears to not recognize the signature algorithm of the issuer and just prints the raw OID and bytes of the signature. There's a good reason for this: the MTC does not have a signature in it at all! So what exactly are we looking at?</p><p>The trick to leave out signatures is that a Merkle Tree Certification Authority (MTCA) produces its <i>signatureless</i> certificates <i>in batches</i> rather than individually. In place of a signature, the certificate has an <b>inclusion proof</b> of the certificate in a batch of certificates signed by the MTCA.</p><p>To understand how inclusion proofs work, let's think about a slightly simplified version of the MTC specification. To issue a batch, the MTCA arranges the unsigned certificates into a data structure called a <b>Merkle tree</b> that looks like this:</p>
          <figure>
          <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/4LGhISsS07kbpSgDkqx8p2/68e3b36deeca7f97139654d2c769df68/image3.png" />
          </figure><p>Each leaf of the tree corresponds to a certificate, and each inner node is equal to the hash of its children. To sign the batch, the MTCA uses its secret key to sign the head of the tree. The structure of the tree guarantees that each certificate in the batch was signed by the MTCA: if we tried to tweak the bits of any one of the certificates, the treehead would end up having a different value, which would cause the signature to fail.</p><p>An inclusion proof for a certificate consists of the hash of each sibling node along the path from the certificate to the treehead:</p>
          <figure>
          <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/4UZZHkRwsBLWXRYeop4rXv/8598cde48c27c112bc4992889f3d5799/image1.gif" />
          </figure><p>Given a validated treehead, this sequence of hashes is sufficient to prove inclusion of the certificate in the tree. This means that, in order to validate an MTC, the client also needs to obtain the signed treehead from the MTCA.</p><p>This is the key to MTC's efficiency:</p><ol><li><p>Signed treeheads can be disseminated to clients out-of-band and validated offline. Each validated treehead can then be used to validate any certificate in the corresponding batch, eliminating the need to obtain a signature for each server certificate.</p></li><li><p>During the TLS handshake, the client tells the server which treeheads it has. If the server has a signatureless certificate covered by one of those treeheads, then it can use that certificate to authenticate itself. That's <b>1 signature,1 public key and 1 inclusion proof</b> per handshake, both for the server being authenticated.</p></li></ol><p>Now, that's the simplified version. MTC proper has some more bells and whistles. To start, it doesn’t create a separate Merkle tree for each batch, but it grows a single large tree, which is used for better transparency. As this tree grows, periodically (sub)tree heads are selected to be shipped to browsers, which we call <b>landmarks</b>. In the common case browsers will be able to fetch the most recent landmarks, and servers can wait for batch issuance, but we need a fallback: MTC also supports certificates that can be issued immediately and don’t require landmarks to be validated, but these are not as small. A server would provision both types of Merkle tree certificates, so that the common case is fast, and the exceptional case is slow, but at least it’ll work.</p>
    <div>
      <h2>Experimental deployment</h2>
      <a href="#experimental-deployment">
        
      </a>
    </div>
    <p>Ever since early designs for MTCs emerged, we’ve been eager to experiment with the idea. In line with the IETF principle of “<a href="https://www.ietf.org/runningcode/"><u>running code</u></a>”, it often takes implementing a protocol to work out kinks in the design. At the same time, we cannot risk the security of users. In this section, we describe our approach to experimenting with aspects of the Merkle Tree Certificates design <i>without</i> changing any trust relationships.</p><p>Let’s start with what we hope to learn. We have lots of questions whose answers can help to either validate the approach, or uncover pitfalls that require reshaping the protocol — in fact, an implementation of an early MTC draft by <a href="https://www.cs.ru.nl/masters-theses/2025/M_Pohl___Implementation_and_Analysis_of_Merkle_Tree_Certificates_for_Post-Quantum_Secure_Authentication_in_TLS.pdf"><u>Maximilian Pohl</u></a> and <a href="https://www.ietf.org/archive/id/draft-davidben-tls-merkle-tree-certs-07.html#name-acknowledgements"><u>Mia Celeste</u></a> did exactly this. We’d like to know:</p><p><b>What breaks?</b> Protocol ossification (the tendency of implementation bugs to make it harder to change a protocol) is an ever-present issue with deploying protocol changes. For TLS in particular, despite having built-in flexibility, time after time we’ve found that if that flexibility is not regularly used, there will be buggy implementations and middleboxes that break when they see things they don’t recognize. TLS 1.3 deployment <a href="https://blog.cloudflare.com/why-tls-1-3-isnt-in-browsers-yet/"><u>took years longer</u></a> than we hoped for this very reason. And more recently, the rollout of PQ key exchange in TLS caused the Client Hello to be split over multiple TCP packets, something that many middleboxes <a href="https://tldr.fail/"><u>weren't ready for</u></a>.</p><p><b>What is the performance impact?</b> In fact, we expect MTCs to <i>reduce </i>the size of the handshake, even compared to today's non-PQ certificates. They will also reduce CPU cost: ML-DSA signature verification is about as fast as ECDSA, and there will be far fewer signatures to verify. We therefore expect to see a <i>reduction in latency</i>. We would like to see if there is a measurable performance improvement.</p><p><b>What fraction of clients will stay up to date? </b>Getting the performance benefit of MTCs requires the clients and servers to be roughly in sync with one another. We expect MTCs to have fairly short lifetimes, a week or so. This means that if the client's latest landmark is older than a week, the server would have to fallback to a larger certificate. Knowing how often this fallback happens will help us tune the parameters of the protocol to make fallbacks less likely.</p><p>In order to answer these questions, we are implementing MTC support in our TLS stack and in our certificate issuance infrastructure. For their part, Chrome is implementing MTC support in their own TLS stack and will stand up infrastructure to disseminate landmarks to their users.</p><p>As we've done in past experiments, we plan to enable MTCs for a subset of our free customers with enough traffic that we will be able to get useful measurements. Chrome will control the experimental rollout: they can ramp up slowly, measuring as they go and rolling back if and when bugs are found.</p><p>Which leaves us with one last question: who will run the Merkle Tree CA?</p>
    <div>
      <h3>Bootstrapping trust from the existing WebPKI</h3>
      <a href="#bootstrapping-trust-from-the-existing-webpki">
        
      </a>
    </div>
    <p>Standing up a proper CA is no small task: it takes years to be trusted by major browsers. That’s why Cloudflare isn’t going to become a “real” CA for this experiment, and Chrome isn’t going to trust us directly.</p><p>Instead, to make progress on a reasonable timeframe, without sacrificing due diligence, we plan to "mock" the role of the MTCA. We will run an MTCA (on <a href="https://github.com/cloudflare/azul/"><u>Workers</u></a> based on our <a href="https://blog.cloudflare.com/azul-certificate-transparency-log/"><u>StaticCT logs</u></a>), but for each MTC we issue, we also publish an existing certificate from a trusted CA that agrees with it. We call this the <b>bootstrap certificate</b>. When Chrome’s infrastructure pulls updates from our MTCA log, they will also pull these bootstrap certificates, and check whether they agree. Only if they do, they’ll proceed to push the corresponding landmarks to Chrome clients. In other words, Cloudflare is effectively just “re-encoding” an existing certificate (with domain validation performed by a trusted CA) as an MTC, and Chrome is using certificate transparency to keep us honest.</p>
    <div>
      <h2>Conclusion</h2>
      <a href="#conclusion">
        
      </a>
    </div>
    <p>With almost 50% of our traffic already protected by post-quantum encryption, we’re halfway to a fully post-quantum secure Internet. The second part of our journey, post-quantum certificates, is the hardest yet though. A simple drop-in upgrade has a noticeable performance impact and no security benefit before Q-day. This means it’s a hard sell to enable today by default. But here we are playing with fire: migrations always take longer than expected. If we want to keep an ubiquitously private and secure Internet, we need a post-quantum solution that’s performant enough to be enabled by default <b>today</b>.</p><p>Merkle Tree Certificates (MTCs) solves this problem by reducing the number of signatures and public keys to the bare minimum while maintaining the WebPKI's essential properties. We plan to roll out MTCs to a fraction of free accounts by early next year. This does not affect any visitors that are not part of the Chrome experiment. For those that are, thanks to the bootstrap certificates, there is no impact on security.</p><p>We’re excited to keep the Internet fast <i>and</i> secure, and will report back soon on the results of this experiment: watch this space! MTC is evolving as we speak, if you want to get involved, please join the IETF <a href="https://mailman3.ietf.org/mailman3/lists/plants@ietf.org/"><u>PLANTS mailing list</u></a>.</p> ]]></content:encoded>
            <category><![CDATA[Post-Quantum]]></category>
            <category><![CDATA[Research]]></category>
            <category><![CDATA[Cryptography]]></category>
            <category><![CDATA[Security]]></category>
            <category><![CDATA[TLS]]></category>
            <category><![CDATA[Chrome]]></category>
            <category><![CDATA[Google]]></category>
            <category><![CDATA[IETF]]></category>
            <category><![CDATA[Transparency]]></category>
            <category><![CDATA[Rust]]></category>
            <category><![CDATA[Open Source]]></category>
            <category><![CDATA[Cloudflare Workers]]></category>
            <guid isPermaLink="false">4jURWdZzyjdrcurJ4LlJ1z</guid>
            <dc:creator>Luke Valenta</dc:creator>
            <dc:creator>Christopher Patton</dc:creator>
            <dc:creator>Vânia Gonçalves</dc:creator>
            <dc:creator>Bas Westerbaan</dc:creator>
        </item>
        <item>
            <title><![CDATA[Introducing new regional Internet traffic and Certificate Transparency insights on Cloudflare Radar]]></title>
            <link>https://blog.cloudflare.com/new-regional-internet-traffic-and-certificate-transparency-insights-on-radar/</link>
            <pubDate>Fri, 26 Sep 2025 13:00:00 GMT</pubDate>
            <description><![CDATA[ Cloudflare Radar now offers a Certificate Transparency dashboard for monitoring TLS certificate activity,  and new regional traffic insights for a sub-national perspective on Internet trends. ]]></description>
            <content:encoded><![CDATA[ <p>Since <a href="https://blog.cloudflare.com/introducing-cloudflare-radar/"><u>launching during Birthday Week in 2020</u></a>, Radar has announced significant new capabilities and data sets during subsequent Birthday Weeks. We continue that tradition this year with a two-part launch, adding more dimensions to Radar’s ability to slice and dice the Internet.</p><p>First, we’re adding <a href="#introducing-regional-internet-traffic-insights-on-radar"><u>regional traffic insights</u></a>. Regional traffic insights bring a more localized perspective to the traffic trends shown on Radar.</p><p>Second, we’re adding detailed <a href="#introducing-certificate-transparency-insights-on-radar"><u>Certificate Transparency (CT) data</u></a>, too. The new CT data builds on the <a href="https://blog.cloudflare.com/tag/certificate-transparency/"><u>work that Cloudflare has been doing around CT</u></a> since 2018, including <a href="https://blog.cloudflare.com/a-tour-through-merkle-town-cloudflares-ct-ecosystem-dashboard/"><u>Merkle Town</u></a>, our initial CT dashboard.</p><p>Both features extend Radar's mission of providing deeper, more granular visibility into the health and security of the Internet. Below, we dig into these new capabilities and data sets.</p>
    <div>
      <h2>Introducing regional Internet traffic insights on Radar</h2>
      <a href="#introducing-regional-internet-traffic-insights-on-radar">
        
      </a>
    </div>
    <p>Cloudflare Radar initially launched with visibility into Internet traffic trends at a national level: want to see how that Internet shutdown impacted <a href="https://radar.cloudflare.com/traffic/iq?dateStart=2025-08-28&amp;dateEnd=2025-09-03#traffic-trends"><u>traffic in Iraq</u></a>, or what <a href="https://radar.cloudflare.com/adoption-and-usage/in#ipv4-vs-ipv6"><u>IPv6 adoption looks like in India</u></a>? It’s visible on Radar. Just a year and a half later, in March 2022, <a href="https://blog.cloudflare.com/asn-on-radar/"><u>we launched Autonomous System (ASN) pages on Radar</u></a>. This has enabled us to bring more granular visibility to many of our metrics: What’s network performance like on <a href="https://radar.cloudflare.com/quality/as701"><u>AS701 (Verizon Fios)</u></a>? How thoroughly has <a href="https://radar.cloudflare.com/routing/as812#routing-statistics"><u>AS812 (Rogers Communications)</u></a> implemented routing security? Did <a href="https://radar.cloudflare.com/traffic/as58322?dateStart=2025-08-28&amp;dateEnd=2025-09-03"><u>AS58322 (Halasat)</u></a> just go offline? It’s all visible on Radar.</p><p>However, sometimes Internet usage shifts on a more local level — maybe a sporting event in a particular region drives people online to find out more information. Or maybe a storm or other natural disaster causes infrastructure damage and power outages in a given state, impacting Internet traffic.</p><p>For the last few years, the Radar team relied on internal data sets and <a href="https://jupyter.org/"><u>Jupyter</u></a> notebooks to visualize these “sub-national” traffic shifts. But today, we are bringing that insight to Cloudflare Radar, and to you, with the launch of regional traffic insights. With this new capability, you’ll be able to see traffic trends at a more local level, including bytes and requests, as well as breakouts of desktop/mobile device and bot/human traffic shares. And for even more granular visibility, within the Data Explorer, you’ll also be able to select an autonomous system to join with the regional selection — for example, <a href="https://radar.cloudflare.com/explorer?dataSet=netflows&amp;loc=6254926&amp;dt=7d&amp;asn=as7922"><u>looking at AS7922 (Comcast) in Massachusetts (United States)</u></a>.</p>
    <div>
      <h3>Geographic guidance</h3>
      <a href="#geographic-guidance">
        
      </a>
    </div>
    <p>In line with common industry practice, the region names displayed on Radar are sourced in data from GeoNames (<a href="http://geonames.org"><u>geonames.org</u></a>), a crowdsourced geographical database. Specifically, we are using the “<a href="https://www.geonames.org/export/codes.html"><u>first-order administrative divisions</u></a>” listed for each country — for example, the states of America, the departments of Honduras, or the provinces of Canada. Those geographical names reflect data provided by GeoNames; for more information, please refer to their <a href="https://www.geonames.org/about.html"><u>About</u></a> page.</p><p>Requests logged by Cloudflare’s services include the IP address of the device making the request. The address range (“prefix”) that includes this address is associated with a GeoNames ID within our IP address geolocation data, and we then match that GeoNames ID with the associated country and “first order administrative division” found in the GeoNames dataset. (For example: 155.246.1.142 → 155.246.0.0/16 → GeoNames ID 5101760 → United States &gt; New Jersey) </p>
          <figure>
          <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/4DfCm0p0xIwNdgaXd5y1UF/ce843c0714c7b490fd757dc1d0d60b6c/image9.png" />
          </figure>
    <div>
      <h3>Drilling down into Radar traffic data</h3>
      <a href="#drilling-down-into-radar-traffic-data">
        
      </a>
    </div>
    <p>Within Cloudflare Radar, there are several ways to get to this regional data. If you know the name of the region of interest, you can type it into the search bar at the top of the page, and select it from the results. For example, beginning to type <b>Massachusetts</b> returns the U.S. state, linked to its regional traffic page. Typing the region name into the <b>Traffic in</b> dropdown at the top of a <b>Traffic</b> page will also return the same set of results.</p>
          <figure>
          <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/7CX1gUqYX6VCpxhzI1YoIs/54977900f36dab7697f08813f6fd06be/image11.png" />
          </figure><p>Radar’s country-level pages now have a new <b>Traffic characteristics by region</b> card that includes both summary and time series views of regional traffic. The summary view is presented as a map and table, similar to the <b>Traffic characteristics</b> card in the Worldwide traffic view. After selecting a metric from the dropdown at the top right of the card, the table and map are updated to reflect the relevant summary values for the chosen time period. Within the paginated table, the region names are linked, and clicking one will take you to the relevant page. Within the map, the summary values are represented by circles placed in the centroid of each region, sized in relation to their value. Clicking a circle will take you to the relevant page.</p>
          <figure>
          <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/5jJwcTEjoJfMPLuah6i1DB/aece30541e70850d52369a7997bbe064/image8.png" />
          </figure><p>Below the summary map and table, the card also includes a time series graph of traffic at a regional level for the top five highest traffic regions within the country. These graphs can reveal interesting regional differences in traffic patterns. For example, the <a href="https://radar.cloudflare.com/traffic/iq?dateStart=2025-09-02&amp;dateEnd=2025-09-08#traffic-volume-by-region"><b><u>Traffic volume by region in Iraq</u></b></a> graph for HTTP request traffic shown below highlights the differing Internet shutdown schedules (<a href="https://x.com/CloudflareRadar/status/1960324662740529354"><u>Kurdistan Region</u></a>, <a href="https://x.com/CloudflareRadar/status/1960329607892066370"><u>central and southern Iraq</u></a>) across the different governorates. On days when the schedules do not overlap, such as September 2 and 7, traffic from the Erbil and Sulaymaniyah governorates, which are located in the Kurdistan Region, does not drop concurrent with the loss in traffic observed in Baghdad and Basra.</p>
          <figure>
          <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/6cW34uKtkKqMdky0RIVRia/03a961f1e39dfaad04cffe06f368bdea/image18.png" />
          </figure>
    <div>
      <h3>Mobile vs. desktop device traffic trends</h3>
      <a href="#mobile-vs-desktop-device-traffic-trends">
        
      </a>
    </div>
    <p>Over the past several years, a number of Radar blog posts have explored how human activity impacts Internet traffic, including <a href="https://blog.cloudflare.com/offline-celebrations-how-christmas-nye-and-lunar-new-year-festivities-shape-online-behavior/"><u>holiday celebrations</u></a>, <a href="https://blog.cloudflare.com/elections-2024-internet/"><u>elections</u></a>, and the <a href="https://blog.cloudflare.com/paris-2024-summer-olympics-impacted-internet-traffic/"><u>Paris 2024 Summer Olympics</u></a>. With the new regional views, this impact now becomes even clearer at a more local level. For instance, mobile devices account for, on average, just over half of the request traffic seen from <a href="https://radar.cloudflare.com/traffic/184742?dateStart=2025-08-22&amp;dateEnd=2025-09-04#mobile-vs-desktop"><u>Nairobi Country in Kenya</u></a>. A clear diurnal pattern is seen on weekdays, where mobile device usage drops during workday hours, and then rises again in the evening. However, during the weekends, mobile traffic remains elevated, presumably due to fewer people using desktop computers in office environments, as well as fewer desktop computers in use at home, in line with Kenya’s <a href="https://www.ca.go.ke/mobile-data-and-digital-services-rise-ca-report-shows"><u>mobile-first</u></a> culture.</p>
          <figure>
          <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/5QgT4OGpdgvXiQJX8GbzEP/62947e34d96bdf85a863f3396f95b094/image17.png" />
          </figure>
    <div>
      <h3>Bot vs human traffic trends</h3>
      <a href="#bot-vs-human-traffic-trends">
        
      </a>
    </div>
    <p>Similar to how the mobile vs. desktop view exposes shifts in human activity, bot vs. human traffic insights do as well. One interpretation of the graph below is that <a href="https://radar.cloudflare.com/traffic/2267056?dateStart=2025-08-29&amp;dateEnd=2025-09-04#bot-vs-human"><u>overnight bot activity from Lisbon</u></a> increased significantly during the first few days of September. However, since the graph shows traffic shares, and given the timing of the apparent increases, the more likely cause is increasingly larger drops in human-driven traffic – users in Lisbon appear to begin logging off around 23:00 UTC (midnight local time), and start getting back online around 05:00 UTC (06:00 local time). The shares and shifts will obviously vary by country and region, but they can provide a perspective on the nocturnal habits of users in a region.</p>
          <figure>
          <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/36GundkM2BKTWvCq7T7On2/a5028340a0e8b3a55f85df8116a6a7fe/image16.png" />
          </figure>
    <div>
      <h3>Customize regional analysis with Radar’s Data Explorer</h3>
      <a href="#customize-regional-analysis-with-radars-data-explorer">
        
      </a>
    </div>
    <p>Within the Data Explorer, you can use the breakdown options and filters to customize your analysis of regional traffic data.</p><p>At a country level, choosing to breakdown by regions generates a stacked area graph that shows the relative traffic shares of the top 20 regions in the selected country, along with a bar graph showing summary share values. For example, the <a href="https://radar.cloudflare.com/explorer?dataSet=http&amp;loc=US&amp;dt=7d&amp;groupBy=adm1"><u>graph below</u></a> shows that in aggregate, Virginia and California are responsible for just over a quarter of the HTTP request volume in the United States.</p>
          <figure>
          <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/2AVUcmEpxse9cAKx16qH07/5ad9be3e7bcaef3dedeb33ef90f95184/image27.png" />
          </figure>
          <figure>
          <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/2vJKLjUpKGupoPB6kkmavv/5a988c99fd99324060cbdf97054f7f28/image3.png" />
          </figure><p>You can also use Data Explorer to drill down on traffic at a network (ASN) level in a given region, in both summary and timeseries views. For example, <a href="https://radar.cloudflare.com/explorer?dataSet=http&amp;loc=6254926&amp;dt=7d&amp;groupBy=ases"><u>looking at HTTP request traffic for Massachusetts by ASN</u></a>, we can see that <a href="https://radar.cloudflare.com/as7922"><u>AS7922</u></a> (Comcast), accounts for a third, followed by <a href="https://radar.cloudflare.com/as701"><u>AS701</u></a> (Verizon Fios, 15%), <a href="https://radar.cloudflare.com/as21928"><u>AS21928</u></a> (T-Mobile, 8.8%), <a href="https://radar.cloudflare.com/as6167"><u>AS6167</u></a> (Verizon Wireless, 5.1%), <a href="https://radar.cloudflare.com/as7018"><u>AS7018</u></a> (AT&amp;T, 4.7%), and <a href="https://radar.cloudflare.com/as20115"><u>AS20115</u></a> (Charter/Spectrum, 4.5%). Over 70% of the request traffic is concentrated in these six providers, with nearly half of that from one provider.</p>
          <figure>
          <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/4qdfiHtKJ32IDX1loKqCvK/238d47750ab4aa13ae1c80b1b2f16e27/image2.png" />
          </figure>
          <figure>
          <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/7qsEetiInP5TwYEBoQvWum/0c4a9d01417e67633de5f69d5c98f53f/image19.png" />
          </figure><p>Going a level deeper, you can also look at traffic trends over time for an <a href="https://www.cloudflare.com/learning/network-layer/what-is-an-autonomous-system/"><u>ASN</u></a> within a given region, and even compare it with another time period. The <a href="https://radar.cloudflare.com/explorer?dataSet=http&amp;loc=6254926&amp;dt=7d&amp;asn=as7922&amp;timeCompare=1"><u>graph below</u></a> shows traffic for AS7922 (Comcast) in Massachusetts over a seven-day period, compared with the prior week. While the traffic volumes on most days were largely in line with the previous week, Saturday and Sunday were noticeably higher. These differences may reflect a shift in human activity, as September 6 &amp; 7 were quite rainy in Massachusetts, so people may have spent more time indoors and online. (The prior weekend was Labor Day weekend, but those Saturday and Sunday traffic levels were in line with the preceding weekend.) You can also add another ASN to the traffic trends comparison. <a href="https://radar.cloudflare.com/explorer?dataSet=http&amp;loc=6254926&amp;dt=2025-09-04_2025-09-10&amp;timeCompare=1&amp;compAsn=as701&amp;asn=as7922&amp;compareWith=6254926"><u>Selecting Massachusetts (</u><b><u>Location</u></b><u>) and AS701 (</u><b><u>ASN)</u></b><u> (Verizon Fios)</u></a> in the <b>Compare</b> section finds that traffic on that network was higher on Saturday and Sunday as well, lending credence to the rainy weekend theory.</p>
          <figure>
          <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/7yB2jNi8gqRkS4IaaqwH8c/17f74f7e9f84b0cbe2200651f32053cb/image5.png" />
          </figure>
          <figure>
          <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/4u2EsKhCmm9QS6B7iYEXu2/7f2b626f30fc29489bf551c5c7be4623/image4.png" />
          </figure><p>Regional comparisons, whether within the same country or across different countries, are also possible in Data Explorer. For instance, if the Kansas City Chiefs and Philadelphia Eagles were to meet yet again in the Super Bowl, the configuration below could be used to <a href="https://radar.cloudflare.com/explorer?dataSet=http&amp;loc=4398678&amp;dt=1d&amp;timeCompare=1&amp;compareWith=6254927"><u>compare traffic patterns in the teams’ respective home states</u></a>, as well as comparing the trends with the previous week, showing how human activity impacted it over the course of the game.</p>
          <figure>
          <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/15OLkOMtK5I1YlK9uredOz/3f71d3e25a3f2f4065e9b9ac8896409a/image26.png" />
          </figure><p>As always, the data powering the visualizations described above are also available through the Radar API. The <code>timeseries_groups</code> and <code>summary</code> methods for the <a href="https://developers.cloudflare.com/api/resources/radar/subresources/netflows/"><u>NetFlows</u></a> and <a href="https://developers.cloudflare.com/api/resources/radar/subresources/http/"><u>HTTP</u></a> endpoints now have an <code>ADM1</code> dimension, allowing traffic to be broken down by first-order administrative divisions. In addition, the new <code>geoId</code> filter for the NetFlows and HTTP endpoints allows you to filter the results by a specific geolocation, using its GeoNames ID. And finally, there are new <a href="https://developers.cloudflare.com/api/resources/radar/subresources/geolocations/methods/get/"><code><u>get</u></code></a> and <a href="https://developers.cloudflare.com/api/resources/radar/subresources/geolocations/methods/list/"><code><u>list</u></code></a> endpoints for fetching geolocation details.</p>
    <div>
      <h3>A note regarding data quantity and quality</h3>
      <a href="#a-note-regarding-data-quantity-and-quality">
        
      </a>
    </div>
    <p>As you’d expect, the more traffic we see from a given geography, the better the “signal”, and the clearer the associated graph is — this is generally the case when traffic is aggregated at a country level. However, for some smaller or less populous regions, especially in developing countries or countries with poor Internet connectivity, lower traffic will likely cause the signal to be weaker, resulting in graphs that appear spiky or incomplete. (Note that this will also be true for region+ASN views.) An illustrative example is shown below, for <a href="https://radar.cloudflare.com/explorer?dataSet=http&amp;loc=408666&amp;dt=2025-08-29_2025-09-04&amp;timeCompare=1#result"><u>Northern Darfur State in Sudan</u></a>. Traffic is observed somewhat inconsistently, resulting in the spikes seen in the graph. Similarly, the “Previous 7 days” line is largely incomplete, indicating a lack of traffic data for that period. In these cases, it will be hard to draw definitive conclusions from such graphs.</p>
          <figure>
          <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/76nx7WvxtkJZUQcwjQ1zT8/fb8f119576eff87219d2e6f2867225dc/image23.png" />
          </figure><p>Although the Internet arguably transcends geographical boundaries, the reality is that usage patterns can vary by location, with traffic trends that reflect more localized human activity. The new regional insights on Cloudflare Radar traffic pages, and in the Data Explorer, provide a perspective at a sub-national level. We are exploring the potential to go a level deeper in the future, providing traffic data for “second-order administrative divisions” (such as counties, cities, etc.).</p><p>If you share our regional traffic graphs on social media, be sure to tag us: <a href="https://x.com/CloudflareRadar"><u>@CloudflareRadar</u></a> (X), <a href="https://noc.social/@cloudflareradar"><u>noc.social/@cloudflareradar</u></a> (Mastodon), and <a href="https://bsky.app/profile/radar.cloudflare.com"><u>radar.cloudflare.com</u></a> (Bluesky). If you have questions or comments, you can reach out to us on social media, or contact us via <a><u>email</u></a>.</p>
    <div>
      <h2>Introducing Certificate Transparency insights on Radar</h2>
      <a href="#introducing-certificate-transparency-insights-on-radar">
        
      </a>
    </div>
    <p>Just as we're bringing more granular detail to traffic patterns, we're also shedding more light on the very foundation of trust on the Internet: TLS certificates. <a href="https://en.wikipedia.org/wiki/Certificate_authority"><u>Certificate Authorities (CAs)</u></a> serve as trusted gatekeepers for the Internet: any website that wants to prove its identity to clients must present a certificate issued by a CA that the client trusts. But how do we know that CAs themselves are trustworthy and only issue certificates they are authorized to issue?</p><p>That’s where <a href="https://blog.cloudflare.com/azul-certificate-transparency-log/#what-is-certificate-transparency"><u>Certificate Transparency (CT)</u></a> comes in. Clients that enforce CT (most major browsers) will only trust a website certificate if it is both signed by a trusted CA <i>and</i> has proof that the certificate has been added to a public, append-only CT log, so that it can be publicly audited. Only recently, CT played a key role in detecting the <a href="https://blog.cloudflare.com/unauthorized-issuance-of-certificates-for-1-1-1-1/"><u>unauthorized issuance of certificates for 1.1.1.1</u></a>, a <a href="https://one.one.one.one/"><u>public DNS resolver service</u></a> that Cloudflare operates.</p><p>In addition to its role as a vital safety mechanism for the Internet, CT has proven to be invaluable in other ways, as it provides publicly-accessible lists of <i>all website certificates used on the Internet</i>. This dataset is a treasure trove of intelligence for researchers measuring the Internet, security teams detecting malicious activity like phishing campaigns, or penetration testers mapping a target’s external attack surface.</p><p>The sheer amount of data (multiple terabytes) available in CT makes it difficult for regular Internet users to download and explore themselves. Instead, services like <a href="https://crt.sh"><u>crt.sh</u></a>, <a href="https://www.censys.com/"><u>Censys</u></a>, and <a href="https://www.merklemap.com/"><u>Merklemap</u></a> provide easy search interfaces to allow discoverability for specific domain names and certificates. We <a href="https://blog.cloudflare.com/a-tour-through-merkle-town-cloudflares-ct-ecosystem-dashboard/"><u>launched</u></a> <a href="https://ct.cloudflare.com/"><u>Merkle Town</u></a> in 2018 to share broad insights into the CT ecosystem using data from our own CT monitoring service.</p><p><a href="https://radar.cloudflare.com/certificate-transparency"><u>Certificate Transparency on Cloudflare Radar</u></a> is the next evolution of Merkle Town, providing integration with security and domain information already on Radar and more interactive ways to explore and analyze CT data. (For long-time Merkle Town users, we’re keeping it around until we’ve reached full feature parity.)</p><p>In the sections below, we’ll walk you through the features available in the new dashboard.</p>
    <div>
      <h3>Certificate volume and characteristics</h3>
      <a href="#certificate-volume-and-characteristics">
        
      </a>
    </div>
    <p>The <a href="https://radar.cloudflare.com/certificate-transparency"><u>CT page</u></a> leads with a view of how many certificates are being issued and logged over time. Because the same certificate can appear multiple times within a single log or be submitted to several logs, the total count can be inflated. To address this, two distinct lines are shown: one for total entries and another for unique entries. Uniqueness, however, is calculated only within the selected time range — for example, if certificate C is added to log A in one period and to log B in another, it will appear in the unique count for both periods. It is also important to note that the CT charts and date filters use the log timestamp, which is the time a certificate was added to a CT log. Additionally, the data displayed on the page was collected from the logs monitored by Cloudflare — delays, backlogs, or other inconsistencies may exist, so <a href="https://radar.cloudflare.com/about"><u>please report</u></a> any issues or discrepancies.</p><p>Alongside this chart is a comparison between <a href="https://radar.cloudflare.com/certificate-transparency#entry-type"><u>certificates and pre-certificates</u></a>. A <a href="https://datatracker.ietf.org/doc/html/rfc6962#section-3.1"><u>pre-certificate</u></a> is a special type of certificate used in CT that allows a CA to publicly log a certificate before it is officially issued. CAs are not required to log full certificates if corresponding pre-certificates have already been logged (although many CAs do anyway), so typically there are more pre-certificates logged than full certificates, as seen in the chart.</p>
          <figure>
          <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/3QslYrX5Ao6PI6QVXECXeW/a640c1f7959ed1bff834acdcf375fb34/image10.png" />
          </figure><p>While certificate issuance trends are interesting on their own, analyzing the <a href="https://radar.cloudflare.com/certificate-transparency?dateRange=7d#certificate-characteristics"><u>characteristics</u></a> of issued certificates provides deeper insight into the state of the web’s trust infrastructure. Starting with the <a href="https://radar.cloudflare.com/certificate-transparency?dateRange=7d#public-key-algorithm"><u>public key algorithm</u></a>, which defines how secure connections are established between clients and servers, we found that more than 65% of certificates still use <a href="https://en.wikipedia.org/wiki/RSA_cryptosystem"><u>RSA</u></a>, while the remainder use <a href="https://en.wikipedia.org/wiki/Elliptic_Curve_Digital_Signature_Algorithm"><u>ECDSA</u></a>. RSA remains dominant due to its long-standing compatibility with a wide range of clients, while ECDSA is increasingly adopted for its efficiency and smaller key sizes, which can improve performance and reduce computational overhead. In the coming years, we expect <a href="https://blog.cloudflare.com/another-look-at-pq-signatures/"><u>post-quantum signature algorithms</u></a> like ML-DSA to appear when public CAs begin to offer support.</p><p>Next, a breakdown of certificates by <a href="https://radar.cloudflare.com/certificate-transparency?dateRange=7d#signature-algorithm"><u>signature algorithm</u></a> reveals how Certificate Authorities (CAs) sign the certificates they issue. Most certificates (over 65%) use RSA with SHA-256, followed by ECDSA with SHA-384 at 19%, ECDSA with SHA-256 at 12%, and a small fraction using other algorithms. The choice of signature algorithm reflects a balance between widespread support, security, and performance, with stronger algorithms like ECDSA gradually gaining traction for modern deployments.</p><p>Certificates are also categorized by <a href="https://radar.cloudflare.com/certificate-transparency?dateRange=7d#validation-level"><u>validation level</u></a>, which reflects the degree to which the CA has verified the identity of the certificate requester. The <a href="https://www.cloudflare.com/learning/ssl/types-of-ssl-certificates/"><u>main validation types</u></a> are Domain Validation (DV), Organization Validation (OV), and Extended Validation (EV). DV certificates verify only control of the domain, OV certificates verify both domain control and the organization behind it, and EV certificates involve more rigorous checks and display additional identity information in browsers. The industry trend is toward simpler, automated issuance, with DV certificates now making up almost 98% of issued certificates, while EV issuance has become largely obsolete.</p>
          <figure>
          <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/77Vz97OhHE5Aoz9qBKDk88/36f419262376870592198f0348d77106/image22.png" />
          </figure><p>Finally, the chart on <a href="https://radar.cloudflare.com/certificate-transparency?dateRange=7d#certificate-duration"><u>certificate duration</u></a> shows the difference between the NotBefore and NotAfter dates embedded in each certificate, which define the period during which the certificate is valid. Currently, the majority (92%) of issued certificates have durations between 47 and 100 days. Shorter certificate lifetimes improve security by limiting exposure if a certificate is compromised, and the industry is <a href="https://cabforum.org/working-groups/server/baseline-requirements/requirements/#632-certificate-operational-periods-and-key-pair-usage-periods"><u>moving toward even shorter durations</u></a>, driven by browser policies and automated renewal systems.</p>
          <figure>
          <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/2i4oiEIAarzTDIG4x7dT9o/fe00dd0ce8770c05dbf7689367e2d957/image15.png" />
          </figure>
    <div>
      <h3>Certificate issuance</h3>
      <a href="#certificate-issuance">
        
      </a>
    </div>
    <p><a href="https://radar.cloudflare.com/certificate-transparency#certificate-issuance"><u>Certificate issuance</u></a> is the process by which CAs generate certificates for domain owners. Many CAs are operated by larger organizations that manage multiple subordinate CAs under a single corporate umbrella. The CT page highlights the distribution of certificate issuance across the <a href="https://radar.cloudflare.com/certificate-transparency#certificate-authority-owners"><u>top CA owners</u></a>. At the moment, the Internet Security Research Group (ISRG), also known as <a href="https://letsencrypt.org/"><u>Let’s Encrypt</u></a>, issues more than 66% of all certificates, followed by other widely used CA owners including Google Trust Services, Sectigo, and GoDaddy.</p>
          <figure>
          <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/1wmj8AYvZIfjpzVehR72t4/73eec7d37fae4793e2303cc7ccb51944/image6.png" />
          </figure><p>The impact of events like the <a href="https://letsencrypt.status.io/pages/incident/55957a99e800baa4470002da/687e8d62b8a4e804fad85799"><u>July 21-22 Let’s Encrypt API outage</u></a> due to internal DNS failures that significantly reduced certificate issuance rates are visible in this visualization, as issuance rates dropped significantly during the two-day period.</p>
          <figure>
          <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/3vUk1k5aiZghiNg6jYS0HD/497a81ff097861dc1617ac9122c675ad/image12.png" />
          </figure><p>In addition to CA owners, the page provides a breakdown of certificate issuance by <a href="https://radar.cloudflare.com/certificate-transparency#certificate-authorities"><u>individual CA certificates</u></a>. Among the top five CAs, Let’s Encrypt’s four intermediate CAs — R12, R13, E7, and E8 — represent the bulk of its issuance. The bar chart can also be filtered by CA owner to display only the certificates associated with a specified organization.</p>
          <figure>
          <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/6L8Q56bPtAt593qWT7qOh3/dbf4a1a2165a7ea867c4e0d2b9184469/image13.png" />
          </figure><p>The CT section also offers dedicated CA-specific pages. By searching for a CA name or fingerprint in the top search bar, you can reach a page showing all insights and trends available on the main CT page, filtered by the selected CA. The page also includes an additional CA information card, which provides details such as the CA’s owner, revocation status, parent certificate, validity period, country, inclusion in public root stores, and a list of all CAs operated by the same owner. All of this information is derived from the <a href="https://www.ccadb.org/"><u>Common CA Database (CCADB)</u></a>.</p>
          <figure>
          <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/2UgeS0wen7kY2tqYIdMyEW/e43096ad73311ed66135e753ed4933de/image24.png" />
          </figure>
    <div>
      <h3>Certificate Transparency logs</h3>
      <a href="#certificate-transparency-logs">
        
      </a>
    </div>
    <p>Next on the CT page is a section focused on <a href="https://radar.cloudflare.com/certificate-transparency?dateRange=12w#certificate-transparency-logs"><u>CT logs</u></a>. This section shows the distribution of certificates across <a href="https://radar.cloudflare.com/certificate-transparency?dateRange=12w#ct-log-operators"><u>CT log operators</u></a>, identifying the organizations that manage the infrastructure behind the logs. Over the last three months, Sectigo operated the logs containing the largest number of certificates (2.8 billion), followed by Google (2.5 billion), Cloudflare (1.6 billion), and Let’s Encrypt (1.4 billion). Note that the same certificate can be logged multiple times across CT logs, so organizations that operate multiple CT logs with overlapping acceptance criteria may log certificates at an elevated rate. As such, the relative rank of the operators in this graph should not be construed as a measure of how load-bearing the logs are within the ecosystem.</p>
          <figure>
          <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/3XcKb0WNUsDvTWO3PEFcRz/78d6199e415c5ac5f587dfe348de0c10/image21.png" />
          </figure><p>Below this, a bar chart displays the distribution of certificates across <a href="https://radar.cloudflare.com/certificate-transparency?dateRange=12w#ct-log-usage"><u>individual CT logs</u></a>. Among the top five logs are Google’s <a href="https://radar.cloudflare.com/certificate-transparency/log/xenon2025h2"><u>xenon2025h1</u></a> and <a href="https://radar.cloudflare.com/certificate-transparency/log/argon2025h2"><u>argon2025h2</u></a>, Cloudflare’s <a href="https://radar.cloudflare.com/certificate-transparency/log/nimbus2025"><u>nimbus2025</u></a>, and Let’s Encrypt’s <a href="https://radar.cloudflare.com/certificate-transparency/log/oak2025h2"><u>oak2025h2</u></a>. This chart can also be filtered by operator to show only the logs associated with a specific owner. Next to the chart, another view shows the distribution of certificates by <a href="https://radar.cloudflare.com/certificate-transparency?dateRange=12w#ct-log-api"><u>log API</u></a>, distinguishing between logs following the original <a href="https://datatracker.ietf.org/doc/html/rfc6962"><u>RFC 6962</u></a> API versus those compatible with the newer and more efficient <a href="https://c2sp.org/static-ct-api"><u>static CT API</u></a>.</p>
          <figure>
          <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/582GIIREPmMXZULgwPPo4g/46db84cbd3cae894eb61f5014a0a942f/image14.png" />
          </figure><p>Similar to the dedicated CA pages, the CT section also provides log-specific pages. By searching for a log name in the top search bar, you can access a page showing all insights and trends available on the main CT page, filtered by the selected log. Two additional cards are included: one showing information about the log, derived from <a href="https://googlechrome.github.io/CertificateTransparency/log_lists.html"><u>Google Chrome’s log list</u></a>, including details such as the operator, API type, documentation, and a list of other logs operated by the same organization; and another displaying performance metrics with two <a href="https://en.wikipedia.org/wiki/Radar_chart"><u>radar charts</u></a> tracking uptime and response time over the past 90 days, as observed by Cloudflare’s CT monitor. These metrics are useful to determine if logs are meeting the ongoing requirements for inclusion in CT programs like <a href="https://googlechrome.github.io/CertificateTransparency/log_policy.html#ongoing-requirements-of-included-logs"><u>Google's</u></a>.</p>
          <figure>
          <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/5I7hFPCrkslctFyAc7OqIQ/d63881a27edd892900eb82841f63176e/image1.png" />
          </figure>
    <div>
      <h3>Certificate coverage</h3>
      <a href="#certificate-coverage">
        
      </a>
    </div>
    <p>Last but not least, the CT page includes a section on <a href="https://radar.cloudflare.com/certificate-transparency?dateRange=12w#certificate-coverage"><u>certificate coverage</u></a>. Certificates can cover multiple top-level domains (TLDs), include wildcard entries, and support IP addresses in <a href="https://developers.cloudflare.com/ssl/origin-configuration/origin-ca/#hostname-and-wildcard-coverage"><u>Subject Alternative Names (SANs)</u></a>.</p><p>The <a href="https://radar.cloudflare.com/certificate-transparency?dateRange=12w#certificate-tld-distribution"><u>distribution of pre-certificates across the top 10 TLDs</u></a> highlights the domains most commonly covered. <code>.com</code> leads with 45% of certificates, followed by other popular TLDs such as <code>.dev</code> and <code>.net</code>.</p><p>Next to this view, two half-donut charts provide further insights into certificate coverage: one shows the share of certificates that <a href="https://radar.cloudflare.com/certificate-transparency?dateRange=12w#wildcard-usage"><u>include wildcard entries</u></a> — almost 25% of certificates use wildcards to cover multiple subdomains — while the other shows certificates that <a href="https://radar.cloudflare.com/certificate-transparency?dateRange=12w#ip-address-inclusion"><u>include IP addresses</u></a>, revealing that the vast majority of certificates do not contain IPs in their SAN fields</p>
          <figure>
          <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/6wRxEpgJ1Of8Rw1O9LoQvE/badaa97eaa2017b07d617e06651e7283/image7.png" />
          </figure>
    <div>
      <h3>Expanded domain certificate data </h3>
      <a href="#expanded-domain-certificate-data">
        
      </a>
    </div>
    <p>The <a href="https://radar.cloudflare.com/domains/domain"><u>domain information</u></a> page has also been updated to provide richer details about certificates. The certificates table, which displays certificates recorded in active CT logs for the specified domain, now includes expandable rows. Expanding a row reveals further information, including the certificate’s SHA-256 fingerprint, subject and issuer details — Common Name (CN), Organization (O), and Country (C) — the validity period (<code>NotBefore</code> and <code>NotAfter</code>), and the CT log where the certificate was found.</p>
          <figure>
          <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/nqIVexwwCgY0WE0X8JAJk/6df280953ab4fdcce3bd34f476915242/image20.png" />
          </figure><p>While the charts above highlight key insights in the CT ecosystem, all underlying data is accessible via the <a href="https://developers.cloudflare.com/api/resources/radar/subresources/ct/"><u>API</u></a> and can be explored interactively across time periods, CAs, logs, and additional filters and dimensions using <a href="https://radar.cloudflare.com/explorer?dataSet=ct"><u>Radar’s Data Explorer</u></a>. And as always, Radar charts and graphs can be downloaded for sharing or embedded directly into blogs, websites, and dashboards for further analysis. Don’t hesitate to <a href="https://radar.cloudflare.com/about"><u>reach out to us</u></a> with feedback, suggestions, and feature requests — we’re already working through a list of early feedback from the CT community!</p><div>
  
</div><p></p> ]]></content:encoded>
            <category><![CDATA[Birthday Week]]></category>
            <category><![CDATA[Radar]]></category>
            <category><![CDATA[Internet Traffic]]></category>
            <category><![CDATA[Mobile]]></category>
            <category><![CDATA[Certificate Transparency]]></category>
            <guid isPermaLink="false">6Ye6iffpYFZnLxuwqVQDL</guid>
            <dc:creator>David Belson</dc:creator>
            <dc:creator>André Jesus</dc:creator>
            <dc:creator>Luke Valenta</dc:creator>
        </item>
        <item>
            <title><![CDATA[You don’t need quantum hardware for post-quantum security]]></title>
            <link>https://blog.cloudflare.com/you-dont-need-quantum-hardware/</link>
            <pubDate>Fri, 19 Sep 2025 13:44:40 GMT</pubDate>
            <description><![CDATA[ Post-quantum cryptography protects against quantum threats using today’s hardware. Quantum tech like QKD may sound appealing, but it isn’t necessary or sufficient to secure organizations. ]]></description>
            <content:encoded><![CDATA[ <p>Organizations have finite resources available to combat threats, both by the adversaries of today and those in the not-so-distant future that are armed with quantum computers. In this post, we provide guidance on what to prioritize to best prepare for the future, when quantum computers become powerful enough to break the conventional cryptography that underpins the security of modern computing systems.  We describe how <a href="https://www.cloudflare.com/learning/ssl/quantum/what-is-post-quantum-cryptography/"><u>post-quantum cryptography (PQC)</u></a> can be deployed <b>on your existing hardware</b> to protect from threats posed by <a href="https://www.cloudflare.com/learning/ssl/quantum/what-is-quantum-computing/"><u>quantum computing</u></a>, and explain why quantum key distribution (QKD) and quantum random number generation (QRNG) are neither necessary nor sufficient for security in the quantum age.</p>
    <div>
      <h2>Are you quantum ready?</h2>
      <a href="#are-you-quantum-ready">
        
      </a>
    </div>
    <p>“Quantum” is becoming one of the most heavily used buzzwords in the tech industry. What does it actually mean, and why should you care?</p><p>At its core, “quantum” refers to technologies that harness principles of quantum mechanics to perform tasks that are not feasible with classical computers. Quantum computers have exciting potential to unlock advancements in <a href="https://pubs.aip.org/aip/jap/article/133/22/221102/2896017/Quantum-computing-and-materials-science-A"><u>materials science</u></a> and <a href="https://www.weforum.org/stories/2025/01/quantum-computing-drug-development/"><u>medicine</u></a>, but also pose a <a href="https://blog.cloudflare.com/the-quantum-menace/"><u>threat</u></a> to computer security systems. The term <i>Q-day</i> refers to the day that adversaries possess quantum computers that are large and stable enough to break the conventional <a href="https://www.cloudflare.com/learning/ssl/how-does-public-key-encryption-work/"><u>public-key cryptography</u></a> that secures much of today’s data and communications. Recent <a href="https://sam-jaques.appspot.com/quantum_landscape"><u>advances in quantum computing</u></a> have made it clear that it is no longer a question of <i>if </i>Q-day will arrive, but <i>when</i>.</p><p>What does it mean, then, for your organization to be <a href="https://www.cloudflare.com/the-net/top-of-mind-technology/post-quantum-security/"><u>quantum ready</u></a>? At Cloudflare, our definition is simple: <i>your systems and communications should be secure even after Q-day</i>. </p><p>However, this definition often gets muddied by vendors insisting that products <i>built using quantum technology</i> are required in order to <i>secure </i>an organization <i>against quantum adversaries</i>. In this blog post we explain why quantum technologies are neither necessary nor sufficient to <a href="https://www.cloudflare.com/the-net/security-signals/post-quantum-era/"><u>protect against attacks by a quantum adversary</u></a>.</p><p>The good news is that there is already a solution: <a href="https://www.cloudflare.com/learning/ssl/quantum/what-is-post-quantum-cryptography/"><u>post-quantum cryptography (PQC)</u></a>. PQC protects against attacks by quantum adversaries, but PQC is not a quantum technology — it runs on conventional computers without specialized hardware. You can use PQC today on the computers you already have, without buying expensive new hardware.</p>
    <div>
      <h2>Post-quantum cryptography</h2>
      <a href="#post-quantum-cryptography">
        
      </a>
    </div>
    <p>We’ve written <a href="https://blog.cloudflare.com/tag/post-quantum/"><u>quite a few blog posts</u></a> on post-quantum cryptography already, so we will keep this section brief.</p><p>The <a href="https://en.wikipedia.org/wiki/Public-key_cryptography"><u>public-key cryptography</u></a> that we’ve used for decades to secure our data and communications is based on math problems (like <a href="https://en.wikipedia.org/wiki/RSA_cryptosystem"><u>factoring large numbers</u></a>) that are believed to be <a href="https://en.wikipedia.org/wiki/Computational_hardness_assumption"><u>computationally hard</u></a> to solve on conventional computers. If you can efficiently solve the underlying math problem, you can efficiently break the cryptography and the systems that depend on it. As it turns out, the math problems underlying much of today’s public-key cryptography can be efficiently solved by specialized algorithms, like <a href="https://en.wikipedia.org/wiki/Shor%27s_algorithm"><u>Shor’s algorithm</u></a>, on large-scale quantum computers. </p><p>The solution? Pick new hard math problems (like finding <a href="https://blog.cloudflare.com/lattice-crypto-primer/"><u>“short” vectors in algebraic lattices</u></a>) that are no easier to solve with a quantum computer than with a conventional computer. Then, build new cryptographic systems around them. The <a href="https://www.nist.gov/"><u>US National Institute of Standards and Technologies (NIST)</u></a> launched an <a href="https://csrc.nist.gov/projects/post-quantum-cryptography/post-quantum-cryptography-standardization"><u>international competition</u></a> in 2016 to identify and standardize such cryptographic systems, which resulted in several new standards for post-quantum cryptography being published in 2024, and <a href="https://blog.cloudflare.com/another-look-at-pq-signatures/"><u>several more under consideration</u></a> for future standardization.</p><p>Post-quantum cryptography (PQC) runs on your existing phones, laptops, and servers. PQC runs at <a href="https://radar.cloudflare.com/adoption-and-usage#post-quantum-encryption-adoption"><u>Internet scale</u></a> and can even be <a href="https://blog.cloudflare.com/pq-2024/#ml-kem-versus-x25519"><u>more performant</u></a> than classical cryptography. Except in rare cases, like when you need additional hardware acceleration in cheap smartcards or to replace legacy systems that lack <a href="https://en.wikipedia.org/wiki/Cryptographic_agility"><u>cryptographic agility</u></a>, there is <b>no need to purchase new hardware to migrate to PQC</b>.</p><p><b>If you want to know how to protect your organization from security threats posed by quantum computers, you can stop reading now. Post-quantum cryptography is the solution. </b></p>
          <figure>
          <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/6V5tcIzTpANpLJ0lQFUKKJ/50c58a5536a25b39985b6fc5f17ed432/image_-_2025-09-19T142023.308.png" />
          </figure><p>Alternatively, you can read below for our perspective on hardware-based quantum security technologies that are sometimes marketed as security solutions.</p>
    <div>
      <h2>Quantum security technologies</h2>
      <a href="#quantum-security-technologies">
        
      </a>
    </div>
    <p>Quantum technologies capture the imagination. <a href="https://en.wikipedia.org/wiki/Quantum_computing"><u>Quantum computers</u></a> (possibly linked together in a <a href="https://en.wikipedia.org/wiki/Quantum_network"><u>quantum Internet</u></a>) promise to deliver breakthroughs in <a href="https://www.weforum.org/stories/2025/01/quantum-computing-drug-development/"><u>drug discovery</u></a> and <a href="https://pubs.aip.org/aip/jap/article/133/22/221102/2896017/Quantum-computing-and-materials-science-A"><u>materials science</u></a> via advanced molecular simulation. Measurement of physical <a href="https://en.wikipedia.org/wiki/Hardware_random_number_generator"><u>quantum processes</u></a> can be used to generate <a href="https://en.wikipedia.org/wiki/Entropy"><u>entropy</u></a> with mathematically <a href="https://www.nature.com/articles/s41467-022-35556-z"><u>provable properties</u></a>.</p><p>This is exciting technology and fundamental scientific research. But this technology is <b>not</b> required to secure data and communications against quantum attackers.</p><p>In this section, we’ll explain why quantum security technologies do not need to be part of your quantum readiness strategy, and <b>any decision to invest in quantum technology should not be based on a desire to defend data and communications systems against the threat of quantum adversaries. </b>Instead, investments should be based on a desire to improve quantum technologies in their own right, for example to help with applications like <a href="https://pubs.acs.org/doi/10.1021/acs.chemrev.4c00678"><u>chemistry</u></a>, <a href="https://www.cloudflare.com/learning/ai/what-is-machine-learning/"><u>machine learning</u></a>, and <a href="https://pmc.ncbi.nlm.nih.gov/articles/PMC11257328/"><u>financial modeling</u></a>.</p><p>Our position here is largely in agreement with the strategies towards quantum security technologies of the <a href="https://www.nsa.gov/Cybersecurity/Post-Quantum-Cybersecurity-Resources/"><u>US National Security Agency (NSA)</u></a>, <a href="https://www.ncsc.gov.uk/whitepaper/quantum-networking-technologies"><u>UK National Cyber Security Centre (NCSC)</u></a>, <a href="https://english.ncsc.nl/binaries/ncsc-en/documenten/publications/2024/march/25/quantum-secure/Make+your+organization+quantum+secure.pdf"><u>NL Nationaal Cyber Security Centrum (NCSC)</u></a>, and <a href="https://www.bsi.bund.de/EN/Themen/Unternehmen-und-Organisationen/Informationen-und-Empfehlungen/Quantentechnologien-und-Post-Quanten-Kryptografie/quantentechnologien-und-post-quanten-kryptografie_node.html"><u>DE Federal Office for Information Security (BSI)</u></a>. We’ll focus on two quantum technologies widely marketed as security products: quantum key distribution (QKD) and quantum random number generation (QRNG).</p>
    <div>
      <h3>Quantum key distribution</h3>
      <a href="#quantum-key-distribution">
        
      </a>
    </div>
    <p>Quantum key distribution (QKD) is a hardware-based solution to secure communications across point-to-point links. Rather than relying on hard mathematical problems, QKD relies on principles of quantum physics to establish a shared symmetric secret between two parties, while ensuring that eavesdropping can be detected. QKD provides security guarantees that are based on physical properties of the communication channel. Once a shared secret is established, parties can switch to traditional symmetric-key cryptography for secure communication. QKD is the first step towards a futuristic “quantum Internet.” However, there are some fundamental reasons why QKD cannot be a general replacement for classical cryptography running on conventional hardware.</p><p>Most importantly, <i>QKD does not operate at Internet scale</i>. QKD is used to establish an unauthenticated secret between pairs of parties with a direct physical link between them. The parties can then use an authentication mechanism based on conventional cryptography to bootstrap a secure communication channel over that link. While building dedicated physical links may be feasible for cross-datacenter communication or across major Internet backbones, it is not possible for most pairs of parties on the Internet. In particular, deploying QKD for the “last-mile” connection to end-user devices would require that each device has a direct physical connection to every server or device it needs to securely communicate with.</p><p>Connectivity aside, there's a good reason why the Internet doesn't rely on secure point-to-point links: they do not scale (or rather, they scale exponentially). Bringing a new device online would require a change to <i>every other device</i> it needs to communicate with, a massive operational burden on everyone. Fortunately, there’s a better way. The <a href="https://www.cloudflare.com/learning/ddos/glossary/open-systems-interconnection-model-osi/"><u>OSI model</u></a> for networking provides an abstraction such that two parties can communicate even if they don’t share a direct physical link, so long as some chain of physical links exists between them. Public-key cryptography, invented in the seminal “<a href="https://www-ee.stanford.edu/~hellman/publications/24.pdf"><u>New Directions in Cryptography</u></a>” paper in 1976, allows two parties participating in the same <a href="https://en.wikipedia.org/wiki/Public_key_infrastructure"><u>public-key infrastructure</u></a> to establish a secure <a href="https://en.wikipedia.org/wiki/End-to-end_encryption"><u>end-to-end encrypted</u></a> communication channel, without requiring any prior setup between them. The massive scaling enabled by these technologies is why the secure Internet exists as we know it. Secure point-to-point links are not part of the solution.</p><p>Lack of scalability is enough for us to disqualify QKD outright: if a technology can’t bring security to the whole Internet, we’re not going to spend much time on it.</p><p>The challenges with QKD don’t stop there though.</p><p>QKD touts theoretical security guarantees, but achieving security in practice is not so simple. QKD systems have been <a href="https://www.bsi.bund.de/SharedDocs/Downloads/EN/BSI/Publications/Studies/QKD-Systems/QKD-Systems.pdf?__blob=publicationFile&amp;v=3"><u>plagued by implementation attacks</u></a>, both classical <a href="https://en.wikipedia.org/wiki/Side-channel_attack"><u>sidechannel attacks</u></a> and <a href="https://www.bsi.bund.de/SharedDocs/Downloads/EN/BSI/Publications/Studies/QKD-Systems/QKD-Systems.pdf?__blob=publicationFile&amp;v=3"><u>new ones</u></a> specific to the technology. Further, QKD works best over a special medium: either <a href="https://pmc.ncbi.nlm.nih.gov/articles/PMC4646568/"><u>fiber</u></a> or a <a href="https://journals.aps.org/prapplied/abstract/10.1103/PhysRevApplied.19.064003"><u>vacuum</u></a>. QKD has been demonstrated <a href="https://iopscience.iop.org/article/10.1088/1367-2630/16/4/043003"><u>over the air</u></a>, but performance and the implementation security mentioned before suffers. We still have not seen QKD work on a mobile phone or over Wi-Fi networks.</p><p>Further, neither QKD nor any other quantum technologies provide authentication to prove that the party on the other end of the key exchange is who you think they are. This opens the door for a classic <a href="https://blog.cloudflare.com/monsters-in-the-middleboxes/"><u>monster in the middle (MITM)</u></a> attack, where an adversary intercepts your connection, establishes a separate secure QKD link to you and your intended destination, and then sits in the middle reading and relaying all traffic. To prevent this, you must authenticate the identity of the party you are connecting to, using either <a href="https://en.wikipedia.org/wiki/Pre-shared_key"><u>pre-shared keys</u></a> or conventional public-key cryptography. The bottom line is, whether or not you invest in QKD, you still need a solution for authentication to protect against active attackers armed with quantum computers. Practically speaking, that means you need PQC, but PQC is already a standalone solution that provides both authentication and key agreement, which leads to questions of why use QKD in the first place.</p><p>Some <a href="https://www.amazon.science/blog/qkd-and-authentication-separating-facts-from-myths"><u>proponents</u></a> <a href="https://www.bluequbit.io/quantum-internet"><u>argue</u></a> that QKD should be integrated into existing systems as an extra security layer. The value proposition of QKD relates to the “<a href="https://en.wikipedia.org/wiki/Harvest_now,_decrypt_later"><u>harvest now, decrypt later</u></a>” threat. In public-key cryptography, the key exchange messages used to set up encryption keys to secure a communication channel are exchanged in full view of a potential adversary. If an adversary records the key exchange messages, they might hope to use improved techniques in the future to solve the hard math problems upon which the security of the key exchange relies, allowing them to recover the encryption keys and decrypt the communication. If encryption keys are exchanged directly via QKD instead, the eavesdropper protections provided by QKD stop an adversary from recording messages that could later allow them to recover the encryption key (e.g. by using a quantum computer or other advances in cryptanalysis). The problem is, however, that this “extra security layer” is brittle, and limited to a single physical link. As soon as the data is transmitted elsewhere — for instance at an Internet exchange point or to travel to an end-user — the QKD security ends. For the rest of its journey, the data is protected by standard protocols like <a href="https://www.cloudflare.com/learning/ssl/transport-layer-security-tls/"><u>TLS</u></a>, making the value of the initial QKD link questionable.</p><p>While we hope the technology progresses, QKD is neither necessary nor sufficient for security against a quantum adversary. PQC is sufficient for security against a quantum adversary, already runs on your existing hardware, and works everywhere.</p>
    <div>
      <h3>Quantum random number generators</h3>
      <a href="#quantum-random-number-generators">
        
      </a>
    </div>
    <p>Quantum random number generators (QRNGs) are a type of<a href="https://en.wikipedia.org/wiki/Hardware_random_number_generator"><u> “true” random number generator (TRNG)</u></a> that work by harnessing inherent unpredictability of quantum mechanics, for example by measuring <a href="https://en.wikipedia.org/wiki/Radioactive_decay"><u>atomic decay</u></a> or shooting photons at a <a href="https://en.wikipedia.org/wiki/Beam_splitter"><u>beam splitter</u></a>. Other types of classical (non-quantum) TRNGs use physical phenomena that exhibit random properties, such as <a href="https://ieeexplore.ieee.org/abstract/document/982700"><u>thermal noise</u></a> from electrical components, the motion of hot wax in <a href="https://blog.cloudflare.com/randomness-101-lavarand-in-production/"><u>lava lamps</u></a>, <a href="https://blog.cloudflare.com/harnessing-office-chaos/#londons-unpredictable-pendulums"><u>double pendulums</u></a>, <a href="https://blog.cloudflare.com/harnessing-office-chaos/#austins-mesmerizing-mobiles"><u>hanging mobiles</u></a>, or <a href="https://blog.cloudflare.com/chaos-in-cloudflare-lisbon-office-securing-the-internet-with-wave-motion/"><u>water wave machines</u></a>.</p>
          <figure>
          <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/6hDsBCSgInfwiAP7Qlnmth/8c1601c30a8982a164edfd096a3792a6/image_-_2025-09-19T141347.781.png" />
          </figure><p>In cryptography and computer security, the essential property required from a random number generator is that the outputs are unpredictable and unbiased. This can be achieved by taking a small seed (say, 256 bits) of true randomness and feeding it to a cryptographically-secure pseudorandom number generator (CSPRNG) to produce an essentially limitless stream of pseudorandom output indistinguishable from true randomness. The randomness used to seed the CSPRNG can be based on either classical or quantum physical processes, as long as it is not known to the adversary. Whether or not you use a QRNG to generate the seed, a CSPRNG is essential for cryptographic applications.</p><p>We are the first to get excited about <a href="https://blog.cloudflare.com/randomness-101-lavarand-in-production/"><u>fun</u></a> <a href="https://blog.cloudflare.com/chaos-in-cloudflare-lisbon-office-securing-the-internet-with-wave-motion/"><u>new</u></a> <a href="https://blog.cloudflare.com/harnessing-office-chaos/"><u>sources</u></a> of <a href="https://blog.cloudflare.com/league-of-entropy/"><u>randomness</u></a>. However, we’d like to emphasize that randomness derived from quantum effects is not necessary to combat threats from quantum computers. Quantum computers do not enable any practical new attacks against classical TRNGs in widespread use today. Your decision to invest in QRNGs should be based on a perceived improvement in the quality of randomness they produce and not on a perceived threat to classical TRNGs from quantum computing.</p>
    <div>
      <h2>Post-quantum cryptography at Cloudflare</h2>
      <a href="#post-quantum-cryptography-at-cloudflare">
        
      </a>
    </div>
    <p>Cloudflare has been at the forefront of developing and deploying PQC, and we are committed to making PQC available <a href="https://blog.cloudflare.com/post-quantum-crypto-should-be-free"><u>for free and by default</u></a> for all of our products. And we run it at scale — already <a href="https://radar.cloudflare.com/explorer?dataSet=http&amp;groupBy=post_quantum&amp;filters=botClass%253DLIKELY_HUMAN&amp;dt=1d"><u>over 40% of the human-generated traffic</u></a> to our network uses PQC.</p>
          <figure>
          <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/1UaPlayxwXxE9cKVZAVAQR/d605e06ae2a173c8344c1def89d64b1c/image_-_2025-09-19T141341.648.png" />
          </figure><p>So what’s in that 40%? PQC is supported for all <a href="https://developers.cloudflare.com/ssl/post-quantum-cryptography/"><u>website and API traffic</u></a> served through Cloudflare, most of Cloudflare’s <a href="https://blog.cloudflare.com/post-quantum-cryptography-ga"><u>internal network traffic</u></a>, and traffic running over our <a href="https://blog.cloudflare.com/post-quantum-zero-trust/"><u>Zero-Trust platform</u></a>. All these connections use post-quantum key agreement to protect against the “<a href="https://en.wikipedia.org/wiki/Harvest_now,_decrypt_later"><u>harvest now, decrypt later</u></a>” threat, where an adversary intercepts and stores encrypted data today with the hope of decrypting with a quantum computer or other cryptanalytic advances in the future. Key agreement is an important first step, but there’s still more work to be done. We’re <a href="https://mailarchive.ietf.org/arch/msg/ietf-announce/OWIjlOTCI_PIO0S2O9NHj8YUY0I/"><u>actively working</u></a> with stakeholders in the industry to prepare for the upcoming migration to post-quantum signatures to prevent active impersonation attacks from quantum adversaries (after Q-day).</p>
    <div>
      <h2>Quantum readiness strategy</h2>
      <a href="#quantum-readiness-strategy">
        
      </a>
    </div>
    <p>If purchasing quantum hardware is not necessary, how <i>should</i> organizations <a href="https://www.cloudflare.com/the-net/quantum-computing/"><u>prepare for a quantum future</u></a>? The most effective strategy will depend on your organization’s individual needs, but some general strategies will pay off for most organizations:</p><p>Investing in basic security practices is a good start. Hire the right expertise if you don’t already have it. Find vendors that support post-quantum encryption in their offerings today, and whose products are cryptographically agile so you can enjoy a seamless transition to <a href="https://blog.cloudflare.com/another-look-at-pq-signatures/"><u>post-quantum signatures</u></a> and certificates when the industry migrates before Q-day. Follow a tunneling strategy: routing application traffic over the Internet via <a href="https://developers.cloudflare.com/ssl/post-quantum-cryptography/pqc-and-zero-trust/"><u>secure quantum safe tunnels</u></a> allows you to reduce your attack surface area with minimal changes to existing systems. If you’re already a Cloudflare customer (or want to be), our <a href="https://www.cloudflare.com/application-services/products/cdn/"><u>Content Distribution Network</u></a> and <a href="https://blog.cloudflare.com/post-quantum-zero-trust/"><u>Zero Trust platform</u></a> makes this easy. Learn more about how we can help at our <a href="https://www.cloudflare.com/pqc"><u>Post-Quantum Cryptography</u></a> webpage.</p> ]]></content:encoded>
            <category><![CDATA[Post-Quantum]]></category>
            <category><![CDATA[Cryptography]]></category>
            <category><![CDATA[Security]]></category>
            <category><![CDATA[Entropy]]></category>
            <category><![CDATA[Randomness]]></category>
            <category><![CDATA[Research]]></category>
            <guid isPermaLink="false">3X7BJlPGwok0pKcR33AUs0</guid>
            <dc:creator>Luke Valenta</dc:creator>
        </item>
        <item>
            <title><![CDATA[A next-generation Certificate Transparency log built on Cloudflare Workers]]></title>
            <link>https://blog.cloudflare.com/azul-certificate-transparency-log/</link>
            <pubDate>Fri, 11 Apr 2025 13:00:00 GMT</pubDate>
            <description><![CDATA[ Learn about recent developments in Certificate Transparency (CT), and how we built a next-generation CT log on top of Cloudflare's Developer Platform. ]]></description>
            <content:encoded><![CDATA[ <p>Any public <a href="https://en.wikipedia.org/wiki/Certificate_authority"><u>certification authority (CA)</u></a> can issue a <a href="https://www.cloudflare.com/learning/ssl/what-is-an-ssl-certificate/"><u>certificate</u></a> for any website on the Internet to allow a webserver to authenticate itself to connecting clients. Take a moment to scroll through the list of trusted CAs for your web browser (e.g., <a href="https://chromium.googlesource.com/chromium/src/+/main/net/data/ssl/chrome_root_store/test_store.certs"><u>Chrome</u></a>). You may recognize (and even trust) some of the names on that list, but it should make you uncomfortable that <i>any</i> CA on that list could issue a certificate for any website, and your browser would trust it. It’s a castle with 150 doors.</p><p><a href="https://datatracker.ietf.org/doc/html/rfc6962"><u>Certificate Transparency (CT)</u></a> plays a vital role in the <a href="https://datatracker.ietf.org/wg/wpkops/about/"><u>Web Public Key Infrastructure (WebPKI)</u></a>, the set of systems, policies, and procedures that help to establish trust on the Internet. CT ensures that all website certificates are <a href="https://crt.sh"><u>publicly visible</u></a> and <a href="https://developers.cloudflare.com/ssl/edge-certificates/additional-options/certificate-transparency-monitoring/"><u>auditable</u></a>, helping to protect website operators from certificate mis-issuance by dishonest CAs, and helping honest CAs to detect key compromise and other failures.</p><p>In this post, we’ll discuss the history, evolution, and future of the CT ecosystem. We’ll cover some of the challenges we and others have faced in operating CT logs, and how the new <a href="https://c2sp.org/static-ct-api"><u>static CT API</u></a> log design lowers the bar for operators, helping to ensure that this critical infrastructure keeps up with the fast growth and changing landscape of the Internet and WebPKI. We’re excited to open source our <a href="https://github.com/cloudflare/azul"><u>Rust implementation</u></a> of the new log design, built for deployment on Cloudflare’s Developer Platform, and to announce <a href="https://github.com/cloudflare/azul/tree/main/crates/ct_worker#test-logs"><u>test logs</u></a> deployed using this infrastructure.</p>
    <div>
      <h2>What is Certificate Transparency?</h2>
      <a href="#what-is-certificate-transparency">
        
      </a>
    </div>
    <p>In 2011, the Dutch CA DigiNotar was <a href="https://threatpost.com/final-report-diginotar-hack-shows-total-compromise-ca-servers-103112/77170/"><u>hacked</u></a>, allowing attackers to forge a certificate for *.google.com and use it to impersonate Gmail to targeted Iranian users in an attempt to compromise personal information. Google caught this because they used <a href="https://developers.cloudflare.com/ssl/reference/certificate-pinning/"><u>certificate pinning</u></a>, but that technique <a href="https://blog.cloudflare.com/why-certificate-pinning-is-outdated/"><u>doesn’t scale well</u></a> for the web. This, among other similar attacks, led a team at Google in 2013 to develop Certificate Transparency (CT) as a mechanism to catch mis-issued certificates. CT creates a public audit trail of all certificates issued by public CAs, helping to protect users and website owners by holding <a href="https://sslmate.com/resources/certificate_authority_failures"><u>CAs accountable</u></a> for the certificates they issue (even unwittingly, in the event of key compromise or software bugs). CT has been a great success: since 2013, over <a href="https://crt.sh/cert-populations"><u>17 billion</u></a> certificates have been logged, and CT was awarded the prestigious <a href="https://blog.transparency.dev/certificate-transparency-wins-the-levchin-prize"><u>Levchin Prize</u></a> in 2024 for its role as a critical safety mechanism for the Internet.</p><p>Let’s take a brief look at the entities involved in the CT ecosystem. Cloudflare itself operates the <a href="https://blog.cloudflare.com/introducing-certificate-transparency-and-nimbus/"><u>Nimbus CT logs</u></a> and the CT monitor powering the <a href="https://blog.cloudflare.com/a-tour-through-merkle-town-cloudflares-ct-ecosystem-dashboard/"><u>Merkle Town</u></a> <a href="https://ct.cloudflare.com"><u>dashboard</u></a>.</p><p><i>Certification Authorities (CAs)</i> are organizations entrusted to issue certificates on behalf of website operators, which in turn can use those certificates to authenticate themselves to connecting clients.</p><p><i>CT-enforcing clients</i> like the <a href="https://googlechrome.github.io/CertificateTransparency/ct_policy.html"><u>Chrome</u></a>, <a href="https://support.apple.com/en-us/103214"><u>Safari</u></a>, and <a href="https://developer.mozilla.org/en-US/docs/Web/Security/Certificate_Transparency"><u>Firefox</u></a> browsers are web clients that only accept certificates compliant with their CT policies. For example, a policy might require that a certificate includes proof that it has been submitted to at least two independently-operated public CT logs.</p><p><i>Log operators</i> run CT logs, which are public, append-only lists of certificates. CAs and other clients can submit a certificate to a CT log to obtain a “promise” from the CT log that it will incorporate the entry into the append-only log within some grace period. CT logs periodically (every few seconds, typically) update their log state to incorporate batches of new entries, and publish a signed checkpoint that attests to the new state.</p><p><i>Monitors</i> are third parties that continuously crawl CT logs and check that their behavior is correct. For instance, they verify that a log is self-consistent and append-only by ensuring that when new entries are added to the log, no previous entries are deleted or modified. Monitors may also examine logged certificates to help website operators detect mis-issuance.</p>
    <div>
      <h2>Challenges in operating a CT log</h2>
      <a href="#challenges-in-operating-a-ct-log">
        
      </a>
    </div>
    <p>Despite the success of CT, it is a less than perfect system. Eric Rescorla has an <a href="https://educatedguesswork.org/posts/transparency-part-2/"><u>excellent writeup</u></a> on the many compromises made to make CT deployable on the Internet of 2013. We’ll focus on the operational complexities of running a CT log.</p><p>Let’s look at the requirements for running a CT log from <a href="https://googlechrome.github.io/CertificateTransparency/log_policy.html#ongoing-requirements-of-included-logs"><u>Chrome’s CT log policy</u></a> (which are more or less mirrored by those of <a href="https://support.apple.com/en-us/103703"><u>Safari</u></a> and <a href="https://groups.google.com/a/mozilla.org/g/dev-security-policy/c/lypRGp4JGGE"><u>Firefox</u></a>), and what can go wrong. The requirements center around <b>integrity</b> and <b>availability</b>.</p><p>To be considered a trusted auditing source, CT logs necessarily have stringent <b>integrity</b> requirements. Anything the log produces must be correct and self-consistent, meaning that a CT log cannot present two different views of the log to different clients, and must present a consistent history for its entire lifetime. Similarly, when a CT log accepts a certificate and promises to incorporate it by returning a Signed Certificate Timestamp (SCT) to the client, it must eventually incorporate that certificate into its append-only log.</p><p>The integrity requirements are unforgiving. A single bit-flip due to a hardware failure or cosmic ray can (<a href="https://www.agwa.name/blog/post/how_ct_logs_fail"><u>and</u></a> <a href="https://groups.google.com/a/chromium.org/g/ct-policy/c/R27Zy9U5NjM"><u>has</u></a>) caused logs to produce incorrect results and thus be disqualified by CT programs. Even software updates to running logs can be fatal, as a change that causes a correctness violation cannot simply be rolled back. Perhaps the <a href="https://github.com/C2SP/C2SP/issues/79"><u>greatest risk</u></a> to individual log integrity is <a href="https://groups.google.com/a/chromium.org/g/ct-policy/c/W1Ty2gO0JNA"><u>failing to incorporate certificates</u></a> for which they issued SCTs, for example if they fail to commit those pending certificates to durable storage. See Andrew Ayer’s <a href="https://www.agwa.name/blog/post/how_ct_logs_fail"><u>great synopsis</u></a> for more examples of CT log failures (up to 2021).</p><p>A CT log must also meet certain <b>availability</b> requirements to effectively provide its core functionality as a publicly auditable log. Clients must be able to reliably retrieve log data — Chrome’s policy requires a minimum of 99% average uptime over a 90-day rolling period for each API endpoint — and any entries for which an SCT has been issued must be incorporated into the log within the grace period, called the Maximum Merge Delay (MMD), 24 hours in Chrome’s policy.</p><p>The design of the current CT log read APIs puts strain on the ability of log operators to meet uptime requirements. The API endpoints are <i>dynamic</i> and not easily cacheable without bespoke caching rules that are aware of the CT API. For instance, the <a href="https://datatracker.ietf.org/doc/html/rfc6962#section-4.6"><u>get-entries</u></a> endpoint allows a client to request arbitrary ranges of entries from a log, and the <a href="https://datatracker.ietf.org/doc/html/rfc6962#section-4.5"><u>get-proof-by-hash</u></a> requires the server to construct inclusion proofs for any certificate requested by the client. To serve these requests, CT log servers need to be backed by databases easily 5-10TB in size capable of serving tens of millions of requests per day. This increases operator complexity and expense, not to mention the high cost of bandwidth of serving these requests.</p><p>MMD violations are unfortunately not uncommon. Cloudflare’s own Nimbus logs have experienced prolonged outages in the past, most recently in <a href="https://blog.cloudflare.com/post-mortem-on-cloudflare-control-plane-and-analytics-outage/"><u>November 2023</u></a> due to complete power loss in the datacenter running the logs. During normal log operation, if the log accepts entries more quickly than it incorporates them, the backlog can grow to exceed the MMD. Log operators can remedy this by rate-limiting or temporarily disabling the write APIs, but this can in turn contribute to violations of the uptime requirements.</p><p>The high bar for log operation has limited the organizations operating CT logs to only <a href="https://ct.cloudflare.com/logs"><u>Cloudflare and five others</u></a>! Losing one or two logs is enough to compromise the stability of the CT ecosystem. Clearly, a change is needed.</p>
    <div>
      <h2>A next-generation CT log design</h2>
      <a href="#a-next-generation-ct-log-design">
        
      </a>
    </div>
    <p>In May 2024, Let’s Encrypt <a href="https://letsencrypt.org/2024/03/14/introducing-sunlight/"><u>announced</u></a> <a href="https://github.com/FiloSottile/sunlight"><u>Sunlight</u></a>, an implementation of a next-generation CT log designed for the modern WebPKI, incorporating a decade of lessons learned from running CT and similar transparency systems. The new CT log design, called the <a href="https://c2sp.org/static-ct-api"><u>static CT API</u></a>, is partially based on the <a href="https://go.googlesource.com/proposal/+/master/design/25530-sumdb.md"><u>Go checksum database</u></a>, and organizes log data as a series of <a href="https://research.swtch.com/tlog#tiling_a_log"><u>tiles</u></a> that are easy to cache and serve. The new design provides efficiency improvements that cut operation costs, help logs to meet availability requirements, and reduce the risk of integrity violations.</p><p>The static CT API is split into two parts, the <a href="https://github.com/C2SP/C2SP/blob/main/static-ct-api.md#monitoring-apis"><b><u>monitoring APIs</u></b></a> (so named because CT monitors are the primary clients), and the <a href="https://github.com/C2SP/C2SP/blob/main/static-ct-api.md#monitoring-apis"><b><u>submission APIs</u></b></a> for adding new certificates to the log.</p><p>The <b>monitoring APIs</b> replace the dynamic read APIs of <a href="https://datatracker.ietf.org/doc/html/rfc6962#section-4"><u>RFC 6962</u></a>, and organize log data into static, cacheable tiles. (See <a href="https://research.swtch.com/tlog#tiling_a_log"><u>Russ Cox’s blog post</u></a> for an in-depth explanation of tiled logs.) CT log operators can efficiently serve static tiles from <a href="https://www.cloudflare.com/developer-platform/solutions/s3-compatible-object-storage/">S3-compatible object storage buckets</a> and cache them using CDN infrastructure, without needing dedicated API servers. Clients can then download the necessary tiles to retrieve specific log entries or reconstruct arbitrary proofs.</p><p>The static CT API introduces another efficiency by deduplicating intermediate and root “issuer” certificates in a log entry’s certificate chain. The number of publicly-trusted issuer certificates is small (<a href="https://www.ccadb.org/"><u>in the low thousands</u></a>), so instead of storing them repeatedly for each log entry, only the issuer hash is stored. Clients can look up issuer certificates by hash from a <a href="https://github.com/C2SP/C2SP/blob/main/static-ct-api.md#issuers"><u>separate endpoint</u></a>.</p><p>The <b>submission APIs</b> remain backwards-compatible with <a href="https://datatracker.ietf.org/doc/html/rfc6962#section-4"><u>RFC 6962</u></a>, meaning that TLS clients and CAs can submit to them without any changes. However, there is one notable addition: the static CT specification requires logs to hold on to requests as it batches and sequences them, and responds with an SCT only after entries have been incorporated into the log. The specification defines a <a href="https://github.com/C2SP/C2SP/blob/main/static-ct-api.md#sct-extension"><u>required SCT extension</u></a> indicating the entry’s index in the log. At the cost of slightly delayed SCT issuance (on the order of seconds), this change eliminates one of the major pain points of operating a CT log (the Merge Delay).</p><p>Having the log <i>index</i> of a certificate available in an SCT enables further efficiencies. <i>SCT auditing</i> refers to the process by which TLS clients or monitors can check if a log has fulfilled its promise to incorporate a certificate for which it has issued an SCT. In the RFC 6962 API, checking if a certificate is present in a log when you don’t already know the index requires using the <a href="https://datatracker.ietf.org/doc/html/rfc6962#section-4.5"><u>get-proof-by-hash</u></a> endpoint to look up the entry by the certificate hash (and the server needs to maintain a mapping from hash to index to efficiently serve these requests). Instead, with the index immediately available in the SCT, clients can directly retrieve the specific log data tile covering that index, even with <a href="https://transparency.dev/summit2024/sct-auditing.html"><u>efficient privacy-preserving techniques</u></a>.</p><p>Since it was announced, the static CT API has taken the CT ecosystem by storm. Aside from <a href="https://github.com/FiloSottile/sunlight"><u>Sunlight</u></a> and our brand new <a href="https://github.com/cloudflare/azul"><u>Azul</u></a> (discussed below), there are at least two other independent implementations, <a href="https://blog.transparency.dev/i-built-a-new-certificate-transparency-log-in-2024-heres-what-i-learned"><u>Itko</u></a> and <a href="https://blog.transparency.dev/introducing-trillian-tessera"><u>Trillian Tessera</u></a>. Several CT monitors (including <a href="https://crt.sh"><u>crt.sh</u></a>, <a href="https://sslmate.com/certspotter/"><u>certspotter</u></a>, <a href="https://censys.com/"><u>Censys</u></a>, and our own <a href="https://ct.cloudflare.com"><u>Merkle Town</u></a>) have added support for the new log format, and as of April 1, 2025, Chrome has begun accepting submissions for <a href="https://groups.google.com/a/chromium.org/g/ct-policy/c/HBFZHG0TCsY/m/HAaVRK6MAAAJ"><u>static CT API logs</u></a> into their CT log program.</p>
    <div>
      <h2>A static CT API implementation on Workers</h2>
      <a href="#a-static-ct-api-implementation-on-workers">
        
      </a>
    </div>
    <p>This section discusses how we designed and built our static CT log implementation, <a href="https://github.com/cloudflare/azul"><u>Azul</u></a> (short for <a href="https://en.wikipedia.org/wiki/Azulejo"><u>azulejos</u></a>, the colorful Portuguese and Spanish ceramic tiles). For curious readers and prospective CT log operators, we encourage you to follow the instructions in the repo to quickly set up your own static CT log. Questions and feedback in the form of GitHub issues are welcome!</p><p>Our two prototype logs, <a href="https://static-ct.cloudflareresearch.com/logs/cftest2025h1a/metadata"><u>Cloudflare Research 2025h1a</u></a> and <a href="https://static-ct.cloudflareresearch.com/logs/cftest2025h2a/metadata"><u>Cloudflare Research 2025h2a</u></a> (accepting certificates expiring in the first and second half of 2025, respectively), are available for testing.</p>
    <div>
      <h3>Design decisions and goals</h3>
      <a href="#design-decisions-and-goals">
        
      </a>
    </div>
    <p>The advent of the static CT API gave us the perfect opportunity to rethink how we run our CT logs. There were a few design decisions we made early on to shape the project.</p><p>First and foremost, we wanted to run our CT logs on our distributed global network. Especially after the <a href="https://blog.cloudflare.com/post-mortem-on-cloudflare-control-plane-and-analytics-outage/"><u>painful November 2023 control plane outage</u></a>, there’s been a push to deploy services on our highly available and resilient network instead of running in centralized datacenters.</p><p>Second, with Cloudflare’s deeply engrained culture of <a href="https://blog.cloudflare.com/tag/dogfooding/"><u>dogfooding</u></a> (building Cloudflare on top of Cloudflare), we decided to implement the CT log on top of Cloudflare’s Developer Platform and <a href="https://workers.cloudflare.com/"><u>Workers</u></a>. </p><p>Dogfooding gives us an opportunity to find pain points in our product offerings, and to provide feedback to our development teams to improve the developer experience for everyone. We restricted ourselves to only features and default limits generally available to customers, so that we could have the same experience as an external Cloudflare developer, and would produce an implementation that anyone could deploy.</p><p>Another major design decision was to implement the CT log in Rust, a modern systems programming language with static typing and built-in memory safety that is heavily used across Cloudflare, and which already has mature (if sometimes <a href="#developing-a-workers-application-in-rust"><u>lacking full feature parity</u></a>) <a href="https://github.com/cloudflare/workers-rs"><u>Workers bindings</u></a> that we have used to build <a href="https://blog.cloudflare.com/wasm-coredumps/"><u>several production services</u></a>. This also provided us with an opportunity to produce Rust crates porting <a href="https://pkg.go.dev/golang.org/x/mod/sumdb"><u>Go implementations</u></a> of various <a href="https://c2sp.org"><u>C2SP</u></a> specifications that can be reused across other projects.</p><p>For the new logs to be deployable, they needed to be at least as performant as existing CT logs. As a point of reference, the <a href="https://ct.cloudflare.com/logs/nimbus2025"><u>Nimbus2025</u></a> log currently handles just over 33 million requests per day (~380/s) across the read APIs, and about 6 million per day (~70/s) across the write APIs.</p>
    <div>
      <h3>Implementation </h3>
      <a href="#implementation">
        
      </a>
    </div>
    <p>We based Azul heavily on <a href="https://github.com/FiloSottile/sunlight"><u>Sunlight</u></a>, a Go application built for deployment as a standalone server. As such, this section serves as a reference for translating a traditional server to Cloudflare’s serverless platform.</p><p>To start, let’s briefly review the Sunlight architecture (described in more detail in the <a href="https://github.com/FiloSottile/sunlight/blob/main/README.md"><u>README</u></a> and <a href="https://filippo.io/a-different-CT-log"><u>original design doc</u></a>). A Sunlight instance is a single Go process, serving one or multiple CT logs. It is backed by three different storage locations with different properties:</p><ul><li><p>A “lock backend” which stores the current checkpoint for each log. This datastore needs to be strongly consistent, but only stores trivial amounts of data.</p></li><li><p>A per-log object storage bucket from which to serve tiles, checkpoints, and issuers to CT clients. This datastore needs to be strongly consistent, and to handle multiple terabytes of data.</p></li><li><p>A per-log deduplication cache, to return SCTs for previously-submitted (pre-)certificates. This datastore is best-effort (as duplicate entries are not fatal to log operation), and stores tens to hundreds of gigabytes of data.</p></li></ul><p>Two major components handle the bulk of the CT log application logic:</p><ul><li><p>A frontend HTTP server handles incoming requests to the submission APIs to add new certificates to the log, validates them, checks the deduplication cache, adds the certificate to a pool of entries to be sequenced, and waits for sequencing to complete before responding to the client.</p></li><li><p>The sequencer periodically (every 1s, by default) sequences the pool of pending entries, writes new tiles to the object backend, persists the latest checkpoint covering the new log state to the lock and object backends, and signals to waiting requests that the pool has been sequenced.</p></li></ul>
          <figure>
          <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/6gLwzRo4Azbls2wvM12TJx/80d6f7aad1317f31dfe06a0c474ee93c/image5.png" />
          </figure><p><sup><i>A static CT API log running on a traditional server using the Sunlight implementation.</i></sup></p><p>Next, let’s look at how we can translate these components into ones suitable for deployment on Workers.</p>
    <div>
      <h4>Making it work</h4>
      <a href="#making-it-work">
        
      </a>
    </div>
    <p>Let’s start with the easy choices. The static CT <a href="https://github.com/C2SP/C2SP/blob/main/static-ct-api.md#monitoring-apis"><u>monitoring APIs</u></a> are designed to serve static, cacheable, compressible assets from object storage. The API should be highly available and have the capacity to serve any number of CT clients. The natural choice is <a href="https://www.cloudflare.com/developer-platform/products/r2/"><u>Cloudflare R2</u></a>, which provides globally consistent storage with capacity for <a href="https://developers.cloudflare.com/r2/platform/limits/"><u>large data volumes</u></a>, customizability to configure caching and compression, and unbounded read operations.</p>
          <figure>
          <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/qsC1dO8blS1eGOysu9WQa/75da37719be35824a7533dbbd62bede3/image4.png" />
          </figure><p><sup><i>A static CT API log running on Workers using a preliminary version of the Azul implementation which ran into performance limitations.</i></sup></p><p>The static CT <a href="https://github.com/C2SP/C2SP/blob/main/static-ct-api.md#submission-apis"><u>submission APIs</u></a> are where the real challenge lies. In particular, they allow CT clients to submit certificate chains to be incorporated into the append-only log. We used <a href="https://developers.cloudflare.com/learning-paths/workers/concepts/workers-concepts/"><u>Workers</u></a> as the frontend for the CT log application. Workers run in data centers close to the client, scaling on demand to handle request load, making them the ideal place to run the majority of the heavyweight request handling logic, including validating requests, checking the deduplication cache (discussed below), and submitting the entry to be sequenced.</p><p>The next question was where and how we’d run the backend to handle the CT log sequencing logic, which needs to be stateful and tightly coordinated. We chose <a href="https://developers.cloudflare.com/durable-objects/"><u>Durable Objects (DOs)</u></a>, a special type of stateful Cloudflare Worker where each instance has persistent storage and a unique name which can be used to route requests to it from anywhere in the world. DOs are designed to scale effortlessly for applications that can be easily broken up into self-contained units that do not need a lot of coordination across units. For example, a <a href="https://blog.cloudflare.com/introducing-workers-durable-objects/#demo-chat"><u>chat application</u></a> can use one DO to control each chat room. In our model, then, each CT log is controlled by a single DO. This architecture allows us to easily run multiple CT logs within a single Workers application, but as we’ll see, the limitations of <i>individual</i> single-threaded DOs can easily become a bottleneck. More on this later.</p><p>With the CT log backend as a Durable Object, several other components fell into place: Durable Objects’ <a href="https://developers.cloudflare.com/durable-objects/api/storage-api/"><u>strongly-consistent transactional storage</u></a> neatly fit the requirements for the “lock backend” to persist the log’s latest checkpoint, and we can use an <a href="https://developers.cloudflare.com/durable-objects/api/alarms/"><u>alarm</u></a> to trigger the log sequencing every second. We can also use <a href="https://developers.cloudflare.com/durable-objects/reference/data-location/#provide-a-location-hint"><u>location hints</u></a> to place CT logs in locations geographically close to clients for reduced latency, similar to <a href="https://groups.google.com/g/certificate-transparency/c/I74Wp-KdWHc"><u>Google’s Argon and Xenon logs</u></a>.</p><p>The <a href="https://developers.cloudflare.com/workers/platform/storage-options/"><u>choice of datastore</u></a> for the deduplication cache proved to be non-obvious. The cache is best-effort, and intended to avoid re-sequencing entries that are already present in the log. The cache key is computed by hashing certain fields of the <code>add-[pre-]chain</code> request, and the cache value consists of the entry’s index in the log and the timestamp at which it was sequenced. At current log submission rates, the deduplication cache could grow in excess of <a href="https://github.com/FiloSottile/sunlight/tree/main?tab=readme-ov-file#operating-a-sunlight-log"><u>50 GB for 6 months of log data</u></a>. In the Sunlight implementation, the deduplication cache is implemented as a local SQLite database, where checks against it are tightly coupled with sequencing, which ensures that duplicates from in-flight requests are correctly accounted for. However, this architecture did not translate well to Cloudflare's architecture. The data size doesn’t comfortably fit within <a href="https://developers.cloudflare.com/durable-objects/platform/limits/"><u>Durable Object Storage</u></a> or <a href="https://developers.cloudflare.com/d1/platform/limits/"><u>single-database D1</u></a> limits, and it was too slow to directly read and write to remote storage from within the sequencing loop. Ultimately, we split the deduplication cache into two components: a local fixed-size in-memory cache for fast deduplication over short periods of time (on the order of minutes), and the other a long-term deduplication cache built on <a href="https://developers.cloudflare.com/kv/"><u>Cloudflare Workers KV</u></a> a global, low-latency, <a href="https://developers.cloudflare.com/kv/reference/faq/#is-workers-kv-eventually-consistent-or-strongly-consistent"><u>eventually-consistent</u></a> key-value store <a href="https://developers.cloudflare.com/kv/platform/limits/"><u>without storage limitations</u></a>.</p><p>With this architecture, it was <a href="#developing-a-workers-application-in-rust"><u>relatively straightforward</u></a> to port the Go code to Rust, and to bring up a functional static CT log up on Workers. We’re done then, right? Not quite. Performance tests showed that the log was only capable of sequencing 20-30 new entries per second, well under the 70 per second target of existing logs. We could work around this by simply <a href="https://letsencrypt.org/2024/03/14/introducing-sunlight/#running-more-logs"><u>running more logs</u></a>, but that puts strain on other parts of the CT ecosystem — namely on TLS clients and monitors, which need to keep state for each log. Additionally, the alarm used to trigger sequencing would often be delayed by multiple seconds, meaning that the log was failing to produce new tree heads at consistent intervals. Time to go back to the drawing board.</p>
    <div>
      <h4>Making it fast</h4>
      <a href="#making-it-fast">
        
      </a>
    </div>
    <p>In the design thus far, we’re asking a single-threaded Durable Object instance to do a lot of multi-tasking. The DO processes incoming requests from the Frontend Worker to add entries to the sequencing pool, and must periodically sequence the pool and write state to the various storage backends. A log handling 100 requests per second needs to switch between 101 running tasks (the extra one for the sequencing), plus any async tasks like writing to remote storage — usually 10+ writes to object storage and one write to the long-term deduplication cache per sequenced entry. No wonder the sequencing task was getting delayed!</p>
          <figure>
          <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/7BCidjDyYw2YS1Ot84LHdk/240ce935eb4e36c82255d846d964fdff/image2.png" />
          </figure><p><sup><i>A static CT API log running on Workers using the Azul implementation with batching to improve performance.</i></sup></p><p>We were able to work around these issues by adding an additional layer of DOs between the Frontend Worker and the Sequencer, which we call Batchers. The Frontend Worker uses <a href="https://en.wikipedia.org/wiki/Consistent_hashing"><u>consistent hashing</u></a> on the cache key to determine which of several Batchers to submit the entry to, and the Batcher helps to reduce the number of requests to the Sequencer by buffering requests and sending them together in batches. When the batch is sequenced, the Batcher distributes the responses back to the Frontend Workers that submitted the request. The Batcher also handles writing updates to the deduplication cache, further freeing up resources for the Sequencer.</p><p>By limiting the scope of the critical block of code that needed to be run synchronously in a single DO, and leaning on the strengths of DOs by scaling horizontally where the workload allows it, we were able to drastically improve application performance. With this new architecture, the CT log application can handle upwards of 500 requests per second to the submission APIs to add new log entries, while maintaining a consistent sequencing tempo to keep per-request latency low (typically 1-2 seconds).</p>
    <div>
      <h3>Developing a Workers application in Rust</h3>
      <a href="#developing-a-workers-application-in-rust">
        
      </a>
    </div>
    <p>One of the reasons I was excited to work on this project is that it gave me an opportunity to implement a Workers application in Rust, which I’d never done from scratch before. Not everything was smooth, but overall I would recommend the experience.</p><p>The <a href="https://github.com/cloudflare/workers-rs"><u>Rust bindings to Cloudflare Workers</u></a> are an open source project that aims to bring support for all of the features you know and love from the <a href="https://developers.cloudflare.com/workers/languages/javascript/"><u>JavaScript APIs</u></a> to the Rust language. However, there is some lag in terms of feature parity. Often when working on this project, I’d read about a particular Workers feature in the <a href="https://developers.cloudflare.com"><u>developer docs</u></a>, only to find that support had <a href="https://github.com/cloudflare/workers-rs/issues/645"><u>not yet</u></a> <a href="https://github.com/cloudflare/workers-rs/issues/716"><u>been added</u></a>, or was only <a href="https://github.com/cloudflare/workers-rs?tab=readme-ov-file#rpc-support"><u>partially supported</u></a>, for the Rust bindings. I came across some <a href="https://github.com/cloudflare/workers-rs/issues/432"><u>surprising gotchas</u></a> (not all bad, like <a href="https://docs.rs/tokio/1.44.1/tokio/sync/watch/index.html"><u>tokio::sync::watch</u></a> channels <a href="https://github.com/cloudflare/workers-rs/pull/719"><u>working seamlessly</u></a>, despite <a href="https://github.com/cloudflare/workers-rs?tab=readme-ov-file#faq"><u>this warning</u></a>). Documentation about <a href="https://developers.cloudflare.com/workers/observability/dev-tools/breakpoints/"><u>debugging</u></a> and <a href="https://developers.cloudflare.com/workers/observability/dev-tools/cpu-usage/"><u>profiling</u></a> Rust Workers was also not clear (e.g., how to <a href="https://github.com/cloudflare/cloudflare-docs/pull/21347"><u>preserve debug symbols</u></a>), but it does in fact work!</p><p>To be clear, these rough edges are expected! The Workers platform is continuously gaining new features, and it’s natural that the Rust bindings would fall behind. As more developers rely on (and contribute to, <i>hint hint</i>) the Rust bindings, the developer experience will continue to improve.</p>
    <div>
      <h2>What is next for Certificate Transparency</h2>
      <a href="#what-is-next-for-certificate-transparency">
        
      </a>
    </div>
    <p>The WebPKI is constantly evolving and growing, and upcoming changes, in particular shorter certificate lifetimes and larger post-quantum certificates, are going to place significantly more load on the CT ecosystem.</p><p>The <a href="https://cabforum.org/"><u>CA/Browser Forum</u></a> defines a set of <a href="https://cabforum.org/working-groups/server/baseline-requirements/documents/TLSBRv2.0.4.pdf"><u>Baseline Requirements</u></a> for publicly-trusted TLS server certificates.  As of 2020, the maximum certificate lifetime for publicly-trusted certificates is 398 days. However, there is a <a href="https://github.com/cabforum/servercert/pull/553"><u>ballot measure</u></a> to reduce that period to as low as 47 days by March 2029. Let’s Encrypt is going even further, and at the <a href="https://letsencrypt.org/2024/12/11/eoy-letter-2024/"><u>end of 2024 announced</u></a> that they will be offering short-lived certificates with a lifetime of only <a href="https://letsencrypt.org/2025/01/16/6-day-and-ip-certs/"><u>six days</u></a> by the end of 2025. Based on some back-of-the-envelope calculations using statistics from <a href="https://ct.cloudflare.com/"><u>Merkle Town</u></a>, these changes could increase the number of logged entries in the CT ecosystem by <b>16-20x</b>.</p><p>If you’ve been keeping up with this blog, you’ll also know that <a href="https://blog.cloudflare.com/another-look-at-pq-signatures/"><u>post-quantum certificates</u></a> are on the horizon, bringing with them larger signature and public key sizes. Today, a <a href="https://crt.sh/?id=17119212878"><u>certificate</u></a> with an P-256 ECDSA public key and issuer signature can be less than 1kB. Dropping in a ML-DSA<sub>44</sub> public key and signature brings the same certificate size to 4.6 kB, assuming the SCTs use 96-byte <a href="https://blog.cloudflare.com/another-look-at-pq-signatures/"><u>UOV</u><u><sub>ls-pkc</sub></u></a> signatures. With these choices, post-quantum certificates could require CT logs to store <b>4x</b> the amount of data per log entry.</p><p>The static CT API design helps to ensure that CT logs are much better equipped to handle this increased load, especially if the load is distributed across <a href="https://letsencrypt.org/2024/03/14/introducing-sunlight/#running-more-logs"><u>multiple logs</u></a> per operator. Our <a href="https://github.com/cloudflare/azul"><u>new implementation</u></a> makes it easy for log operators to run CT logs on top of Cloudflare’s infrastructure, adding more operational diversity and robustness to the CT ecosystem. We welcome feedback on the design and implementation as <a href="https://github.com/cloudflare/azul/issues"><u>GitHub issues</u></a>, and encourage CAs and other interested parties to start submitting to and consuming from our <a href="https://github.com/cloudflare/azul/tree/main/crates/ct_worker#test-logs"><u>test logs</u></a>.</p> ]]></content:encoded>
            <category><![CDATA[Developer Week]]></category>
            <category><![CDATA[Research]]></category>
            <category><![CDATA[Open Source]]></category>
            <category><![CDATA[Rust]]></category>
            <category><![CDATA[Cloudflare Workers]]></category>
            <category><![CDATA[Transparency]]></category>
            <category><![CDATA[Certificate Transparency]]></category>
            <guid isPermaLink="false">5n88kLCWbpk22AmRzMQN9g</guid>
            <dc:creator>Luke Valenta</dc:creator>
        </item>
        <item>
            <title><![CDATA[A look at the latest post-quantum signature standardization candidates]]></title>
            <link>https://blog.cloudflare.com/another-look-at-pq-signatures/</link>
            <pubDate>Thu, 07 Nov 2024 14:00:00 GMT</pubDate>
            <description><![CDATA[ NIST has standardized four post-quantum signature schemes so far, and they’re not done yet: there are fourteen new candidates in the running for standardization. ]]></description>
            <content:encoded><![CDATA[ <p>On October 24, 2024, the National Institute of Standards and Technology (NIST) <a href="https://groups.google.com/a/list.nist.gov/g/pqc-forum/c/khAfIZPktRE/m/bBZWmET-AAAJ"><u>announced</u></a> that they’re advancing fourteen post-quantum signature schemes to the second round of the “<a href="https://csrc.nist.gov/projects/pqc-dig-sig"><u>signatures on ramp</u></a>” competition. “Post-quantum” means that these algorithms are designed to resist <a href="https://blog.cloudflare.com/the-quantum-menace/"><u>the attack of quantum computers</u></a>. NIST already standardized four post-quantum signature schemes (<a href="https://blog.cloudflare.com/nists-first-post-quantum-standards/"><u>ML-DSA, SLH-DSA</u></a>, <a href="https://csrc.nist.gov/News/2020/stateful-hash-based-signature-schemes-sp-800-208"><u>XMSS, and LMS</u></a>) and they are drafting a standard for a fifth (<a href="https://falcon-sign.info/"><u>Falcon</u></a>). Why do we need even more, you might ask? We’ll get to that.</p><p>A regular reader of the blog will know that this is not the first time we’ve taken measure of post-quantum signatures. In <a href="https://blog.cloudflare.com/sizing-up-post-quantum-signatures/"><u>2021</u></a> we took a first hard look, and reported on the performance impact we expect from large-scale measurements.  Since then, dozens of new post-quantum algorithms have been proposed. Many of them have been submitted to this new NIST competition. We discussed some of the more promising ones in our <a href="https://blog.cloudflare.com/pq-2024/"><u>early 2024 blog post</u></a>.</p><p>In this blog post, we will go over the fourteen schemes advanced to the second round of the on ramp and discuss their feasibility for use in TLS — the protocol that secures browsing the Internet. The defining feature of practically all of them, is that they require much more bytes on the wire. Back in 2021 we shared <a href="https://blog.cloudflare.com/sizing-up-post-quantum-signatures/"><u>experimental results</u></a> on the impact of these extra bytes. Today, we will share some surprising statistics on how TLS is used in practice. One is that today already almost half the data sent over more than half the QUIC connections are just for the certificates.</p><p>For a broader context and introduction to the post-quantum migration, check out our <a href="https://blog.cloudflare.com/pq-2024"><u>early 2024 blog post</u></a>. One take-away to mention here: there will be two migrations for TLS. First, we urgently need to migrate key agreement to <a href="https://www.cloudflare.com/learning/ssl/quantum/what-is-post-quantum-cryptography/">post-quantum cryptography</a> to protect against <a href="https://en.wikipedia.org/wiki/Harvest_now,_decrypt_later"><u>attackers that store encrypted communication today</u></a> in order to decrypt it in the future when a quantum computer is available. The industry is making good progress here: <a href="https://radar.cloudflare.com/adoption-and-usage#post-quantum-encryption-adoption"><u>18% of human requests</u></a> to websites using Cloudflare are <a href="https://blog.cloudflare.com/post-quantum-for-all/"><u>secured</u></a> using post-quantum key agreement. The second migration, to post-quantum signatures (certificates), is not as urgent: we will need to have this sorted by the time the quantum computer arrives. However, it will be a bigger challenge.</p>
    <div>
      <h2>The signatures in TLS</h2>
      <a href="#the-signatures-in-tls">
        
      </a>
    </div>
    <p>Before we have a look at the long list of post-quantum signature algorithms and their performance characteristics, let’s go through the signatures involved when browsing the Internet and their particular constraints.</p>
          <figure>
          <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/415VcZzABkhZjT60GRkQZM/f30ae24bd14e86534efd3e74d15eb5b5/image3.png" />
          </figure><p>When you visit a website, the browser establishes a TLS connection with the server for that website. The connection starts with a cryptographic handshake. During this handshake, to authenticate the connection, the server signs the transcript so far, and presents the browser with a TLS <i>leaf</i> certificate to prove that it’s allowed to serve the website. This <i>leaf </i>certificate is signed by a certification authority (CA). Typically, it’s not signed by the CA’s <i>root</i> certificate, but by an <i>intermediate</i> CA certificate, which in turn is signed by the root CA, or another intermediate. That’s not all: a leaf certificate has to include at least two <i>signed certificate timestamps</i> (SCTs). These SCTs are signatures created by <a href="https://blog.cloudflare.com/introducing-certificate-transparency-and-nimbus/"><u>certificate transparency (CT) logs</u></a> to attest they’ve been publicly logged. <a href="https://certificate.transparency.dev/howctworks/"><u>Certificate Transparency</u></a> is what enables you to look up a certificate on websites such <a href="http://crt.sh"><u>crt.sh</u></a> and <a href="https://www.merklemap.com/"><u>merklemap</u></a>. In the future three or more SCTs might be required. Finally, servers may also send an <a href="https://blog.cloudflare.com/high-reliability-ocsp-stapling/"><u>OCSP staple</u></a> to demonstrate a certificate hasn’t been revoked.</p><p>Thus, we’re looking at a minimum of five signatures (not counting the OCSP staple) and two public keys transmitted across the network to establish a new TLS connection.</p>
    <div>
      <h3>Tailoring</h3>
      <a href="#tailoring">
        
      </a>
    </div>
    <p>Only the handshake transcript signature is created <i>online</i>; the other signatures are “offline”. That is, they are created ahead of time. For these offline signatures, fast verification is much more important than fast signing. On the other hand, for the handshake signature, we want to minimize the sum of signing and verification time.</p><p>Only the public keys of the leaf and intermediate certificates are transmitted on the wire during the handshake, and for those we want to minimize the combined size of the signature and the public key. For the other signatures, the public key is not transmitted during the handshake, and thus a scheme with larger public keys would be tolerable, and preferable if it trades larger public keys for smaller signatures.</p>
    <div>
      <h2>The algorithms</h2>
      <a href="#the-algorithms">
        
      </a>
    </div>
    <p>Now that we’re up to speed, let’s have a look at the candidates that progressed (marked by 🤔 below), compared to the classical algorithms vulnerable to quantum attack (marked by ❌), and the post-quantum algorithms that are already standardized (✅) or soon will be (📝). Each submission proposes several variants. We list the most relevant variants to TLS from each submission. To explore all variants, check out <a href="https://research.cloudflare.com/outreach/academic-programs/interns/thom-wiggers/"><u>Thom Wigger</u></a>’s <a href="https://pqshield.github.io/nist-sigs-zoo/"><u>signatures zoo</u></a>.</p>
<div><table><thead>
  <tr>
    <th></th>
    <th></th>
    <th></th>
    <th><span>Sizes (bytes)</span></th>
    <th><span>CPU time (lower is better)</span></th>
  </tr></thead>
<tbody>
  <tr>
    <td><span>Family</span></td>
    <td><span>Name variant</span></td>
    <td></td>
    <td><span>Public key</span></td>
    <td><span>Signature</span></td>
    <td><span>Signing</span></td>
    <td><span>Verification</span></td>
  </tr>
  <tr>
    <td><span>Elliptic curves</span></td>
    <td><span>Ed25519</span></td>
    <td><span>❌</span></td>
    <td><span>32</span></td>
    <td><span>64</span></td>
    <td><span>0.15</span></td>
    <td><span>1.3</span></td>
  </tr>
  <tr>
    <td><span>Factoring</span></td>
    <td><span>RSA<small> 2048</small></span></td>
    <td><span>❌</span></td>
    <td><span>256</span></td>
    <td><span>256</span></td>
    <td><span>80</span></td>
    <td><span>0.4</span></td>
  </tr>
  <tr>
    <td><span>Lattices</span></td>
    <td><span>ML-DSA <small>44</small></span></td>
    <td><span>✅</span></td>
    <td><span>1,312</span></td>
    <td><span>2,420</span></td>
    <td><span>1 (baseline)</span></td>
    <td><span>1 (baseline)</span></td>
  </tr>
  <tr>
    <td><span>Symmetric</span></td>
    <td><span>SLH-DSA <small>128s</small></span></td>
    <td><span>✅</span></td>
    <td><span>32</span></td>
    <td><span>7,856</span></td>
    <td><span>14,000</span></td>
    <td><span>40</span></td>
  </tr>
  <tr>
    <td><span>SLH-DSA <small>128f</small></span></td>
    <td><span>✅</span></td>
    <td><span>32</span></td>
    <td><span>17,088</span></td>
    <td><span>720</span></td>
    <td><span>110</span></td>
  </tr>
  <tr>
    <td><span>LMS <small>M4_H20_W8</small></span></td>
    <td><span>✅</span></td>
    <td><span>48</span></td>
    <td><span>1,112</span></td>
    <td><span>2.9</span> ⚠️</td>
    <td><span>8.4</span></td>
  </tr>
  <tr>
    <td><span>Lattices</span></td>
    <td><span>Falcon <small>512</small></span></td>
    <td><span>📝</span></td>
    <td><span>897</span></td>
    <td><span>666</span></td>
    <td><span>3 ⚠️</span></td>
    <td><span>0.7</span></td>
  </tr>
  <tr>
    <td><span>Codebased</span></td>
    <td><span>CROSS <small>R-SDP(G)1 small</small></span></td>
    <td><span>🤔</span></td>
    <td><span>38</span></td>
    <td><span>7,956</span></td>
    <td><span>20</span></td>
    <td><span>35</span></td>
  </tr>
  <tr>
    <td><span>LESS <small>1s</small></span></td>
    <td><span>🤔</span></td>
    <td><span>97,484</span></td>
    <td><span>5,120</span></td>
    <td><span>620</span></td>
    <td><span>1800</span></td>
  </tr>
  <tr>
    <td><span>MPC in the head</span></td>
    <td><span>Mirath <small>Mirith Ia fast</small></span></td>
    <td><span>🤔</span></td>
    <td><span>129</span></td>
    <td><span>7,877</span></td>
    <td><span>25</span></td>
    <td><span>60</span></td>
  </tr>
  <tr>
    <td><span>MQOM <small>L1-gf251-fast</small></span></td>
    <td><span>🤔</span></td>
    <td><span>59</span></td>
    <td><span>7,850</span></td>
    <td><span>35</span></td>
    <td><span>85</span></td>
  </tr>
  <tr>
    <td><span>PERK <small>I-fast5</small></span></td>
    <td><span>🤔</span></td>
    <td><span>240</span></td>
    <td><span>8,030</span></td>
    <td><span>20</span></td>
    <td><span>40</span></td>
  </tr>
  <tr>
    <td><span>RYDE <small>128F</small></span></td>
    <td><span>🤔</span></td>
    <td><span>86</span></td>
    <td><span>7,446</span></td>
    <td><span>15</span></td>
    <td><span>40</span></td>
  </tr>
  <tr>
    <td><span>SDitH <small>gf251-L1-hyp</small></span></td>
    <td><span>🤔</span></td>
    <td><span>132</span></td>
    <td><span>8,496</span></td>
    <td><span>30</span></td>
    <td><span>80</span></td>
  </tr>
  <tr>
    <td><span>VOLE in the head</span></td>
    <td><span>FAEST <small>EM-128f</small></span></td>
    <td><span>🤔</span></td>
    <td><span>32</span></td>
    <td><span>5,696</span></td>
    <td><span>6</span></td>
    <td><span>18</span></td>
  </tr>
  <tr>
    <td><span>Lattices</span></td>
    <td><span>HAWK <small>512</small></span></td>
    <td><span>🤔</span></td>
    <td><span>1,024</span></td>
    <td><span>555</span></td>
    <td><span>0.25</span></td>
    <td><span>1.2</span></td>
  </tr>
  <tr>
    <td><span>Isogeny</span></td>
    <td><span>SQISign <small>I</small></span></td>
    <td><span>🤔</span></td>
    <td><span>64</span></td>
    <td><span>177</span></td>
    <td><span>17,000</span></td>
    <td><span>900</span></td>
  </tr>
  <tr>
    <td><span>Multivariate</span></td>
    <td><span>MAYO <small>one</small></span></td>
    <td><span>🤔</span></td>
    <td><span>1,168</span></td>
    <td><span>321</span></td>
    <td><span>1.4</span></td>
    <td><span>1.4</span></td>
  </tr>
  <tr>
    <td><span>MAYO <small>two</small></span></td>
    <td><span>🤔</span></td>
    <td><span>5,488</span></td>
    <td><span>180</span></td>
    <td><span>1.7</span></td>
    <td><span>0.8</span></td>
  </tr>
  <tr>
    <td><span>QR-UOV <small>I-(31,165,60,3)</small></span></td>
    <td><span>🤔</span></td>
    <td><span>23,657</span></td>
    <td><span>157</span></td>
    <td><span>75</span></td>
    <td><span>125</span></td>
  </tr>
  <tr>
    <td><span>SNOVA <small>(24,5,4)</small></span></td>
    <td><span>🤔</span></td>
    <td><span>1,016</span></td>
    <td><span>248</span></td>
    <td><span>0.9</span></td>
    <td><span>1.4</span></td>
  </tr>
  <tr>
    <td><span>SNOVA <small>(25,8,3)</small></span></td>
    <td><span>🤔</span></td>
    <td><span>2,320</span></td>
    <td><span>165</span></td>
    <td><span>0.9</span></td>
    <td><span>1.8</span></td>
  </tr>
  <tr>
    <td><span>SNOVA <small>(37,17,2)</small></span></td>
    <td><span>🤔</span></td>
    <td><span>9,842</span></td>
    <td><span>106</span></td>
    <td><span>1</span></td>
    <td><span>1.2</span></td>
  </tr>
  <tr>
    <td><span>UOV <small>Is-pkc</small></span></td>
    <td><span>🤔</span></td>
    <td><span>66,576</span></td>
    <td><span>96</span></td>
    <td><span>0.3</span></td>
    <td><span>2.3</span></td>
  </tr>
  <tr>
    <td><span>UOV <small>Ip-pkc</small></span></td>
    <td><span>🤔</span></td>
    <td><span>43,576</span></td>
    <td><span>128</span></td>
    <td><span>0.3</span></td>
    <td><span>0.8</span></td>
  </tr>
</tbody></table></div><p>Some notes about the table. It compares selected variants of the submissions progressed to the second round of the NIST PQC signature on ramp with earlier existing traditional and post-quantum schemes at the security level of AES-128. CPU times are taken from the <a href="https://pqshield.github.io/nist-sigs-zoo/"><u>signatures zoo</u></a>, which collected them from the submission documents and some later advances. CPU performance varies significantly by platform and implementation, and should only be taken as a rough indication. We are early in the competition, and the on-ramp schemes will evolve: some will improve drastically (both in compute and size), whereas others will regress to counter new attacks. Check out <a href="https://pqshield.github.io/nist-sigs-zoo/"><u>the zoo</u></a> for the latest numbers. We marked Falcon signing with a <i>⚠️</i>, as Falcon signing is hard to implement in a fast and timing side-channel secure manner. LMS signing has a ⚠️, as secure LMS signing requires keeping a state and the listed signing time assumes a 32MB cache. This will be discussed later on.</p><p>These are a lot of algorithms, and we didn’t even list all variants. One thing is clear: none of them perform as well as classical elliptic curve signatures across the board. Let’s start with NIST’s 2022 picks.</p>
    <div>
      <h3>ML-DSA, SLH-DSA, and Falcon</h3>
      <a href="#ml-dsa-slh-dsa-and-falcon">
        
      </a>
    </div>
    <p>The most viable general purpose post-quantum signature scheme standardized today is the lattice-based <b>ML-DSA</b> (<a href="https://nvlpubs.nist.gov/nistpubs/fips/nist.fips.204.pdf"><u>FIPS 204</u></a>), which started its life as <a href="https://pq-crystals.org/dilithium/index.shtml"><u>Dilithium</u></a>. It’s light on the CPU and reasonably straightforward to implement. The big downside is that its signatures and public keys are large: 2.4kB and 1.3kB respectively. Here and for the balance of the blog post, we will only consider the variants at the AES-128 security level unless stated otherwise. Adding ML-DSA, adds 14.7kB to the TLS handshake (two 1312-byte public keys plus five 2420-byte signatures).</p><p><b>SLH-DSA</b> (<a href="https://nvlpubs.nist.gov/nistpubs/fips/nist.fips.205.pdf"><u>FIPS 205</u></a>, née <a href="https://sphincs.org/"><u>SPHINCS</u><u><sup>+</sup></u></a>) looks strictly worse, adding 39kB and significant computational overhead for both signing and verification. The advantage of SLH-DSA, being solely based on hashes, is that its security is much better understood than ML-DSA. The lowest security level of SLH-DSA is generally more trusted than the highest security levels of many other schemes.</p><p><a href="https://falcon-sign.info/"><b><u>Falcon</u></b></a> (to be renamed <a href="https://www.nist.gov/news-events/news/2024/08/nist-releases-first-3-finalized-post-quantum-encryption-standards"><u>FN-DSA</u></a>) seems much better than SLH-DSA and ML-DSA if you look only at the numbers in the table. There is a catch though. For fast signing, Falcon requires fast floating-point arithmetic, which turns out to be <a href="https://blog.cloudflare.com/nist-post-quantum-surprise/#digital-signatures"><u>difficult to implement securely</u></a>. Signing can be performed securely with emulated floating-point arithmetic, but that makes it roughly twenty times slower. This makes Falcon ill-suited for online signatures. Furthermore, the signing procedure of Falcon is complicated to implement. On the other hand, Falcon verification is simple and doesn’t require floating-point arithmetic.</p><p>Leaning into Falcon’s strength, by using ML-DSA for the handshake signature, and Falcon for the rest, we’re only adding 7.3kB (at security level of AES-128).</p><p>There is one more difficulty with Falcon worth mentioning: it’s missing a middle security level. That means that if Falcon-512 (which we considered so far) turns out to be weaker than expected, then the next one up is Falcon-1024, which has double signature and public key size. That amounts to adding about 11kB.</p>
    <div>
      <h3>Stateful hash-based signatures</h3>
      <a href="#stateful-hash-based-signatures">
        
      </a>
    </div>
    <p>The very first post-quantum signature algorithms standardized are the stateful hash-based <a href="https://datatracker.ietf.org/doc/html/rfc8391"><u>XMSS</u><u><sup>(MT)</sup></u></a> and <a href="https://datatracker.ietf.org/doc/html/rfc8554#page-45"><u>LMS/HSS</u></a>. These are hash-based signatures, similar to SLH-DSA, and so we have a lot of trust in their security. They come with a big drawback: when creating a keypair you prepare a finite number of <i>signature slots</i>. For the variant listed in the table, there are about one million slots. Each slot can only be used once. If by accident a slot is used twice, then anyone can (<a href="https://eprint.iacr.org/2016/1042"><u>probably</u></a>) use those two signatures to forge any new signature from that slot and break into the connection the certificate is supposed to protect. Remembering which slots have been used, is the <i>state</i> in <i>stateful</i> hash-based signature. Certificate authorities might be able to keep the state, but for general use, Adam Langley calls keeping the state a <a href="https://www.imperialviolet.org/2013/07/18/hashsig.html"><u>huge foot-cannon</u></a>.</p><p>There are more quirks to keep in mind for stateful hash-based signatures. To start, during key generation, each slot needs to be prepared. Preparing each slot takes approximately the same amount of time as verifying a signature. Preparing all million takes a couple of hours on a single core. For intermediate certificates of a popular certificate authority, a million slots are not enough. Indeed, Let’s Encrypt issues more than <a href="https://letsencrypt.org/stats/"><u>four million certificates per day</u></a>. Instead of increasing the number of slots directly, we can use an extra intermediate. This is what XMSS<sup>MT</sup> and HSS do internally. A final quirk of stateful hash-based signatures is that their security is bottlenecked on non-repudiation: the listed LMS instance has 192 bits of security against forgery, but only 96 bits against the signer themselves creating a single signature that verifies two different messages.</p><p>Even when stateful hash-based signatures or Falcon can be used, we are still adding a lot of bytes on the wire. From <a href="https://blog.cloudflare.com/sizing-up-post-quantum-signatures/"><u>earlier experiments</u></a> we know that that will impact performance significantly. We summarize those findings later in this blog post, and share some new data. The short of it: it would be nice to have a post-quantum signature scheme that outperforms Falcon, or at least outperforms ML-DSA and is easier to deploy. This is one of the reasons NIST is running the second competition.</p><p>With that in mind, let’s have a look at the candidates.</p>
    <div>
      <h3>Structured lattice alternatives</h3>
      <a href="#structured-lattice-alternatives">
        
      </a>
    </div>
    <p>With only performance in mind, it is surprising that half of the candidates do worse than ML-DSA. There is a good reason for it: NIST is worried that we’re putting all our eggs in the structured lattices basket. SLH-DSA is an alternative to lattices today, but it doesn’t perform well enough for many applications. As such, NIST <a href="https://csrc.nist.gov/csrc/media/Projects/pqc-dig-sig/documents/call-for-proposals-dig-sig-sept-2022.pdf"><u>would primarily like to standardize</u></a> another general purpose signature algorithm that is not based on structured lattices, and that outperforms SLH-DSA. We will briefly touch upon these schemes here.</p>
    <div>
      <h4>Code-based</h4>
      <a href="#code-based">
        
      </a>
    </div>
    <p><a href="https://www.cross-crypto.com/"><u>CROSS</u></a> and <a href="https://www.less-project.com/#:~:text=LESS%20(Linear%20Equivalence%20Signature%20Scheme,the%20Linear%20Code%20Equivalence%20problem."><u>LESS</u></a> are two<b> code-based signature</b> schemes. <b>CROSS</b> is based on a variant of the traditional syndrome decoding problem. Its signatures are about as large as SLH-DSA, but its edge over SLH-DSA is the much better signing times. <b>LESS</b> is based on the novel <a href="https://eprint.iacr.org/2023/847"><u>linear equivalence problem</u></a>. It only outperforms SLH-DSA on signature size, requiring larger public keys in return. For use in TLS, the high verification times of LESS are especially problematic. Given that LESS is based on a new approach, it will be interesting to see how much it can improve going forward.</p>
    <div>
      <h4>Multi-party computation in the head</h4>
      <a href="#multi-party-computation-in-the-head">
        
      </a>
    </div>
    <p>Five of the submissions (<a href="https://pqc-mira.org/"><u>Mira</u></a><a href="https://pqc-mirith.org/"><u>th</u></a>, <a href="https://mqom.org/"><u>MQOM</u></a>, <a href="https://pqc-perk.org/"><u>PERK</u></a>, <a href="https://pqc-ryde.org/"><u>RYDE</u></a>, <a href="https://sdith.org/"><u>SDitH</u></a>) use the <b>Multi-Party Computation in the Head</b> (MPCitH) paradigm.</p><p>It has been exciting to see the developments in this field. To explain a bit about it, let’s go back to <a href="https://microsoft.github.io/Picnic/"><u>Picnic</u></a>. Picnic was an MPCitH submission to the previous NIST PQC competition. In essence, its private key is a random key <i>x</i>, and its public key is the hash <i>H(x)</i>. A signature is a zero-knowledge proof demonstrating that the signer knows <i>x</i>. So far, it’s pretty similar in shape to other signature schemes that use zero knowledge proofs. The difference is in how that proof is created. We have to talk about multi-party computation (MPC) first. MPC starts with splitting the key <i>x</i> into shares, using <a href="https://en.wikipedia.org/wiki/Shamir%27s_secret_sharing"><u>Shamir secret sharing</u></a> for instance, and giving each party one share. No single party knows the value of <i>x</i> itself, but they can recover it by recombining. The insight of MPC is that these parties (with some communication) can perform arbitrary computation on the data they shared. In particular, they can compute a secret share of <i>H(x)</i>. Now, we can use that to make a zero-knowledge proof as follows. The signer simulates all parties in the multi-party protocol to compute and recombine <i>H(x)</i>. The signer then reveals part of the intermediate values of the computation using <a href="https://en.wikipedia.org/wiki/Fiat%E2%80%93Shamir_heuristic"><u>Fiat–Shamir</u></a>: enough so that none of the parties could have cheated on any of the steps, but not enough that it allows the verifier to figure out <i>x</i> themselves.</p><p>For <i>H</i>, Picnic uses <a href="https://lowmc.github.io/"><u>LowMC</u></a>, a block cipher for which it’s easy to do the multi-party computation. The initial submission of Picnic performed poorly compared to SLH-DSA with 32kB signatures. For the second round, Picnic was improved considerably, boasting 12kB signatures. SLH-DSA won out with smaller signatures, and more conservative security assumptions: Picnic relies on LowMC which didn’t receive as much study as the hashes on which SLH-DSA is based.</p><p>Back to the MPCitH candidates that progressed. All of them have variants (listed in the table) with similar or better signature sizes as SLH-DSA, while outperforming SLH-DSA considerably in signing time. There are variants with even smaller signatures, but their verification performance is significantly higher. The difference between the MPCitH candidates is the underlying <a href="https://en.wikipedia.org/wiki/Trapdoor_function"><u>trapdoor</u></a> they use. In Picnic the trapdoor was LowMC. For both RYDE and SDiTH, the trapdoors used are based on variants of <a href="https://en.wikipedia.org/wiki/Decoding_methods#Syndrome_decoding"><u>syndrome decoding</u></a>, and could be classified as code-based cryptography.</p><p>Over the years, MPCitH schemes have seen remarkable improvements in performance, and we don’t seem to have reached the end of it yet. There is still some way to go before these schemes would be competitive in TLS: signature size needs to be reduced without sacrificing the currently borderline acceptable verification performance. On top of that, not all underlying trapdoors of the various schemes have seen enough scrutiny.</p>
    <div>
      <h4>FAEST</h4>
      <a href="#faest">
        
      </a>
    </div>
    <p><a href="https://faest.info/"><u>FAEST</u></a> is a peek into the future. It’s similar to the MPCitH candidates in that its security reduces to an underlying trapdoor. It is quite different from those in that FAEST’s underlying trapdoor is AES. That means that, given the security analysis of FAEST is correct, it’s on the same footing as SLH-DSA. Despite the conservative trapdoor, FAEST beats the MPCitH candidates in performance. It also beats SLH-DSA on all metrics.</p><p>At the AES-128 security level, FAEST’s signatures are larger than ML-DSA. For those that want to hedge against improvements in lattice attacks, and would only consider higher security levels of ML-DSA, FAEST becomes an attractive alternative. ML-DSA-65 has a combined public key and signature size of 5.2kB, which is similar to FAEST EM-128f. ML-DSA-65 still has a slight edge in performance.</p><p>FAEST is based on the 2023 <a href="https://eprint.iacr.org/2023/996.pdf"><u>VOLE in the Head</u></a> paradigm. These are new ideas, and it seems likely their full potential has not been realized yet. It is likely that FAEST will see improvements.</p><p>The VOLE in the Head techniques can and probably will be adopted by some of the MPCitH submissions. It will be interesting to see how far VOLEitH can be pushed when applied to less conservative trapdoors. Surpassing ML-DSA seems in reach, but Falcon? We will see.</p><p>Now, let’s move on to the submissions that surpass ML-DSA today.</p>
    <div>
      <h3>HAWK</h3>
      <a href="#hawk">
        
      </a>
    </div>
    <p><a href="https://hawk-sign.info/"><u>HAWK</u></a> is similar to Falcon, but improves upon it in a few key ways. Most importantly, it doesn’t rely on floating point arithmetic. Furthermore, its signing procedure is simpler and much faster. This makes HAWK suitable for online signatures. Using HAWK adds 4.8kB. Apart from size and speed, it’s beneficial to rely on only a single scheme: using multiple schemes increases the attack surface for algorithmic weaknesses and implementation mistakes.</p><p>Similar to Falcon, HAWK is missing a middle security level. Using HAWK-1024 doubles sizes (9.6kB).</p><p>There is one downside to HAWK over Falcon: HAWK relies on a new security assumption, the <a href="https://eprint.iacr.org/2021/1332.pdf"><u>lattice isomorphism problem</u></a>.</p>
    <div>
      <h3>SQISign</h3>
      <a href="#sqisign">
        
      </a>
    </div>
    <p><a href="https://sqisign.org/"><u>SQISign</u></a> is based on <a href="https://blog.cloudflare.com/sidh-go/"><u>isogenies</u></a>. Famously, SIKE, another isogeny-based scheme in the previous competition, got <a href="https://eprint.iacr.org/2022/975.pdf"><u>broken badly</u></a> late into the competition. SQISign is based on a different problem, though. SQISign is remarkable for having very small signatures and public keys: it even beats RSA-2048. The glaring downside is that it is computationally very expensive to compute and verify a signature. Isogeny-based signature schemes is a very active area of research with many advances over the years.</p><p>It seems unlikely that any future SQISign variant will sign fast enough for the TLS handshake signature. Furthermore, SQISign signing seems to be hard to implement in a timing side-channel secure manner. What about the other signatures of TLS? The bottleneck is verification time. It would be acceptable for SQISign to have larger signatures, if that allows it to have faster verification time.</p>
    <div>
      <h3>UOV</h3>
      <a href="#uov">
        
      </a>
    </div>
    <p><a href="https://www.uovsig.org/"><u>UOV</u></a> (unbalanced oil and vinegar) is an old multivariate scheme with large public keys (67kB), but small signatures (96 bytes). Furthermore, it has excellent signing and verification performance. These interesting size tradeoffs make it quite suited for use cases where the public key is known in advance.</p><p>If we use UOV in TLS for the SCTs and root CA, whose public keys are not transmitted when setting up the connection, together with ML-DSA for the others, we’re looking at 7.2kB. That’s a clear improvement over using ML-DSA everywhere, and a tad better than combining ML-DSA with Falcon.</p><p>When combining UOV with HAWK instead of ML-DSA, we’re looking at adding only 3.4kB. That’s better again, but only a marginal improvement over using HAWK everywhere (4.8kB). The relative advantage of UOV improves if the certificate transparency ecosystem moves towards requiring more SCTs.</p><p>For SCTs, the size of UOV public keys seems acceptable, as there are not that many certificate transparency logs at the moment. Shipping a UOV public key for hundreds of root CAs is more painful, but within reason. Even with <a href="https://blog.cloudflare.com/pq-2024/#leaving-out-intermediate-certificates"><u>intermediate suppression</u></a>, using UOV in each of the thousands of intermediate certificates does not make sense.</p>
    <div>
      <h3>Structured multivariate</h3>
      <a href="#structured-multivariate">
        
      </a>
    </div>
    <p>Since the original UOV, over the decades, many attempts have been made to add additional structure UOV, to get a better balance between the size of the signature and public key. Unfortunately many of these <i>structured multivariate</i> schemes, which include GeMMS and Rainbow, have been broken.</p><p>Let’s have a look at the multivariate candidates. The most interesting variant of <b>QR-UOV</b> for TLS has 24kB public keys and 157 byte signatures. The current verification times are unacceptably high, but there seems to be plenty of room for an improved implementation. There is also a variant with a 12kB public key, but its verification time needs to come down even further. In any case, the combined size QR-UOV’s public key and signatures remain large enough that it’s not a competitor of ML-DSA or Falcon. Instead, QR-UOV competes with UOV, where UOV’s public keys are unwieldy. Although QR-UOV hasn’t seen a direct attack yet, a similar scheme has recently been <a href="https://link.springer.com/chapter/10.1007/978-3-031-62746-0_9"><u>weakened</u></a> and another <a href="https://link.springer.com/chapter/10.1007/978-3-030-44223-1_18"><u>broken</u></a>.</p><p>Finally, we get to<b> </b><a href="https://snova.pqclab.org/"><b><u>SNOVA</u></b></a> and <a href="https://pqmayo.org/"><b><u>MAYO</u></b></a>. Although they’re based on a different technique, they have a lot of properties in common. To start, they have the useful property that they allow for a granular tradeoff between public key and signature size. This allows us to use a different variant optimized for whether we’re transmitting the public in the connection or not. Using MAYO<sub>one</sub> for the leaf and intermediate, and MAYO<sub>two</sub> for the others, adds 3.5kB. Similarly with SNOVA, we add 2.8kB. On top of that, both schemes have excellent signing and verification performance.</p><p>The elephant in the room is the security. During the end of the first round, a new <a href="https://www.jstage.jst.go.jp/article/jsiaml/15/0/15_53/_article"><u>generic attack</u></a> on underdefined multivariate systems prompted the MAYO team to <a href="https://groups.google.com/a/list.nist.gov/g/pqc-forum/c/jEKfDYUgdec/m/0UP_GNKSAwAJ"><u>tweak their parameters</u></a> slightly. SNOVA has been hit a bit harder by three attacks (<a href="https://dl.acm.org/doi/10.1145/3659467.3659900"><u>1</u></a>, <a href="https://eprint.iacr.org/2024/1297"><u>2</u></a>, <a href="https://eprint.iacr.org/2024/1770.pdf"><u>3</u></a>), but so far it seems that SNOVA’s parameters can be adjusted to compensate.</p><p>Ok, we had a look at all the candidates. What did we learn? There are some very promising algorithms that will reduce the number of bytes required on the wire compared to ML-DSA and Falcon. None of the practical ones will prevent us from adding any extra bytes to TLS. So, given that we must add some bytes: how many extra bytes are too many?</p>
    <div>
      <h2>How many added bytes are too many for TLS?</h2>
      <a href="#how-many-added-bytes-are-too-many-for-tls">
        
      </a>
    </div>
    <p>On average, around 15 million TLS connections are established with Cloudflare per second. Upgrading each to ML-DSA, would take 1.8Tbps, which is 0.6% of our current total network capacity. No problem so far. The question is how these extra bytes affect performance.</p><p>Back in 2021, we <a href="https://blog.cloudflare.com/sizing-up-post-quantum-signatures/"><u>ran a large-scale experiment</u></a> to measure the impact of big post-quantum certificate chains on connections to Cloudflare’s network over the open Internet. There were two important results. First, we saw a steep increase in the rate of client and middlebox failures when we added more than 10kB to existing certificate chains. Secondly, when adding less than 9kB, the slowdown in TLS handshake time would be approximately 15%. We felt the latter is workable, but far from ideal: such a slowdown is noticeable and people might hold off deploying post-quantum certificates before it’s too late.</p><p>Chrome is more cautious and set 10% as their target for maximum TLS handshake time regression. They <a href="https://dadrian.io/blog/posts/pqc-signatures-2024/#fnref:3"><u>report</u></a> that deploying post-quantum key agreement has already incurred a 4% slowdown in TLS handshake time, for the extra 1.1kB from server-to-client and 1.2kB from client-to-server. That slowdown is proportionally larger than the 15% we found for 9kB, but that could be explained by slower upload speeds than download speeds.</p><p>There has been pushback against the focus on TLS handshake times. One argument is that session resumption alleviates the need for sending the certificates again. A second argument is that the data required to visit a typical website dwarfs the additional bytes for post-quantum certificates. One example is this <a href="https://www.amazon.science/publications/the-impact-of-data-heavy-post-quantum-tls-1-3-on-the-time-to-last-byte-of-real-world-connections"><u>2024 publication</u></a>, where Amazon researchers have simulated the impact of large post-quantum certificates on data-heavy TLS connections. They argue that typical connections transfer multiple requests and hundreds of kilobytes, and for those the TLS handshake slowdown disappears in the margin.</p><p>Are session resumption and hundreds of kilobytes over a connection typical though? We’d like to share what we see. We focus on QUIC connections, which are likely initiated by browsers or browser-like clients. Of all QUIC connections with Cloudflare that carry at least one HTTP request, 37% are <a href="https://blog.cloudflare.com/even-faster-connection-establishment-with-quic-0-rtt-resumption/"><u>resumptions</u></a>, meaning that key material from a previous TLS connection is reused, avoiding the need to transmit certificates. The median number of bytes transferred from server-to-client over a resumed QUIC connection is 4.4kB, while the average is 395kB. For non-resumptions the median is 7.8kB and average is 551kB. This vast difference between median and average indicates that a small fraction of data-heavy connections skew the average. In fact, only 15.8% of all QUIC connections transfer more than 100kB.</p><p>The median certificate chain today (with compression) is <a href="https://datatracker.ietf.org/doc/html/draft-ietf-tls-cert-abridge-02#section-4"><u>3.2kB</u></a>. That means that almost 40% of all data transferred from server to client on more than half of the non-resumed QUIC connections are just for the certificates, and this only gets worse with post-quantum algorithms. For the majority of QUIC connections, using ML-DSA as a drop-in replacement for classical signatures would more than double the number of transmitted bytes over the lifetime of the connection.</p><p>It sounds quite bad if the vast majority of data transferred for a typical connection is just for the post-quantum certificates. It’s still only a proxy for what is actually important: the effect on metrics relevant to the end-user, such as the browsing experience (e.g. <a href="https://web.dev/articles/optimize-lcp"><u>largest contentful paint</u></a>) and the amount of data those certificates take from a user’s monthly data cap. We will continue to investigate and get a better understanding of the impact.</p>
    <div>
      <h2>Zooming out</h2>
      <a href="#zooming-out">
        
      </a>
    </div>
    <p>That was a lot — let’s step back.</p><p>It’s great to see how much better the post-quantum signature algorithms are today in almost every family than they were in <a href="https://blog.cloudflare.com/sizing-up-post-quantum-signatures/"><u>2021</u></a>. The improvements haven’t slowed down either. Many of the algorithms that do not improve over ML-DSA for TLS today could still do so in the third round. Looking back, we are also cautioned: several algorithms considered in 2021 have since been broken.</p><p>From an implementation and performance perspective for TLS today, HAWK, SNOVA, and MAYO are all clear improvements over ML-DSA and Falcon. They are also very new, and presently we cannot depend on them without a <a href="https://blog.cloudflare.com/pq-2024/#way-forward"><u>plan B</u></a>. UOV has been around a lot longer. Due to its large public key, it will not work on its own, but be a very useful complement to another general purpose signature scheme.</p><p>Even with the best performers out of the competition, the way we see TLS connections used today, suggest that drop-in post-quantum certificates will have a big impact on at least half of them.</p><p>In the meantime, we can also make plan B our plan A: there are several ways in which we can reduce the number of signatures used in TLS. We can leave out intermediate certificates (<a href="https://datatracker.ietf.org/doc/html/draft-kampanakis-tls-scas-latest"><u>1</u></a>, <a href="https://datatracker.ietf.org/doc/draft-ietf-tls-cert-abridge/"><u>2</u></a>, <a href="https://datatracker.ietf.org/doc/html/draft-davidben-tls-trust-expr-04#name-intermediate-elision"><u>3</u></a>). Another is to use a KEM <a href="https://kemtls.org/"><u>instead of a signature</u></a> for handshake authentication. We can even get rid of all the offline signatures with a more <a href="https://datatracker.ietf.org/doc/html/draft-davidben-tls-merkle-tree-certs-03"><u>ambitious redesign</u></a> for the <a href="https://www.youtube.com/watch?v=f8unMB2Qjho"><u>vast majority</u></a> of visits: a post-quantum Internet with fewer bytes on the wire! We’ve discussed these ideas at more length in a <a href="https://blog.cloudflare.com/pq-2024/#way-forward"><u>previous blog post</u></a>.</p><p>So what does this mean for the coming years? We will continue to work with browsers to understand the end user impact of large drop-in post-quantum certificates. When certificate authorities support them (our guess: 2026), we will add support for ML-DSA certificates <a href="https://blog.cloudflare.com/post-quantum-crypto-should-be-free/"><u>for free</u></a>. This will be opt-in until cryptographically relevant quantum computers are imminent, to prevent undue performance regression. In the meantime, we will continue to pursue larger changes to the WebPKI, so that we can bring full post-quantum security to the Internet without performance compromise.</p><p>We’ve talked a lot about certificates, but what we need to care about today is encryption. Along with many across industry, including the major browsers, we have deployed the post-quantum key agreement X25519MLKEM768 across the board, and you can make sure your connections with Cloudflare are already secured against harvest-now/decrypt-later. Visit <a href="http://pq.cloudflareresearch.com"><u>pq.cloudflareresearch.com</u></a> to learn how.</p> ]]></content:encoded>
            <category><![CDATA[Post-Quantum]]></category>
            <category><![CDATA[Research]]></category>
            <category><![CDATA[Cryptography]]></category>
            <category><![CDATA[TLS]]></category>
            <guid isPermaLink="false">3mOPXbiTgeQHBChx4vUuMs</guid>
            <dc:creator>Bas Westerbaan</dc:creator>
            <dc:creator>Luke Valenta</dc:creator>
        </item>
        <item>
            <title><![CDATA[A global assessment of third-party connection tampering]]></title>
            <link>https://blog.cloudflare.com/connection-tampering/</link>
            <pubDate>Thu, 05 Sep 2024 07:00:00 GMT</pubDate>
            <description><![CDATA[ Cloudflare brings visibility to the practice of connection tampering as observed from our global network. ]]></description>
            <content:encoded><![CDATA[ <p>Have you ever made a phone call, only to have the call cut as soon as it is answered, with no obvious reason or explanation? This analogy is the starting point for understanding connection tampering on the Internet and its impact. </p><p>We have <a href="https://research.cloudflare.com/publications/SundaraRaman2023/"><u>found</u></a> that 20 percent of all Internet connections are abruptly closed before any useful data can be exchanged. Essentially, every fifth call is cut before being used. As with a phone call, it can be challenging for one or both parties to know what happened. Was it a faulty connection? Did the person on the other end of the line hang up? Did a third party intervene to stop the call?  </p><p>On the Internet, Cloudflare is in a unique position to help figure out when a third party may have played a role. Our global network allows us to identify patterns that suggest that an external party may have intentionally tampered with a connection to prevent content from being accessed. Although they are often hard to decipher, the ways connections are abruptly closed give clues to what might have happened. Sources of tampering generally do not try to hide their actions, which leaves hints of their existence that we can use to identify detectable ‘signatures’ in the connection protocol. As we explain below, there are other protocol features that are less likely to be spoofed and that point to third party actions. We can use these hints to build signature patterns of connection tampering that can be recognized.</p><p>To be clear, there are many reasons a third party might tamper with a connection. Enterprises may tamper with outbound connections from their networks to prevent users from interacting with spam or phishing sites. ISPs may use connection tampering to enforce court or regulatory orders that demand website blocking to address copyright infringement or for other legal purposes. Governments may mandate large-scale censorship and information control. </p><p>Despite the fact that everyone knows it happens, no other large operation has previously looked at the use of connection tampering at scale and across jurisdictions. We think that creates a notable gap in understanding what is happening in the Internet ecosystem, and that shedding light on these practices is important for transparency and the long-term health of the Internet. So today, we’re proud to share a view of global connection tampering practices.</p><p>The full technical details were recently peer-reviewed and published in “<a href="https://research.cloudflare.com/publications/SundaraRaman2023/"><u>Global, Passive Detection of Connection Tampering</u></a>” at ACM SIGCOMM, with its <a href="https://youtu.be/RD73IgzQMFo?si=OWvNnlNNLalbhygV&amp;t=2984"><u>public presentation</u></a>. We’re also announcing a new <a href="https://radar.cloudflare.com/security-and-attacks#tcp-resets-and-timeouts"><u>dashboard</u></a> and <a href="https://developers.cloudflare.com/api/operations/radar-get-connection-tampering-summary"><u>API</u></a> on Cloudflare Radar that shows a near real-time view of specific connection timeout and reset events – the two mechanisms dominant in tampering experienced by users<b> </b>connecting to Cloudflare’s network globally.</p><p>To better understand our perspective, it helps to understand the nature of connection tampering and reasons we’re talking about it.</p>
    <div>
      <h2>Global insights for a global audience</h2>
      <a href="#global-insights-for-a-global-audience">
        
      </a>
    </div>
    <p>Evidence of connection tampering is visible in networks all around the world. We were initially shocked that, globally, about 20% of all connections to Cloudflare close unexpectedly before any useful data exchange occurs — consistent with connection tampering. Here is a snapshot of these anomalous connections seen by Cloudflare that, as of today, <a href="https://blog.cloudflare.com/tcp-resets-timeouts"><u>we’re sharing on Radar</u></a>.</p>
          <figure>
          <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/1nPz5Ulu2YS7eV6Hpmniwg/fa2537c949602d057dfa83a6a599f553/2544-2.png" />
          </figure><p><i><sub>via </sub></i><a href="https://radar.cloudflare.com/security-and-attacks?dateStart=2024-07-28&amp;dateEnd=2024-08-26#tcp-resets-and-timeouts"><i><sub>Cloudflare Radar</sub></i></a></p><p>It’s not all tampering, but some of it clearly is, as we describe in more detail below. The challenge is filtering through the noise to determine which anomalous connections can confidently be attributed to tampering.</p>
    <div>
      <h2>Macro-level analysis and validation</h2>
      <a href="#macro-level-analysis-and-validation">
        
      </a>
    </div>
    <p>In <a href="https://research.cloudflare.com/publications/SundaraRaman2023/"><u>our work</u></a> we identified 19 patterns of anomalous connections as being candidate signatures for connection tampering. From those, we found that 14 had been previously reported by active “on the ground” measurement efforts, which presented an opportunity for validation at macro-level: If we observe our tampering signatures from Cloudflare’s network in the same places others observe them from the ground, we could have greater confidence that the signatures capture true cases of connection tampering when observed elsewhere, where there has been no prior reporting. To mitigate the risk of confirmation bias from looking where tampering is known to exist, we decided to look everywhere at the same time.</p><p>Taking that approach, the figure below, taken from our peer-review <a href="https://research.cloudflare.com/publications/SundaraRaman2023/"><u>study</u></a>, is a visual side-by-side comparison of each of the 19 signatures. The data is taken from a two-week interval starting January 26, 2023. Within each signature column is the proportion of matching connections broken down by the country where the connection originated. For example, the column third from the right labeled with ⟨PSH → RST;RST<sub>0</sub>⟩ indicates that we almost exclusively observed that signature on connections from China. Overall, what we find is a mirror of known cases from public and prior reports, which is an indication that our methodology works.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/4w1iJCVyRwZdgblT7uk2tZ/53a3201f13cf1b4994db8f8a43b9d64b/2544-3.png" />
            
            </figure><p><i><sub></sub></i><a href="https://research.cloudflare.com/publications/SundaraRaman2023/"><i><sub><u>Figure 1</u></sub></i></a><i><sub>: Signature matching across countries: Each column is the total global number of connections matching a specific signature. Within each column is the proportion of connections initiations from individual countries matching that signature.</sub></i></p><p>Interestingly, by honing in on prevalence, and setting aside the raw number of signature matches, interesting patterns emerge. As a result of this data-driven perspective, unexpected macro-insights also emerge. If we focus on the three most populous countries in the world ranked by <a href="https://worldpopulationreview.com/country-rankings/internet-users-by-country"><u>number of Internet users</u></a>, connections from China contribute a substantial portion of matches across no fewer than 9 of the signatures. This is perhaps unsurprising, but reinforces prior studies that find evidence of the Great Firewall (GFW) being made of many <a href="https://research.cloudflare.com/publications/SundaraRaman2023/"><u>different deployments and implementations</u></a> of blocking mandates. Next, matches on connections from India also contribute substantially to nine 9 different signatures, five of which are in common with signatures where China matches feature highly. Looking at the third most populous, the United States, a visible if not substantial proportion of matches appear on all but two of the signatures.</p><p>A snapshot of signature distributions per-country, also taken from the peer-review <a href="https://research.cloudflare.com/publications/SundaraRaman2023/"><u>study</u></a>, appears below for a select set of countries. The global distribution is included for comparison. The dark gray portions marked ⟨SYN → ∅⟩ are included for completeness, but have more non-tampering alternative explanations than the others (for example, as result of a low-rate <a href="https://blog.cloudflare.com/the-rise-of-multivector-amplifications/"><u>SYN flood</u></a>).</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/57Dip4I995kVVjXAhQxMrH/da5414d088777c000551a66589b80c3f/2544-4.png" />
            
            </figure><p><a href="https://research.cloudflare.com/publications/SundaraRaman2023/"><sub><i><u>Figure 4</u></i></sub></a><sub><i>: Signature distribution per country: The percentage of connections originating from select countries (and globally) that match a particular signature, or are not tampered with.</i></sub></p><p>From this perspective we again observe patterns that match prior studies. We focus first on rates above the global average, and ignore the noisiest signature ⟨SYN → ∅⟩ in medium-gray; there are simply too many other explanations for a signature match at this earliest possible stage. Among all connections from Turkmenistan (TM), Russia (RU), Iran (IR), and China (CN), roughly 80%, 30%, 40%, and 30%, respectively, of those connections match a tampering signature. The data also reveals high signature match rates where no prior reports exist. For example, connections from Peru (PE) and Mexico (MX), match roughly 50% and 25%, respectively; <a href="https://blog.cloudflare.com/tcp-resets-timeouts"><u>analysis of individual networks</u></a> in these countries suggests a likely explanation is zero-rating in mobile and cellular networks, where an ISP allows access to certain resources (but not others) at no cost. If we look below the global average, Great Britain (GB), the United States (US), and Germany (DE), each match a signature on about 10% of connections.</p><p>The data makes clear that connection tampering is widespread, and close to many users, if not most. In many ways, it’s closer than most know. To explain why, we explain connection tampering with a very familiar communication tool, the telephone.</p>
    <div>
      <h2>Explaining tampering with telephone calls</h2>
      <a href="#explaining-tampering-with-telephone-calls">
        
      </a>
    </div>
    <p>Connection tampering is a way for a third party to block access to particular content. However, it’s not enough for the third party to know the <i>type</i> of content it wants to block. The third party can only block an identity by name. </p><p>Ultimately, connection tampering is possible only by accident – an unintended side effect of protocol design. On the Internet, the most common identity is the domain name. In a communication on the Internet, the domain name is most often transmitted in the “<a href="https://www.cloudflare.com/en-gb/learning/ssl/what-is-sni/"><u>server name indication (SNI)</u></a>” field in TLS – exposed in cleartext for all to see.</p><p>To understand why this matters, it helps to understand what connection tampering looks like in human-to-human communications without the Internet. The Internet itself looks and operates much like the postal system, which relies only on addresses and never on names. However, the way most people use the Internet is much more like the “<a href="https://en.wikipedia.org/wiki/Plain_old_telephone_service"><u>plain old telephone system</u></a>,” which <i>requires</i> names to succeed.</p><p>In the telephone system, a person first dials a phone number, <i>not</i> a name. The call is <code>connected</code> and usable only after the other side answers, and the caller hears a voice.  The caller asks for a name only <i>after</i> the call is connected. The call manifests in the system as energy signals that do not identify the communicating parties. Finally, after the call ends, a new call is required to communicate again.</p><p>On the Internet, a client such as a browser “establishes a connection.” Much like a telephone caller, it initiates a connection request to a server’s <code>number</code>, which is an IP address. The longest-standing “connection-oriented” protocol to connect two devices is called the <a href="https://cloudflare.tv/shows/this-week-in-net/this-week-in-net-50th-anniversary-of-the-tcp-paper/oZKEA4v4"><u>Transmission Control Protocol</u></a>, or TCP. The domain name is transmitted in isolation from the connection establishment, much like asking for a name once the phone is answered. The connections are “logical” identified by metadata that does not identify communicating parties. Finally, a new connection is established with each new visit to a website.</p>
          <figure>
          <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/1BzA3XvqopuaP1WSg0rK6X/fe39d77acdc14c1d984512dfdb01279c/2544-5.png" />
          </figure><p><sub><i>Comparison between a TCP connection and a telephone call</i></sub></p><p>What happens if a telephone company is required to prevent a call to some party? One option is to modify or manipulate phone directories so a caller can’t get the phone number they need to dial the phone that makes the call; this is the essence of <a href="https://www.cloudflare.com/en-gb/learning/access-management/what-is-dns-filtering/"><u>DNS filtering</u></a>. A second option is to block all calls to the phone number, but this inadvertently affects others, just like <a href="https://blog.cloudflare.com/consequences-of-ip-blocking/"><u>IP blocking</u></a> does.</p><p>Once a phone call is initiated, the only way for the telephone company to know <i>who</i> is being called is to listen in on the call and wait for the caller to say, “is so-and-so there?” or “can I speak with so-and-so?” Mobile and cellular calls are no exception. The idea that the number we call <i>is</i> the person who will answer is just an expectation – it has never been the reality. For example, a parent could get a number to give to their child, or a taxi company could leave the mobile phone with whomever is on-shift at the time. As a result, the telephone company <i>must listen in</i>. Once it hears a certain name it can cut the call; neither side would have any idea what has happened – this is the very definition of connection tampering on the Internet. </p><p>For the purpose of establishing a communication channel, phone calls and TCP connections are at least comparable, and arguably exactly the same – not least because the domain name is transmitted separately from establishing a connection.</p><p>Similarly, on the Internet, the only way for a third party to know the intended recipient of a connection is to “look inside” of packets as they are transmitted. Where a telephone company would have to listen for a name, a third party on the Internet waits to see something it does not like, most often a forbidden name. Recall from above the unintended side-effect of the protocol: the name is visible in the SNI, which is required to help encrypt the data communication. When that happens, the third party causes one or both devices to close the connection by either dropping messages or injecting specially-crafted messages that cause the communicating parties to abort the connection.</p><p>The mechanisms to trigger tampering begin with <a href="https://www.cloudflare.com/learning/security/what-is-next-generation-firewall-ngfw/"><u>deep packet inspection (DPI)</u></a>, which means looking into the data portions that lie beyond the address and other metadata belonging to the connection. It’s safe to say that this functionality does not come for free; whether it’s an ISP’s router or a parental proxy, DPI is an expensive operation that gets more expensive at large scale or high speed. </p><p>One last point worth mentioning is that weaknesses in telephone tampering similarly appear in connection tampering. For example, the sound of Jean and Gene are indistinguishable to any ear, despite being different names. Similarly, tampering with connections to Twitter’s short-form name “t.co” would also affect “microsoft.com” – and <a href="https://en.wikipedia.org/wiki/Internet_censorship_in_Russia#Deep_packet_inspection"><u>has</u></a>.</p>
    <div>
      <h2>A live view of tampering during Mahsa Amini protests</h2>
      <a href="#a-live-view-of-tampering-during-mahsa-amini-protests">
        
      </a>
    </div>
    <p>Before we delve deeply into the technical, there is one more motivation that is personal to many at Cloudflare. Transparency is important and the reason we started this work, but it was after seeing the data <i>during</i> the Mahsa Amini protests in Iran in 2022 that we committed internally to share the data on Radar. </p><p>The figure below is for connections from Iran during 17 days overlapping the protests. The plot-lines track individual signals of anomalous connections, including signatures of <a href="https://blog.cloudflare.com/passive-detection-of-connection-tampering"><u>different types</u></a> of connection tampering. This data pre-dates the Radar service, so we have elected to share this representation from the <a href="https://research.cloudflare.com/publications/SundaraRaman2023/"><u>peer-reviewed paper</u></a>. It was also the first visual example of the value of the data if it could be shared via Radar. 
</p>
          <figure>
          <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/3IKNhC2gLo7CeUQclssiuM/58300eccf981f132689ee75b57db8cb2/2544-6.png" />
          </figure><p><sub><i></i></sub><a href="https://research.cloudflare.com/publications/SundaraRaman2023/"><sub><i><u>Figure 8</u></i></sub></a><sub><i>: Signature match rates longitudinally in Iran during a period of nation-wide protests. (𝑥-axis is local time.)</i></sub></p><p></p><p>From the data there are two observations that stick out. First is the way that the lines appear stable before the protests, then increase after the protests began. Second is the variation between the lines over time, in particular the lines in light gray, dark purple, and dark green. Recall that each line is a different tampering signature, so the variation between lines suggests changes in the underlying causes – either the mechanisms at work, or the traffic that invokes them.</p><p>We emphasize that a signature match, alone, does not in itself mean there is tampering. However, in the case of Iran in 2022 there were public reports of blocking of various forms. The methods in use at the time, specifically <a href="https://www.cloudflare.com/en-gb/learning/ssl/what-is-sni/"><u>Server Name Indication (SNI)</u></a>-based blocking of access to content, had also previously been <a href="https://ooni.org/post/2020-iran-sni-blocking/"><u>well-documented</u></a>, and matched with our observations represented by the figure above.</p><p>What about today? Below we see the Radar view of the twelve months from August 2023 to August 2024. Each color represents a different stage of the connection where tampering might happen. In the previous 12 months, TCP connection anomalies in Iran are lower than the <a href="https://radar.cloudflare.com/security-and-attacks?dateStart=2024-08-01&amp;dateEnd=2024-08-08"><u>worldwide averages</u></a>, overall, but appear significantly higher in the portion of anomalies represented by the light-blue region. This “Post ACK” phase of communication is often associated with SNI-based blocking. (In the graph above, the relevant signatures are represented by the dark purple and dark green lines.) Alongside, the changing proportions of the different plot-lines since mid-December 2023 suggest that techniques have been changing over time.</p>
          <figure>
          <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/3qhesraWkFdNPbWgx2x0xX/1a72a1707e768270c29d570b5bd35545/2544-7.png" />
          </figure><p><i><sub>via </sub></i><a href="https://radar.cloudflare.com/security-and-attacks/ir?dateStart=2023-08-26&amp;dateEnd=2024-08-26#tcp-resets-and-timeouts"><i><sub>Cloudflare Radar</sub></i></a></p>
    <div>
      <h2>The importance of an open network measurement community</h2>
      <a href="#the-importance-of-an-open-network-measurement-community">
        
      </a>
    </div>
    <p>As a testament to the importance of open measurement and research communities, this work very literally “<a href="https://en.wikipedia.org/wiki/Standing_on_the_shoulders_of_giants">builds on the shoulders of giants</a>.” It was produced in collaboration with researchers at the <a href="https://www.cs.umd.edu/">University of Maryland</a>, <a href="https://www.epfl.ch/">École Polytechnique Fédérale de Lausanne</a>, and the <a href="https://cse.engin.umich.edu/">University of Michigan</a>, but does not exist in isolation. There have been extensive efforts to measure connection tampering, most of which comes from the censorship measurement community. The bulk of that work consists of <i>active</i> measurements, in which researchers craft and transmit probes in or along networks and regions to identify blocking behavior. Unsurprisingly, active measurement has both strengths and weaknesses, as described in <a href="https://research.cloudflare.com/publications/SundaraRaman2023/"><u>Section 2</u></a> in the paper). </p><p>The counterpart to active measurement, and the focus of our project, is <i>passive</i> measurement, which takes an “observe and do nothing” approach. Passive measurement comes with its own strengths and weaknesses but, crucially, it relies on having a good vantage point such as a large network operator. Each of active and passive measurements are most effective when working in conjunction, in this case helping to paint a more complete picture of the impact of connection tampering on users.</p><p>Most importantly, when embarking upon any type of measurement, great care must be taken to understand and <a href="https://cacm.acm.org/magazines/2016/10/207765-ethical-considerations-in-network-measurement-papers/fulltext"><u>evaluate the safety of the measurement</u></a> since the risk imposed on people and networks are often indirect, or hidden from view.</p>
    <div>
      <h2>Limitations of our data</h2>
      <a href="#limitations-of-our-data">
        
      </a>
    </div>
    <p>We have no doubt about the importance of being transparent with connection tampering, but we also need to be explicit about the limits on the insights that can be gleaned from the data. As passive observers of connections to the Cloudflare network – and only the Cloudflare network – we are only able to see or infer the following:</p><ol><li><p><b>Signs of connection tampering, but not where it happened.</b> Any software or device between the client’s application and the server systems can tamper with a connection. The list ranges from purpose-built systems, to firewalls in the enterprise or home broadband router, and protection software installed on home or school computers. <i>All we can infer is where the connection started</i> (albeit at the limits of geolocation inaccuracies inherent in the Internet’s design)<i>.</i></p></li><li><p><b>(Often, but not always) What triggered the tampering, but not why.</b> Typically, tampering systems are triggered by domain names, keywords, or regular expressions. With enough repetition, and manual inspection, it may be possible to identify the <i>likely</i> cause of tampering, but not the reasons. Many tampering system designs are prone to unintended consequences, among them the <a href="https://en.wikipedia.org/wiki/Internet_censorship_in_Russia#Deep_packet_inspection"><u>t.co</u></a> example mentioned above.</p></li><li><p><b>Who and what </b><b><i>is</i></b><b> affected, but not who or what </b><b><i>could</i></b><b> be affected.</b> As passive observers, there are limits on the kinds of inferences we can make. For example, observable tampering on 1000 out of 1001 connections to <code>example.com</code> suggests that tampering is likely on the next connection attempt. However, that says nothing about connections to <code>another-example.com</code>. </p></li></ol>
    <div>
      <h2>Data, data, data: Extracting signals from the noise</h2>
      <a href="#data-data-data-extracting-signals-from-the-noise">
        
      </a>
    </div>
    <p>If you just want to get and use the data on Radar, see our “<a href="https://blog.cloudflare.com/tcp-resets-timeouts"><u>how to</u></a>” guide. Otherwise, let’s understand the data itself.</p><p>The focus of this work is <a href="https://www.cloudflare.com/learning/ddos/glossary/tcp-ip/"><u>TCP</u></a>. In our data there are two mechanisms available to a third-party to force a connection to close: <a href="https://en.wikipedia.org/wiki/Packet_drop_attack"><u>dropping packets</u></a> to induce timeouts or <a href="https://en.wikipedia.org/wiki/TCP_reset_attack#TCP_resets"><u>injecting forged TCP RST packets</u></a>, each with various deployment choices. Individual tampering signatures may be reflections of those choices. For comparison, a graceful TCP close is initiated with a FIN packet. </p>
    <div>
      <h3>Connection tampering signatures</h3>
      <a href="#connection-tampering-signatures">
        
      </a>
    </div>
    <p>Our detection mechanism evaluates sets of packets in a connection against a set of <i>signatures</i> for connection tampering. The signatures are hand-crafted from signatures identified in prior work, and by analyzing samples of connections to Cloudflare’s network that we classify as <i>anomalous </i>– connections that close early, and ungracefully by way of a RST packet or timeout within the first 10 packets from the client. We analyzed the samples and found that 19 patterns accounted for 86.9% of all possibly tampered connections in the samples, shown in the table below.</p>
          <figure>
          <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/5LssSxT9SkDpXzMXtPmtZ1/a18e564cf39613bb7fe7569337d91b65/2544-8.png" />
          </figure><p><sub></sub><a href="https://research.cloudflare.com/publications/SundaraRaman2023/"><sub><u>Table 1</u></sub></a><sub>: The comprehensive set of tampering signatures we identify through global passive measurements.</sub></p><p></p><p>To help reason about tampering, we also classed the 19 signatures above according to the stage of the connection lifetime in which they appear. Each stage implies something about the middlebox, as described below alongside corresponding sequence diagrams:</p>
          <figure>
          <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/49GKWrmtfdg9Xpk0K2RiGJ/f0e755a2ba1fcac763a44185bf566f61/Screenshot_2024-09-04_at_2.57.52_PM.png" />
          </figure>
          <figure>
          <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/6xZbuENcYfkucNmVUJmwQv/b1f69b105c2e19eb9f5ef583d50416b8/Screenshot_2024-09-04_at_2.58.00_PM.png" />
          </figure><p></p><ul><li><p><b>(a) Post-SYN (mid-handshake)</b>: Tampering is likely triggered by the destination IP address because the middlebox has likely not seen application data, which is typically transmitted after the handshake completes.</p></li><li><p><b>(b) Post-ACK (immediately after handshake)</b>: The connection is established and immediately forced to close before seeing any data. It is possible, even likely, that the middlebox has likely seen a data packet; for example, the host header in HTTP or SNI field in TLS. </p></li><li><p><b>(c) Post-PSH (after first data packet)</b>: The middlebox has definitely seen the first data packet because the server has received it. The middlebox may have been waiting for a packet with a PSH flag, typically set to indicate data in the packet should be delivered to the application on receipt, without delay. The likely middlebox is likely a <a href="https://en.wikipedia.org/wiki/Man-on-the-side_attack"><u>monster-on-the-side</u></a> because it permits the offending packet to reach the destination.</p></li><li><p><b>(d) Later-in-flow (after multiple data packets)</b>: Tampering at later stages in the connection (not immediately after the first data packet, but still within the first 10 packets). The prevalence of encrypted data in TLS makes this the least likely stage for tampering to occur. The likely triggers are keywords appearing in cleartext later in (HTTP) connections, or by the likes of enterprise proxies and parental protection software that has visibility into encrypted traffic and can reset connections when certain keywords are encountered. </p></li></ul>
    <div>
      <h3>Accounting for alternative explanations</h3>
      <a href="#accounting-for-alternative-explanations">
        
      </a>
    </div>
    <p>How can we be confident that the signatures above detect middlebox tampering, and not just atypical client behavior? One of the challenges of passive measurement is that we do not have full visibility into the clients connecting to our network, so absolute positives are hard if not impossible. Instead, we look for strong positive evidence of tampering, that must first begin by identifying <b>false positives</b>. </p><p>We are aware of the following sources of false positives that can be hard to disambiguate from true sources of tampering. <i>All but the last occur in the first two stages</i> of the connection, before data packets are received. </p><ul><li><p><b>Scanners</b> are client-side applications that probe servers to elicit responses. Some scanner software uses fixed bits in the header to self-identify, which helps us filter. For example, we found that <a href="https://zmap.io/"><u>Zmap</u></a> accounts for approximately 1% of all <code>⟨SYN → RST⟩</code> signature matches.</p></li><li><p><b>SYN flood attacks</b> are another likely source of false positives, especially for signatures in the Post-SYN connection stage like the <code>⟨SYN → ∅⟩</code> and <code>⟨SYN → RST⟩</code> signatures. These are less likely to appear in our dataset collection, which happens <a href="https://www.cloudflare.com/learning/ddos/syn-flood-ddos-attack/https://www.cloudflare.com/learning/ddos/syn-flood-ddos-attack/"><u>after the DDoS protection</u></a> systems.</p></li><li><p><b>Happy Eyeballs</b> is a <a href="https://datatracker.ietf.org/doc/html/rfc8305"><u>common technique</u></a> used by dual-stack clients in which the client initiates an IPv6 connection to the server and, with some delay to favor IPv6, also makes an IPv4 connection. The client keeps the connection that succeeds first and drops the other. Clients that cease transmission or close the connection with a RST instead of a FIN would show up in the data, matching the <code>⟨SYN → RST⟩</code> signature. </p></li><li><p><b>Browser-triggered RSTs</b> may appear at any stage of the connection, but especially for signatures that match later in a connection (after multiple data packets). It might be triggered, for example, by a user closing a browser tab. Unlike targeted tampering, however, RSTs originating from browsers are unlikely to be biased towards specific services or websites. </p></li></ul><p>How can we separate legitimate client-initiated false positives from third-party tampering? We seek an evidence-based approach to distinguish tampering signatures from other signals within the dataset. For this we turn to individual bits in the packet headers.</p>
    <div>
      <h3>Signature validation – letting the data speak</h3>
      <a href="#signature-validation-letting-the-data-speak">
        
      </a>
    </div>
    <p>Signature matches in isolation are insufficient to make good determinations. Alongside, we can find further supporting evidence of their accuracy by examining connections in aggregate – if the cause is tampering, and tampering is targeted, then there must be other patterns or markers in common. For example, we expect browser behavior to appear worldwide; however, as we showed above, signatures that match on connections in only some places or some time intervals stick out. </p><p>Similarly, we expect certain characteristics in contiguous packets within a connection to also stick out, and indeed they do, namely in the <a href="https://datatracker.ietf.org/doc/html/rfc6864"><u>IP-ID</u></a> and <a href="https://www.cloudflare.com/learning/cdn/glossary/time-to-live-ttl/"><u>TTL</u></a> fields in the IP header.</p>
          <figure>
          <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/7CVNobND5JzSYY4rszgem9/6b533f5a3681cf8c4f05d6a6179c0630/Screenshot_2024-09-04_at_2.57.36_PM.png" />
          </figure><p><b>The IP-ID (IP identification) field</b> in the IPv4 packet header is usually a fixed per-connection value, often incremented by the client for each subsequent packet it sends. In other words, we expect the change in IP-ID value in subsequent packets sent from the same client to be small. Thus, large changes in IP-ID value between subsequent packets are unexpected in normal connections, and could be used as an indicator of packet injection. This is exactly what we see in the figure above, marked (a), for a select set of signatures.</p><p><b>The Time-to-Live (TTL) field </b>offers another clue for detecting injected packets. Here, too, most client implementations use the same <a href="https://www.cloudflare.com/learning/cdn/glossary/time-to-live-ttl/"><u>TTL</u></a> for each packet sent on a connection, usually set initially to either 64 or 128 and decremented by every router along the packet’s route. If a RST packet does not have the same TTL as other packets in a connection, it’s a strong signal that it was injected. Looking at the figure above, marked (b), we can see marked differences in TTLs, indicating the presence of a third party. </p><p>We strongly encourage readers to read the <a href="https://research.cloudflare.com/publications/SundaraRaman2023/"><u>underlying details</u></a> of how and why these make sense.  Connections with high maximum IP-ID and TTL differences give positive evidence for traffic tampering, but the <i>absence</i> of these signals does not necessarily mean that tampering did not occur, as some middleboxes are known to <a href="https://censoredplanet.org/assets/censorship-devices.pdf"><u>copy IP header values</u></a> including the IP-ID and TTL from the original packets in the connection. Our interest is in responsibly ensuring our dataset has indicative value.</p><p><b>There is one last caveat: </b>While our tampering signatures capture many forms of tampering, there is still potential for<b> false negatives</b> for connections that <i>were</i> tampered with but escaped our detection. Some examples are connections terminated after the first 10 packets (since we don’t sample that far), FIN injection (a less common alternative to RST injection), or connections where all packets are dropped before reaching Cloudflare’s servers. Our signatures also do not apply to <a href="https://www.cloudflare.com/learning/ddos/glossary/user-datagram-protocol-udp/"><u>UDP-based protocols</u></a> such as QUIC. We hope to expand the scope of our connection tampering signatures in the future.</p>
    <div>
      <h2>Case studies</h2>
      <a href="#case-studies">
        
      </a>
    </div>
    <p>To get a sense of how this looks on the Cloudflare network, below we provide further examples of TCP connection anomalies that are consistent with <a href="https://ooni.org/reports/"><u>OONI reports</u></a> of connection tampering.</p><p>For additional insights from this specific study, see the full technical <a href="https://research.cloudflare.com/publications/SundaraRaman2023/"><u>paper</u></a> and <a href="https://www.youtube.com/watch?v=DyDv3MHICto&amp;list=PLU4C2_kotFP2JAkoL6pcgbb52f6GIJJd7&amp;ab_channel=ACMSIGCOMM"><u>presentation</u></a>. For other regions and networks not listed below, please see the <a href="https://blog.cloudflare.com/tcp-resets-timeouts"><u>new data on Radar</u></a>.</p>
    <div>
      <h3>Pakistan</h3>
      <a href="#pakistan">
        
      </a>
    </div>
    <p>Reporting from <a href="https://tribune.com.pk/story/2491142/pakistan-should-be-transparent-about-internet-disruptions-surveillance-amnesty-international"><u>inside</u></a> Pakistan suggests changes in users’ Internet experience throughout August 2024. Taking a look at a two-week interval in early August, there is a significant shift in Post-ACK connection anomalies starting on August 9, 2024.</p>
          <figure>
          <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/38SPF52mjzVCDvEnO63hhu/c1a5e7b57d3f63bcf12349dbe7e1b377/2544-12.png" />
          </figure><p><sub><i>via </i></sub><a href="https://radar.cloudflare.com/security-and-attacks/pk?dateStart=2024-08-03&amp;dateEnd=2024-08-17#tcp-resets-and-timeouts"><sub><i>Cloudflare Radar</i></sub></a></p><p>The August 9 Post-ACK spike can be almost entirely attributed to <a href="https://radar.cloudflare.com/as56167"><u>AS56167 (Pak Telecom Mobile Limited)</u></a>, shown below in the first image, where Post-ACK anomalies jumped from under 5% to upwards of 70% of all connections, and has remained high since. Correspondingly, we see a significant reduction in the number of successful HTTP requests reaching Cloudflare’s network from clients in AS56167, below in the second image, which provides evidence that connections are being disrupted. This Pakistan example reinforces the importance of corroborating reports and observations, discussed in more detail in the <a href="https://blog.cloudflare.com/tcp-resets-timeouts"><u>Radar dataset release</u></a>.</p>
          <figure>
          <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/6y0WGCYjlvOhOurny2rN7p/6afbbd35e037beac32728f0e93b1fe17/2544-13.png" />
          </figure><p><sub><i>via </i></sub><a href="https://radar.cloudflare.com/security-and-attacks/AS56167?dateStart=2024-08-03&amp;dateEnd=2024-08-17#tcp-resets-and-timeouts"><sub><i>Cloudflare Radar</i></sub></a></p>
          <figure>
          <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/2aFE80hJQ5f6uJprUYFmEt/b79ffa0e1c8e30fcb57d9a8bb97c41b3/2544-14.png" />
          </figure><p><sub><i>via </i></sub><a href="https://radar.cloudflare.com/traffic/AS56167?dateStart=2024-08-03&amp;dateEnd=2024-08-17#http-traffic"><sub><i>Cloudflare Radar</i></sub></a></p>
    <div>
      <h3>Tanzania</h3>
      <a href="#tanzania">
        
      </a>
    </div>
    <p>A <a href="https://ooni.org/post/2024-tanzania-lgbtiq-censorship-and-other-targeted-blocks/"><u>OONI report</u></a> from April 2024 discusses targeted connection tampering in <a href="https://radar.cloudflare.com/tz"><u>Tanzania</u></a>. The report states that this blocking is observed on the client side as connection timeouts after the <a href="https://www.cloudflare.com/learning/ssl/what-happens-in-a-tls-handshake/"><u>Client Hello</u></a> message during the <a href="https://www.cloudflare.com/learning/ssl/what-happens-in-a-tls-handshake/"><u>TLS handshake</u></a>, indicating that a middlebox is dropping the packet containing the Client Hello message. On the server side, connections tampered with in this way would appear as Post-ACK timeouts as the PSH packet containing the Client Hello message never reaches the server.</p><p>Looking at the Post-ACK data represented in the light-blue portion, below, we find matching evidence: close to 30% of all new TCP connections from Tanzania appear as Post-ACK anomalies. Breaking this down further (not shown in the plots below), approximately one third is due to timeouts, consistent with the OONI report above. The remainder is due to RSTs.</p>
          <figure>
          <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/2IVvmuECBkPhL8xS7fdOcV/203ca4916a474d2c06f02d6a3f04d006/2544-15.png" />
          </figure><p><sub><i>via </i></sub><a href="https://radar.cloudflare.com/security-and-attacks/tz?dateStart=2024-07-24&amp;dateEnd=2024-08-20#tcp-resets-and-timeouts"><sub><i>Cloudflare Radar</i></sub></a></p><p></p>
    <div>
      <h3>Ethiopia</h3>
      <a href="#ethiopia">
        
      </a>
    </div>
    <p><a href="https://radar.cloudflare.com/et"><u>Ethiopia</u></a> is another location with <a href="https://ooni.org/post/2023-ethiopia-blocks-social-media/"><u>previously-reported</u></a> connection tampering. Consistent with this, we see elevated rates of Post-PSH TCP anomalies across networks in Ethiopia. Our internal data shows that the majority of Post-PSH anomalies in this case are due to RSTs, although timeouts are also prevalent.</p>
          <figure>
          <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/YTj7Kypiu0nSjmvZ00Jjo/b3306284a04a67d91351da645b6332f7/2544-16.png" />
          </figure><p><sub><i>via </i></sub><a href="https://radar.cloudflare.com/security-and-attacks/et?dateStart=2024-07-24&amp;dateEnd=2024-08-20#tcp-resets-and-timeouts"><sub><i>Cloudflare Radar</i></sub></a></p><p>The majority of traffic arriving to Cloudflare’s servers from IP addresses geolocated in Ethiopia is from <a href="https://radar.cloudflare.com/as24757"><u>AS24757 (Ethio Telecom)</u></a>, shown below in the first image, so it is perhaps unsurprising that its data closely matches the country-wide distribution of connection anomalies. The number of Post-PSH connections originating from <a href="https://radar.cloudflare.com/as328988"><u>AS328988 (SAFARICOM TELECOMMUNICATIONS ETHIOPIA PLC)</u></a>, shown below in the second image, are higher in proportion and account for over 33% of all connections from that network.</p>
          <figure>
          <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/43sDPBfmz2u2JIRIPN0htd/6e0825edaef48ba73df9180a30411231/2544-17.png" />
          </figure><p><sub>via </sub><a href="https://radar.cloudflare.com/security-and-attacks/AS24757?dateStart=2024-07-24&amp;dateEnd=2024-08-20#tcp-resets-and-timeouts"><sub>Cloudflare Radar</sub></a></p>
          <figure>
          <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/5fyguCauAPqdXYXkCvhjAl/7e86f97f2b71a73cbf3d8c95d27a92b1/2544-18.png" />
          </figure><p><sub>via </sub><a href="https://radar.cloudflare.com/security-and-attacks/AS328988?dateStart=2024-07-24&amp;dateEnd=2024-08-20#tcp-resets-and-timeouts"><sub><i>Cloudflare Radar</i></sub></a></p>
    <div>
      <h2>Reflecting on the present to promote a resilient future</h2>
      <a href="#reflecting-on-the-present-to-promote-a-resilient-future">
        
      </a>
    </div>
    <p>Connection tampering is a blocking mechanism that is deployed in various forms throughout the Internet. Although we have developed ways to help detect and understand it globally, the experience is just as individual as an interrupted phone call.</p><p>Connection tampering is also made possible <i>by accident</i>. It works because domain names are visible in cleartext. But it may not always be this way. For example, <a href="https://datatracker.ietf.org/doc/draft-ietf-tls-esni/"><u>Encrypted Client Hello (ECH)</u></a> is an emerging building block that encrypts the SNI field. </p><p>We’ll continue to look for ways to talk about network activity and disruption, all to foster wider conversations. Check out the newest additions about connection anomalies on <a href="https://radar.cloudflare.com/security-and-attacks#tcp-resets-and-timeouts"><u>Cloudflare Radar</u></a> and the <a href="https://blog.cloudflare.com/tcp-resets-timeouts"><u>corresponding blog post</u></a>, as well as the <a href="https://research.cloudflare.com/publications/SundaraRaman2023/"><u>peer-reviewed technical paper</u></a> and its <a href="https://youtu.be/RD73IgzQMFo?si=OWvNnlNNLalbhygV&amp;t=2984"><u>15-minute summary talk</u></a>.</p> ]]></content:encoded>
            <category><![CDATA[Radar]]></category>
            <category><![CDATA[Internet Traffic]]></category>
            <category><![CDATA[Internet Quality]]></category>
            <category><![CDATA[Research]]></category>
            <category><![CDATA[Trends]]></category>
            <category><![CDATA[Consumer Services]]></category>
            <guid isPermaLink="false">2PQ5yUYNh250JZfC8YuElJ</guid>
            <dc:creator>Ram Sundara Raman</dc:creator>
            <dc:creator>Luke Valenta</dc:creator>
            <dc:creator>Marwan Fayed</dc:creator>
        </item>
        <item>
            <title><![CDATA[Bringing insights into TCP resets and timeouts to Cloudflare Radar]]></title>
            <link>https://blog.cloudflare.com/tcp-resets-timeouts/</link>
            <pubDate>Thu, 05 Sep 2024 07:00:00 GMT</pubDate>
            <description><![CDATA[ New TCP resets and timeouts dataset on Cloudflare Radar surfaces connection tampering, scanning, DoS attacks, and more. ]]></description>
            <content:encoded><![CDATA[ <p>Cloudflare handles over 60 million HTTP requests per second globally, with <a href="https://radar.cloudflare.com/adoption-and-usage"><u>approximately 70%</u></a> received over <a href="https://datatracker.ietf.org/doc/html/rfc9293"><u>TCP</u></a> connections (the remaining are <a href="https://datatracker.ietf.org/doc/html/rfc9000"><u>QUIC</u></a>/<a href="https://datatracker.ietf.org/doc/html/rfc768"><u>UDP</u></a>). Ideally, every new TCP connection to Cloudflare would carry at least one request that results in a successful data exchange, but that is far from the truth. In reality, we find that, globally, <a href="https://radar.cloudflare.com/security-and-attacks/#tcp-resets-and-timeouts"><u>approximately 20%</u></a> of new TCP connections to Cloudflare’s servers time out or are closed with a TCP “abort” message either before any request can be completed or immediately after an initial request.</p><p>This post explores those connections that, for various reasons, appear to our servers to have been halted unexpectedly before any useful data exchange occurs. Our work reveals that while connections are normally ended by clients, they can also be closed due to third-party interference. Today we’re excited to launch a new <a href="https://radar.cloudflare.com/security-and-attacks#tcp-resets-and-timeouts"><u>dashboard</u></a> and <a href="https://developers.cloudflare.com/api/operations/radar-get-tcp-resets-timeouts-summary"><u>API endpoint</u></a> on Cloudflare Radar that shows a near real-time view of TCP connections to Cloudflare’s network that terminate within the first 10 ingress packets due to resets or timeouts, which we’ll refer to as <i>anomalous</i> TCP connections in this post. Analyzing this anomalous behavior provides insights into scanning, connection tampering, DoS attacks, connectivity issues, and other behaviors.</p><p>Our ability to generate and share this data via Radar follows from a global investigation into <a href="https://blog.cloudflare.com/connection-tampering"><u>connection tampering</u></a>. Readers are invited to read the technical details in the peer-review <a href="https://research.cloudflare.com/publications/SundaraRaman2023/"><u>study</u></a>, or see its <a href="https://youtu.be/RD73IgzQMFo?si=OWvNnlNNLalbhygV&amp;t=2984"><u>corresponding presentation</u></a>. Read on for a primer on how to use and interpret the data, as well as how we designed and deployed our detection mechanisms so that others might replicate our approach.</p><p>To begin, let’s discuss our classification of normal vs anomalous TCP connections.</p>
    <div>
      <h2>TCP connections from establishment to close</h2>
      <a href="#tcp-connections-from-establishment-to-close">
        
      </a>
    </div>
    <p>The Transmission Control Protocol (TCP) is a protocol for reliably transmitting data between two hosts on the Internet (<a href="https://datatracker.ietf.org/doc/rfc9293/"><u>RFC 9293</u></a>). A TCP connection passes through several distinct stages, from connection establishment, to data transfer, to connection close.</p><p>A TCP connection is established with a 3-way handshake. The handshake begins when one party, called the client, sends a packet marked with the ‘SYN’ flag to initialize the connection process. The server responds with a “SYN+ACK” packet where the ‘ACK’ flag acknowledges the client’s initialization ‘SYN’. Additional synchronization information is included in both the initialization packet and its acknowledgement. . Finally, the client acknowledges the server’s SYN+ACK packet with a final ACK packet to complete the handshake.</p><p>The connection is then ready for data transmission. Typically, the client will set the PSH flag on the first data-containing packet to signal to the server’s TCP stack to forward the data immediately up to the application. Both parties continue to transfer data and acknowledge received data until the connection is no longer needed, at which point the connection is closed.</p><p><a href="https://datatracker.ietf.org/doc/html/rfc9293#section-3.6"><u>RFC 9293</u></a> describes two ways in which a TCP connection may be closed:</p><ul><li><p>The normal and graceful TCP close sequence uses a FIN exchange. Either party can send a packet with the FIN flag set to indicate that they have no more data to transmit. Once the other party acknowledges that FIN packet, that direction of the connection is closed. When the acknowledging party is finished transmitting data, it transmits its own FIN packet to close, since each direction of the connection must be closed independently.</p></li><li><p>An abort or “reset” signal in which one party transmits RST packets, instructing the other party to immediately close and discard any connection state. Resets are generally sent when some unrecoverable error has occurred.</p></li></ul><p>The full lifetime of a connection that closes gracefully with a FIN is captured in the following sequence diagram.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/eh8fIM3Ei3Y9WapGgRuhC/995421abee0d6aeb257e2700db9759ee/1622-2.png" />
            
            </figure><p><i><sub>A normal TCP connection starts with a 3-way handshake and ends with a FIN handshake</sub></i></p><p>Additionally, a TCP connection may be terminated by a <a href="https://blog.cloudflare.com/when-tcp-sockets-refuse-to-die/"><u>timeout</u></a> which specifies the maximum duration that a connection can be active without receiving data or acknowledgements. An inactive connection, for example, can be kept open with <a href="https://blog.cloudflare.com/when-tcp-sockets-refuse-to-die/"><u>keepalive</u></a> messages. Unless overridden, the global default duration specified in RFC 9293 is five minutes.</p><p>We consider TCP connections <i>anomalous</i> when they close via either a reset or timeout from the client side.</p>
    <div>
      <h2>Sources of anomalous connections</h2>
      <a href="#sources-of-anomalous-connections">
        
      </a>
    </div>
    <p>Anomalous TCP connections may not themselves be problematic but they can be a symptom of larger issues, especially when occurring at early (pre-data) stages of TCP connections. Below is a non-exhaustive list of potential reasons that we might observe resets or timeouts:</p><ul><li><p><b>Scanners: </b>Internet scanners may send a SYN packet to probe if a server responds on a given port, but otherwise fail to clean up a connection once the probe has elicited a response from the server.</p></li><li><p><b>Sudden Application Shutdowns: </b>Applications might abruptly close open connections if they are no longer required. For example, web browsers may send RSTs to terminate connections after a tab is closed, or connections can time out if devices lose power or connectivity.</p></li><li><p><b>Network Errors: </b>Unstable network conditions (e.g., a severed cable connection could result in connection timeouts)</p></li><li><p><b>Attacks: </b>A malicious client may send attack traffic that appears as anomalous connections. For instance, in a <a href="https://www.cloudflare.com/learning/ddos/syn-flood-ddos-attack/"><u>SYN flood</u></a> (half-open) attack, an attacker repeatedly sends SYN packets to a target server in an attempt to overwhelm resources as it maintains these half-opened connections.</p></li><li><p><b>Tampering:</b> Firewalls or other middleboxes capable of intercepting packets between a client and server may drop packets, causing timeouts at the communicating parties. Middleboxes capable of deep packet inspection (DPI) might also leverage the fact that the TCP protocol is unauthenticated and unencrypted to <a href="https://en.wikipedia.org/wiki/Packet_injection"><i><u>inject</u></i><u> packets</u></a> to disrupt the connection state. See our <a href="https://blog.cloudflare.com/connection-tampering"><u>accompanying blog post</u></a> for more details on connection tampering.</p></li></ul><p>Understanding the scale and underlying reasons for anomalous connections can help us to mitigate failures and build a more robust and reliable network. We hope that sharing these insights publicly will help to improve transparency and accountability for networks worldwide.</p><h2>How to use the dataset</h2><p>In this section, we provide guidance and examples of how to interpret the TCP resets and timeouts dataset by broadly describing three use cases: confirming previously-known behaviors, exploring new targets for followup study, and longitudinal studies to capture changes in network behavior over time.</p><p>In each example, the plot lines correspond to the stage of the connection in which the anomalous connection closed, which provides valuable clues into what might have caused the anomaly. We place each incoming connection into one of the following stages:</p><p><b>Post-SYN (mid-handshake)</b>: Connection resets or timeouts after the server received a client’s SYN packet. Our servers will have replied, but no acknowledgement ACK packet has come back from the client before the reset or timeout. <a href="https://www.cloudflare.com/learning/ddos/glossary/ip-spoofing/"><u>Packet spoofing</u></a> is common at this connection stage, so geolocation information is especially unreliable.</p><p><b>Post-ACK (immediately post-handshake)</b>: Connection resets or timeouts after the handshake completes and the connection is established successfully. Any subsequent data, that may have been transmitted, never reached our servers.</p><p><b>Post-PSH (after first data packet)</b>: Connection resets or timeouts after the server received a packet with the PSH flag set. The PSH flag indicates that the TCP packet contains data (such as a <a href="https://www.cloudflare.com/en-gb/learning/ssl/what-happens-in-a-tls-handshake/#:~:text=The%20%27client%20hello%27%20message%3A"><u>TLS Client Hello</u></a> message) that is ready to be delivered to the application.</p><p><b>Later (after multiple data packets)</b>: Connection resets within the first 10 packets from the client, but after the server has received multiple data packets.</p><p><b>None</b>: All other connections.</p><p>To keep focus on legitimate connections, the dataset is constructed after connections are processed and filtered by Cloudflare’s attack mitigation systems.  For more details on how we construct the dataset, see <a href="#anomalousTCP"><u>below.</u></a></p>
    <div>
      <h3>Start with a self-evaluation</h3>
      <a href="#start-with-a-self-evaluation">
        
      </a>
    </div>
    <p>To start, we encourage readers to visit the <a href="https://radar.cloudflare.com/security-and-attacks#tcp-resets-and-timeouts"><u>dashboard on Radar</u></a> to view the results worldwide, and for their own country and ISP.</p><p>Globally, as shown below, about 20% of new TCP connections to Cloudflare’s network are closed by a reset or timeout within the first 10 packets from the client. While this number seems astonishingly high, it is in-line with prior studies. As we’ll see, rates of resets and timeouts vary widely by country and network, and this variation is lost in the global averages.</p>
          <figure>
          <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/2cR6Nfm1H3juXU6oB9RS9o/6f53f4295f3ce98b8dd32c4b28aba847/1622-3.png" />
          </figure><p><i><sub>via </sub></i><a href="https://radar.cloudflare.com/security-and-attacks?dateStart=2024-07-28&amp;dateEnd=2024-08-26#tcp-resets-and-timeouts"><i><sub>Cloudflare Radar</sub></i></a></p><p>The <a href="https://radar.cloudflare.com/us"><u>United States</u></a>, my home country, shows anomalous connection rates slightly lower than the worldwide averages, largely due to lower rates for connections closing in the Post-ACK and Post-PSH stages (those stages are more reflective of middlebox <a href="https://blog.cloudflare.com/connection-tampering"><u>tampering</u></a> behavior). The elevated rates of Post-SYN are typical in most networks due to scanning, but may include packets that spoof the true client’s IP address. Similarly, high rates of connection resets in the Later connection stage (after the initial data exchange, but still within the first 10 packets) might be applications responding to human actions, such as browsers using RSTs to close unwanted TCP connections after a tab is closed.</p>
          <figure>
          <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/2hRm0W9UEhzZ9olt89yvgx/0dd609db5d9808869e73c10d7f2c628e/1622-4.png" />
          </figure><p><sub><i>via </i></sub><a href="https://radar.cloudflare.com/security-and-attacks/us?dateStart=2024-07-28&amp;dateEnd=2024-08-26#tcp-resets-and-timeouts"><sub><i>Cloudflare Radar</i></sub></a></p><p>My home ISP <a href="https://radar.cloudflare.com/as22773"><u>AS22773 (Cox Communications)</u></a> shows rates comparable to the US as a whole. This is typical of most residential ISPs operating in the United States.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/SYQfFbeBYgrlv4p6q75l8/09773b7cb9de8facaaa96c1609480d81/1622-5.png" />
            
            </figure><p><sub><i>via </i></sub><a href="https://radar.cloudflare.com/security-and-attacks/AS22773?dateStart=2024-07-28&amp;dateEnd=2024-08-26#tcp-resets-and-timeouts"><sub><i>Cloudflare Radar</i></sub></a></p><p>Contrast this against <a href="https://radar.cloudflare.com/as15169"><u>AS15169 (Google LLC)</u></a>, which originates many of Google’s <a href="https://developers.google.com/search/docs/crawling-indexing/overview-google-crawlers"><u>crawlers and fetchers</u></a>. This network shows significantly lower rates of resets in the “Later" connection stage, which may be explained by the larger proportion of automated traffic, not driven by human user actions (such as closing browser tabs).</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/CXdHL80q8qjJ3zbQUOJXT/2acb5e977b689ba201b8afe664795067/1622-6.png" />
            
            </figure><p><sub><i>via </i></sub><a href="https://radar.cloudflare.com/security-and-attacks/AS15169?dateStart=2024-07-28&amp;dateEnd=2024-08-26#tcp-resets-and-timeouts"><sub><i>Cloudflare Radar</i></sub></a></p><p>Indeed, our <a href="https://radar.cloudflare.com/traffic"><u>bot detection system</u></a> classifies over 99% of HTTP requests from AS15169 as automated. This shows the value of collating different types of data on Radar.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/cTokDpCivHG1RLV2vHZaj/4c57daf869ad01c21edf6c306b016f5d/1622-7.png" />
            
            </figure><p><sub><i>via </i></sub><a href="https://radar.cloudflare.com/traffic/AS15169?dateStart=2024-07-28&amp;dateEnd=2024-08-26#bot-vs-human"><sub><i>Cloudflare Radar</i></sub></a></p><p>The new anomalous connections dataset, like most that appear on Radar, is passive – it only reports on observable events, not what causes them. In this spirit, the graphs above for Google’s network reinforce the reason for corroborating observations, as we discuss next.</p>
    <div>
      <h2>One view for a signal, more views for corroboration</h2>
      <a href="#one-view-for-a-signal-more-views-for-corroboration">
        
      </a>
    </div>
    <p>Our passive measurement approach works at Cloudflare scale. However, it does not identify root causes or ground truth on its own. There are many plausible explanations for why a connection closed in a particular stage, especially when the closure is due to reset packets and timeouts. Attempts to explain by relying solely on this data source can only lead to speculation. </p><p>However, this limitation can be overcome by combining with other data sources such as active measurements. For example, corroborating with reports from <a href="https://ooni.org/"><u>OONI</u></a> or <a href="https://censoredplanet.org/"><u>Censored Planet</u></a>, or with on-the-ground reports, can give a more complete story. Thus, one of the major use cases for the TCP resets and timeouts dataset is to understand the scale and impact of previously-documented phenomena.</p>
    <div>
      <h3>Corroborating Internet-scale measurement projects</h3>
      <a href="#corroborating-internet-scale-measurement-projects">
        
      </a>
    </div>
    <p>Looking at <a href="https://radar.cloudflare.com/as398324"><u>AS398324</u></a> would suggest something terribly wrong, with more than half of connections showing up as anomalous in the Post-SYN stage. However, this network turns out to be CENSYS-ARIN-01, from Internet scanning company <a href="https://censys.com/"><u>Censys</u></a>. Post-SYN anomalies can be the result of network-layer scanning, where the scanner sends a single SYN packet to probe the server, but does not complete the TCP handshake. There are also high rates of Later anomalies, which could be indicative of application-layer scanning, as indicated by the near 100% proportion of connections being classified as automated.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/2D4kF4Uphgq33pPsjEHbwS/a3796c3c0bee6dfa71ea33e2f6ab9d26/1622-8.png" />
            
            </figure><p><sub><i>via </i></sub><a href="https://radar.cloudflare.com/security-and-attacks/AS398324?dateStart=2024-07-28&amp;dateEnd=2024-08-26#tcp-resets-and-timeouts"><sub><i>Cloudflare Radar</i></sub></a></p><p>Indeed, similar to AS15169, we classify over 99% of requests from AS398324 as automated.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/7hmzGC09VELKJpeX5tx7Eq/3bfe704f0eb0613f31606bfe72782137/1622-9.png" />
            
            </figure><p><sub><i>via </i></sub><a href="https://radar.cloudflare.com/traffic/AS398324?dateStart=2024-07-28&amp;dateEnd=2024-08-26#bot-vs-human"><sub><i>Cloudflare Radar</i></sub></a></p><p>So far, we’ve looked at networks that generate high volumes of scripted or automated traffic. It’s time to look further afield.</p>
    <div>
      <h3>Corroborating connection tampering</h3>
      <a href="#corroborating-connection-tampering">
        
      </a>
    </div>
    <p>The starting point of this dataset was a research project to understand and detect active connection tampering, in a similar spirit to our work on <a href="https://blog.cloudflare.com/monsters-in-the-middleboxes"><u>HTTPS interception</u></a>. The reasons we set out to do are explained in detail in our <a href="https://blog.cloudflare.com/connection-tampering"><u>accompanying blog post</u></a>.</p><p>A <a href="https://go.gale.com/ps/anonymous?id=GALE%7CA175630128&amp;it=r&amp;linkaccess=abs&amp;issn=10727825"><u>well-documented</u></a> technique in the wild to force connections to close is <a href="https://www.ndss-symposium.org/wp-content/uploads/2017/09/weav.pdf"><u>reset injection</u></a>. With reset injection, middleboxes on the path to the destination inspect data portions of packets. When the middlebox sees a packet to a forbidden domain name, it injects forged TCP Reset (RST) packets to one or both communicating parties to cause them to abort the connection. If the middlebox did not drop the forbidden packet first, then the server will receive both the client packet that triggered the middlebox tampering – perhaps containing a TLS Client Hello message with a <a href="https://www.cloudflare.com/en-gb/learning/ssl/what-is-sni/"><u>Server Name Indication (SNI)</u></a> field – followed soon afterwards by the forged RST packet.</p><p>In the TCP resets and timeouts dataset, a connection disrupted via reset injection would typically appear as a Post-ACK, Post-PSH, or Later anomaly (but, as a reminder, not all anomalies are due to reset injection).</p><p>As an example, the reset injection technique is <a href="https://go.gale.com/ps/anonymous?id=GALE%7CA175630128&amp;it=r&amp;linkaccess=abs&amp;issn=10727825"><u>known</u></a> and commonly associated with the so-called Great Firewall of China (GFW). Indeed, looking at Post-PSH anomalies in connections originating from IPs geolocated to <a href="https://radar.cloudflare.com/cn"><u>China</u></a>, we see higher rates than the worldwide average. However, looking at individual networks in China, the Post-PSH rates vary widely, perhaps due to the types of traffic carried or different implementations of the technique. In contrast, rates of Post-SYN anomalies are consistently high across most major Chinese ASes; this may be scanners, spoofed SYN flood attacks, or <a href="https://www.usenix.org/conference/usenixsecurity23/presentation/wu-mingshi"><u>residual</u></a> <a href="https://gfw.report/publications/usenixsecurity23/en/"><u>blocking</u></a> with <a href="https://blog.cloudflare.com/consequences-of-ip-blocking"><u>collateral impact</u></a>. </p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/ICLRlfg97CA9e716TJSwE/6333b5d2975ab139adfc0f7ede9abf6b/1622-10.png" />
            
            </figure><p><sub><i>via </i></sub><a href="https://radar.cloudflare.com/security-and-attacks/cn?dateStart=2024-07-28&amp;dateEnd=2024-08-26#tcp-resets-and-timeouts"><sub><i>Cloudflare Radar</i></sub></a></p><p><a href="https://radar.cloudflare.com/as4134"><u>AS4134 (CHINANET-BACKBONE)</u></a> shows lower rates of Post-PSH anomalies than other Chinese ASes, but still well above the worldwide average.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/4NL6vTD9cXtVxQYfp3OvHT/dbb713b97a7690e45a0bedb22efa1cb1/1622-11.png" />
            
            </figure><p><sub><i>via </i></sub><a href="https://radar.cloudflare.com/security-and-attacks/AS4134?dateStart=2024-07-28&amp;dateEnd=2024-08-26#tcp-resets-and-timeouts"><sub><i>Cloudflare Radar</i></sub></a></p><p>Networks <a href="https://radar.cloudflare.com/as9808"><u>AS9808 (CHINAMOBILE-CN)</u></a> and <a href="https://radar.cloudflare.com/as56046"><u>AS56046 (CMNET-Jiangsu-AP)</u></a> both show double-digit percentages of connections matching Post-PSH anomalies.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/2jQVLR8Shiz0NsMJuUhG4N/60b56c012e01d9aeea61447aa4a3f7fc/1622-12.png" />
            
            </figure><p><sub><i>via </i></sub><a href="https://radar.cloudflare.com/security-and-attacks/AS9808?dateStart=2024-07-28&amp;dateEnd=2024-08-26#tcp-resets-and-timeouts"><sub><i>Cloudflare Radar</i></sub></a></p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/2fSHO4hANqymOvbjSIL6Uw/497a02d5f1496202f7a2d5a04043c54e/1622-13.png" />
            
            </figure><p><sub><i>via </i></sub><a href="https://radar.cloudflare.com/security-and-attacks/AS56046?dateStart=2024-07-28&amp;dateEnd=2024-08-26#tcp-resets-and-timeouts"><sub><i>Cloudflare Radar</i></sub></a></p><p>See our <a href="https://blog.cloudflare.com/connection-tampering"><u>deep-dive blog post</u></a> for more information about connection tampering.</p>
    <div>
      <h2>Sourcing new insights and targets for followup study</h2>
      <a href="#sourcing-new-insights-and-targets-for-followup-study">
        
      </a>
    </div>
    <p>TCP resets and timeouts dataset may also be a source for identifying new or previously understudied network behaviors, by helping to find networks that “stick out” and merit further investigation.</p>
    <div>
      <h3>Unattributable ZMap scanning</h3>
      <a href="#unattributable-zmap-scanning">
        
      </a>
    </div>
    <p>Here is one we’re unable to explain: Every day during the same 18-hour interval, over 10% of connections from UK clients never progress past the initial SYN packets, and just time out.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/4qPaXL6ViEyuJ3UhUi0kpG/26060221486166d782977014511d2b83/1622-14.png" />
            
            </figure><p><sub><i>via </i></sub><a href="https://radar.cloudflare.com/security-and-attacks/gb?dateStart=2024-07-28&amp;dateEnd=2024-08-26#tcp-resets-and-timeouts"><sub><i>Cloudflare Radar</i></sub></a></p><p>Internal inspection revealed that almost all of the Post-SYN anomalies come from a scanner using <a href="https://zmap.io"><u>ZMap</u></a> at <a href="https://radar.cloudflare.com/as396982"><u>AS396982 (GOOGLE-CLOUD-PLATFORM)</u></a>, in what appears to be a full port scan across all IP address ranges. (The ZMap client responsibly self-identifies, based on ZMap’s responsible self-identification as discussed later.) We see a similar level of scan traffic from IP prefixes in AS396982 geolocated to the United States.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/756bijZU4xJpMvc78ZdbYl/370d1b939bf2023bb2fee550df7b492c/1622-15.png" />
            
            </figure><p><sub><i>via </i></sub><a href="https://radar.cloudflare.com/security-and-attacks/AS396982?dateStart=2024-07-28&amp;dateEnd=2024-08-26#tcp-resets-and-timeouts"><sub><i>Cloudflare Radar</i></sub></a></p>
    <div>
      <h3>Zero-rating in mobile networks</h3>
      <a href="#zero-rating-in-mobile-networks">
        
      </a>
    </div>
    <p>A cursory look at anomaly rates at the country level reveals some interesting findings. For instance, looking at connections from <a href="https://radar.cloudflare.com/mx"><u>Mexico</u></a>, the rates of Post-ACK and Post-PSH anomalies often associated with connection tampering are higher than the global average. The profile for Mexico connections is also similar to others in the region. However, Mexico is a country with “<a href="https://freedomhouse.org/country/mexico/freedom-net/2023"><u>no documented evidence that the government or other actors block or filter internet content.</u></a>”</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/5bZjzlkqtRzmB5097m6z6S/e2e07a884a510d963b97c5e6ffd00ee2/1622-16.png" />
            
            </figure><p><sub><i>via </i></sub><a href="https://radar.cloudflare.com/security-and-attacks/mx?dateStart=2024-07-28&amp;dateEnd=2024-08-26#tcp-resets-and-timeouts"><sub><i>Cloudflare Radar</i></sub></a></p><p>Looking at each of the top ASes by HTTP traffic volume in Mexico, we find that close to 50% of connections from <a href="https://radar.cloudflare.com/as28403"><u>AS28403 (RadioMovil Dipsa, S.A. de C.V., operating as Telcel)</u></a> are terminated via a reset or timeout directly after the completion of the TCP handshake (Post-ACK connection stage). In this stage, it’s possible a middlebox has seen and dropped a data packet before it gets to Cloudflare.</p><p>One explanation for this behavior may be <a href="https://en.wikipedia.org/wiki/Zero-rating"><u>zero-rating</u></a>, in which a cellular network provider allows access to certain resources (such as messaging or social media apps) at no cost. When users exceed their data transfer limits on their account, the provider might still allow traffic to zero-rated destinations while blocking connections to other resources.</p><p>To enforce a zero-rating policy, an ISP might use the <a href="https://www.cloudflare.com/en-gb/learning/ssl/what-is-sni/"><u>TLS Server Name Indication (SNI)</u></a> to determine whether to block or allow connections. The SNI is sent in a data-containing packet immediately following the TCP handshake. Thus, if an ISP drops the packet containing the SNI, the server would still see the SYN and ACK packets from the client but no subsequent packets, which is consistent with a Post-ACK connection anomaly.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/7KUfARxvDEogTFeh7PL4n5/68dc237c07a60e431cc2d2654cade2f7/1622-17.png" />
            
            </figure><p><sub><i>via </i></sub><a href="https://radar.cloudflare.com/security-and-attacks/AS28403?dateStart=2024-07-28&amp;dateEnd=2024-08-26#tcp-resets-and-timeouts"><sub><i>Cloudflare Radar</i></sub></a></p><p>Turning to <a href="https://radar.cloudflare.com/pe"><u>Peru</u></a>, another country with a similar profile in the dataset, there are even higher rates of Post-ACK and Post-PSH anomalies compared to Mexico.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/1vLO0sP2Ap3206PX4Ysdim/a4f0274b4d884703ff4b4d879a667d90/1622-18.png" />
            
            </figure><p><sub><i>via </i></sub><a href="https://radar.cloudflare.com/security-and-attacks/pe?dateStart=2024-07-28&amp;dateEnd=2024-08-26#tcp-resets-and-timeouts"><sub><i>Cloudflare Radar</i></sub></a></p><p>Focusing on specific ASes, we see that <a href="https://radar.cloudflare.com/as12252"><u>AS12252 (Claro Peru)</u></a> shows high rates of Post-ACK anomalies similar to AS28403 in Mexico. Both networks are operated by the same parent company, <a href="https://www.americamovil.com/English/overview/default.aspx"><u>América Móvil</u></a>, so one might expect similar network policies and network management techniques to be employed.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/1doJKHsOHyYlY6t3LLVmdm/147d8239981bc580b9fd53cf2b7b4d89/1622-19.png" />
            
            </figure><p><sub><i>via </i></sub><a href="https://radar.cloudflare.com/security-and-attacks/AS12252?dateStart=2024-07-28&amp;dateEnd=2024-08-26#tcp-resets-and-timeouts"><sub><i>Cloudflare Radar</i></sub></a></p><p>Interestingly, <a href="https://radar.cloudflare.com/as6147"><u>AS6147 (Telefónica Del Perú)</u></a> instead shows high rates of Post-PSH connection anomalies. This could indicate that this network uses different techniques at the network layer to enforce its policies.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/44i6wdU8oWl8CTl1YDZVES/7ac4728c15e4a0627f262f8dcd791be2/1622-20.png" />
            
            </figure><p><sub><i>via </i></sub><a href="https://radar.cloudflare.com/security-and-attacks/dz?dateStart=2024-06-06&amp;dateEnd=2024-06-19#tcp-resets-and-attacks"><sub><i>Cloudflare Radar</i></sub></a></p>
    <div>
      <h2>Changes over time, a longitudinal view</h2>
      <a href="#changes-over-time-a-longitudinal-view">
        
      </a>
    </div>
    <p>One of the most powerful aspects of our continuous passive measurement is the ability to measure networks over longer periods of time.</p>
    <div>
      <h3>Internet shutdowns</h3>
      <a href="#internet-shutdowns">
        
      </a>
    </div>
    <p>In our June 2024 blog post “<a href="https://blog.cloudflare.com/syria-iraq-algeria-exam-internet-shutdown"><u>Examining recent Internet shutdowns in Syria, Iraq, and Algeria</u></a>”, we shared the view of exam-related nationwide Internet shutdowns from the perspective of Cloudflare’s network. At that time we were preparing the TCP resets and timeouts dataset, which was helpful to confirm outside reports and get some insight into the specific techniques used for the shutdowns.</p><p>As examples of changing behavior, we can go “back in time” to observe exam-related blocking as it happened. In <a href="https://radar.cloudflare.com/sy"><u>Syria</u></a>, during the exam-related shutdowns we see spikes in the rate of Post-SYN anomalies. In reality, we see a <a href="https://radar.cloudflare.com/traffic/sy?dateStart=2024-05-20&amp;dateEnd=2024-06-19"><u>near-total drop in traffic</u></a> (including SYN packets) during these periods.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/3K5o8qI2wzozKrFlSm9x9S/d7778ba433055988ead0726ede69423c/1622-21.png" />
            
            </figure><p><sub><i>via </i></sub><a href="https://radar.cloudflare.com/security-and-attacks/sy?dateStart=2024-05-20&amp;dateEnd=2024-06-19#tcp-resets-and-timeouts"><sub><i>Cloudflare Radar</i></sub></a></p><p>
A <a href="https://x.com/CloudflareRadar/status/1816438072768078078"><u>second round</u></a> of shutdowns starting the last week of July are quite prominent as well.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/3YJVpto9QJBCkDm5DVLiVN/23a4b168065ebf47a062f89fc98d5048/1622-22.png" />
            
            </figure><p><sub><i>via </i></sub><a href="https://radar.cloudflare.com/security-and-attacks/sy?dateStart=2024-07-20&amp;dateEnd=2024-08-19#tcp-resets-and-timeouts"><sub><i>Cloudflare Radar</i></sub></a></p><p>Looking at connections from <a href="https://radar.cloudflare.com/iq"><u>Iraq</u></a>, Cloudflare’s view of exam-related shutdowns appears similar to those in Syria, with multiple Post-SYN spikes, albeit much less pronounced.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/2KZyGLIOyoEFH3sYTiuHzK/5539aba3877760e90bacf6889e51e0ad/1622-23.png" />
            
            </figure><p><sub><i>via </i></sub><a href="https://radar.cloudflare.com/security-and-attacks/iq?dateStart=2024-05-17&amp;dateEnd=2024-06-10#tcp-resets-and-timeouts"><sub><i>Cloudflare Radar</i></sub></a></p><p>The <a href="https://blog.cloudflare.com/syria-iraq-algeria-exam-internet-shutdown"><u>exams shutdown blog</u></a> also describes how <a href="https://radar.cloudflare.com/dz"><u>Algeria</u></a> took a more nuanced approach for restricting access to content during exam times: instead of full Internet shutdowns, evidence suggests that Algeria instead targeted specific connections. Indeed, during exam periods we see an increase in Post-ACK connection anomalies. This behavior would be expected if a middlebox selectively drops packets that contain forbidden content, while leaving other packets alone (like the initial SYN and ACK).</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/67LrJ8cb1XpYsEpzENs54M/775ee5671ef738a0afd93fc0a55b289a/1622-24.png" />
            
            </figure><p><sub><i>via </i></sub><a href="https://radar.cloudflare.com/security-and-attacks/dz?dateStart=2024-06-06&amp;dateEnd=2024-06-19#tcp-resets-and-attacks"><sub><i>Cloudflare Radar</i></sub></a></p><p>The examples above reinforce that this data is most useful when correlated with other signals. The data is also available via the <a href="https://developers.cloudflare.com/api/operations/radar-get-tcp-resets-timeouts-summary"><u>API</u></a>, so others can dive in more deeply. Our detection techniques are also transferable to other servers and operators, as described next.</p><h2>How to detect anomalous TCP connections at scale</h2><p>In this section, we discuss how we constructed the TCP resets and timeouts dataset. The scale of Cloudflare’s global network presents unique challenges for data processing and analysis. We share our techniques to help readers to understand our methodology, interpret the dataset, and replicate the mechanisms in other networks or servers.</p><p>Our methodology can be summarized as follows:</p><ol><li><p>Log a sample of connections arriving at our client-facing servers. This sampling system is completely passive, meaning that it has no ability to decrypt traffic and only has access to existing packets sent over the network. </p></li><li><p>Reconstruct connections from the captured packets. A novel aspect of our design is that only one direction needs to be observed, from client to server.</p></li><li><p>Match reconstructed connections against a set of signatures for anomalous connections terminated by resets or timeouts. These signatures consist of two parts: a <i>connection stage</i>, and a set of <i>tags</i> that indicate specific behaviors derived from the literature and our own observations.</p></li></ol><p>These design choices keep encrypted packets safe and can be replicated anywhere, without needing access to the destination server.</p>
    <div>
      <h2>First, sample connections</h2>
      <a href="#first-sample-connections">
        
      </a>
    </div>
    <p>Our main goal was to design a mechanism that scales, and gives us broad visibility into all connections arriving at Cloudflare’s network. Running traffic captures on each client-facing server works, but does not scale. We would also need to know exactly where and when to look, making continuous insights hard to capture. Instead, we sample connections from all of Cloudflare’s servers and log them to a central location where we could perform offline analysis.</p><p>This is where we hit the first roadblock: existing packet logging pipelines used by Cloudflare’s analytics systems log individual packets, but a connection consists of many packets. To detect connection anomalies we needed to see all, or at least enough, packets in a given connection. Fortunately, we were able to leverage a flexible logging system built by Cloudflare’s DoS team for <a href="https://developers.cloudflare.com/ddos-protection/about/how-ddos-protection-works/"><u>analyzing packets involved in DDoS attacks</u></a> in conjunction with a carefully crafted invocation of two <a href="https://manpages.debian.org/bookworm/iptables/iptables.8.en.html"><code><u>iptables</u></code></a> rules to achieve our goal.</p><p>The first <code>iptables</code> rule randomly selects and marks new connections for sampling. In our case, we settled on sampling one in every 10,000 ingress TCP connections. There’s nothing magical about this number, but at Cloudflare’s scale it strikes a balance between capturing enough without straining our data processing and analytics pipelines. The <code>iptables</code> rules only apply to packets after they have passed the DDoS mitigation system. As TCP connections can be long-lived, we sample only new TCP connections. Here is the <code>iptables</code> rule for marking connections to be sampled:</p>
            <pre><code>-t mangle -A PREROUTING -p tcp --syn -m state 
--state NEW -m statistic --mode random 
--probability 0.0001 -m connlabel --label &lt;label&gt; 
--set -m comment --comment "Label a sample of ingress TCP connections"
</code></pre>
            <p></p><p>Breaking this down, the rule is installed in the <code>mangle</code> table (for modifying packets) in the chain that handles incoming packets (<code>-A PREROUTING</code>). Only TCP packets with the SYN flag set are considered (<code>-p tcp --syn</code>) where there is no prior state for the connection (<code>--state NEW</code>). The filter selects one in every 10,000 SYN packets (<code>-m statistic –mode random --probability 0.0001</code>) and applies a label to the connection (<code>-m connlabel --label &lt;label&gt; --set</code>).</p><p>The second iptables rule logs subsequent packets in the connection, to a maximum of 10 packets. Again, there’s nothing magic about the number 10 other than that it’s generally enough to capture the connection establishment, subsequent request packets, and resets on connections that close before expected.</p>
            <pre><code>-t mangle -A PREROUTING -m connlabel --label 
&lt;label&gt; -m connbytes ! --connbytes 11 
--connbytes-dir original --connbytes-mode packets 
-j NFLOG --nflog-prefix "&lt;logging flags&gt;" -m 
comment --comment "Log the first 10 incoming packets of each sampled ingress connection"
</code></pre>
            <p></p><p>This rule is installed in the same chain as the previous rule. It matches only packets from sampled connections <code>(-m connlabel --label &lt;label&gt;)</code>, and only the first 10 packets from each connection (<code>-m connbytes ! --connbytes 11 --connbytes-dir original --connbytes-mode packets</code>). Matched packets are sent to NFLOG (<code>-j NFLOG --nflog-prefix "&lt;logging flags&gt;"</code>) where they’re picked up by the logging system and saved to a centralized location for offline analysis.</p>
    <div>
      <h2>Reconstructing connections from sampled packets</h2>
      <a href="#reconstructing-connections-from-sampled-packets">
        
      </a>
    </div>
    <p>Packets logged on our servers are inserted into <a href="https://blog.cloudflare.com/tag/clickhouse/"><u>ClickHouse</u></a> tables as part of our analytics pipeline. Each logged packet is stored in its own row in the database. The next challenge is to reassemble packets into the corresponding connections for further analysis. Before we go further, we need to define what a “connection” is for the purpose of this analysis.</p><p>We use the standard definition of a connection defined by the network 5-tuple of <code>protocol</code>, <code>source IP address</code>, <code>source port</code>, <code>destination IP address</code>, <code>destination port</code> with the following tweaks:</p><ul><li><p>We only sample packets on the <i>ingress</i> (client-to-server) half of a connection, so do not see the corresponding response packets from server to client. In most cases, we can infer what the server response will be based on our knowledge of how our servers are configured. Ultimately, the ingress packets are sufficient to learn anomalous TCP connection behaviors.</p></li><li><p>We query the ClickHouse dataset in 15-minute intervals, and group together packets sharing the same network 5-tuple within that interval. This means that connections may be truncated towards the end of the query interval. When analyzing connection timeouts, we exclude incomplete flows where the latest packet timestamp is within 10 seconds of the query cutoff.</p></li><li><p>Since resets and timeouts are most likely to affect <i>new</i> connections, we only consider sequences of packets starting with a SYN packet marking the beginning of a new TCP handshake. Thus, existing long-lived connections are excluded.</p></li><li><p>The logging system does not guarantee precise packet interarrival timestamps, so we consider only the set of packets that arrive, not ordered by their arrival time. In some cases, we can determine packet ordering based on TCP sequence numbers but it turns out not to significantly impact the results.</p></li><li><p>We filter out a small fraction of connections with multiple SYN packets to reduce noise in the analysis.</p></li></ul><p>With the above conditions for how we define a connection, we’re now ready to describe our analysis pipeline in more detail.</p>
    <div>
      <h2>Mapping connection close events to stages</h2>
      <a href="#mapping-connection-close-events-to-stages">
        
      </a>
    </div>
    <p>TCP connections transition through a series of stages from connection establishment through eventual close. The stage at which an anomalous connection closes provides clues as to <i>why</i> the anomaly occurred. Based on the packets that we receive at our servers, we place each incoming connection into one of four stages (Post-SYN, Post-ACK, Post-PSH, Later), described in more detail <a href="#dataset"><u>above</u></a>.</p><p>The connection close stage alone provides useful insights into anomalous TCP connections from various networks, and this is what is shown today on Cloudflare Radar. However, in some cases we can provide deeper insights by matching connections against more specific signatures.</p>
    <div>
      <h2>Applying tags to describe more specific connection behaviors</h2>
      <a href="#applying-tags-to-describe-more-specific-connection-behaviors">
        
      </a>
    </div>
    <p>The grouping of connections into stages as described above is done solely based on the TCP flags of packets in the connection. Considering other factors such as packet inter-arrival timing, exact combinations of TCP flags, and other packet fields (IP identification, IP TTL, TCP sequence and acknowledgement numbers, TCP window size, etc.) can allow for more fine-grained matching to specific behaviors.</p><p>For example, the popular <a href="http://zmap.io"><u>ZMap</u></a> scanner software fixes the IP identification field to 54321 and the TCP window size to 65535 in SYN packets that it generates (<a href="https://github.com/zmap/zmap/blob/c88db2917612328c843561101495e5263ef7ac5b/src/probe_modules/packet.c"><u>source code</u></a>). When we see packets arriving to our network that have these exact fields set, it is likely that the packet was generated by a scanner using ZMap.</p><p>Tags can also be used to match connections against known signatures of tampering middleboxes. A large body of active measurements work (for instance, <a href="https://www.ndss-symposium.org/wp-content/uploads/2017/09/weav.pdf"><u>Weaver, Sommer, and Paxson</u></a>) has found that some middleboxes deployments exhibit consistent behaviors when disrupting connections via reset injection, such as setting an IP TTL field that differs from other packets sent by the client, or sending both a RST packet and a RST+ACK packet. For more details on specific connection tampering signatures, see the <a href="https://blog.cloudflare.com/connection-tampering"><u>blog post</u></a> and the <a href="https://research.cloudflare.com/publications/SundaraRaman2023/"><u>peer-reviewed paper</u></a>.</p><p>Currently, we define the following tags, which we intend to refine and expand over time. Some tags only apply if another tag is also set, as indicated by the hierarchical presentation below (e.g., the <code>fin</code> tag can only apply when the <code>reset</code> tag is also set).</p><ul><li><p><code>timeout</code>: terminated due to a timeout</p></li><li><p><code>reset</code>: terminated due to a reset (packet with RST flag set)</p><ul><li><p>fin: at least one FIN packet was received alongside one or more RST packets</p></li><li><p><code>single_rst</code>: terminated with a single RST packet</p></li><li><p><code>multiple_rsts</code>: terminated with multiple RST packets</p><ul><li><p><code>acknumsame</code>: the acknowledgement numbers in the RST packets were all the same and non-zero</p></li><li><p><code>acknumsame0</code>: the acknowledgement numbers in the RST packets were all zero</p></li><li><p><code>acknumdif</code>f: the acknowledgement numbers in the RST packets were different and all non-zero</p></li><li><p><code>acknumdiff0</code>: the acknowledgement numbers in the RST packets were different and one was zero</p></li></ul></li><li><p><code>single_rstack</code>: terminated with a single RST+ACK packet (both RST and ACK flags set)</p></li><li><p><code>multiple_rstacks</code>: terminated with a multiple RST+ACK packets</p></li><li><p><code>rst_and_rstacks</code>: terminated with a combination of RST and RST+ACK packets</p></li></ul></li><li><p><code>zmap</code>: SYN packet matches those generated by the ZMap scanner</p></li></ul><p>Connection tags are not currently visible in the Radar <a href="https://radar.cloudflare.com/security-and-attacks#tcp-resets-and-timeouts"><u>dashboard</u></a> and <a href="https://developers.cloudflare.com/api/operations/radar-get-tcp-resets-timeouts-summary"><u>API</u></a>, but we plan to release this additional functionality in the future.</p>
    <div>
      <h2>What’s next?</h2>
      <a href="#whats-next">
        
      </a>
    </div>
    <p>Cloudflare’s mission is to help build a better Internet, and we consider transparency and accountability to be a critical part of that mission. We hope that the insights and tools we are sharing help to shed light on anomalous network behaviors around the world.</p><p>While the current TCP resets and timeouts dataset should immediately prove useful to network operators, researchers, and Internet citizens as a whole, we’re not stopping here. There are several improvements we’d like to add in the future:</p><ul><li><p>Expand the set of tags for capturing specific network behaviors and expose them in the <a href="https://developers.cloudflare.com/api/operations/radar-get-tcp-resets-timeouts-summary"><u>API</u></a> and <a href="https://radar.cloudflare.com/security-and-attacks#tcp-resets-and-timeouts"><u>dashboard</u></a>.</p></li><li><p>Extend insights to connections from Cloudflare to customer origin servers.</p></li><li><p>Add support for QUIC, which is currently used for over <a href="https://radar.cloudflare.com/adoption-and-usage"><u>30% of HTTP requests</u></a> to Cloudflare worldwide.</p></li></ul><p>If you’ve found this blog interesting, we encourage you to read the accompanying <a href="https://blog.cloudflare.com/connection-tampering"><u>blog post</u></a> and <a href="https://research.cloudflare.com/publications/SundaraRaman2023/"><u>paper</u></a> for a deep dive on connection tampering, and to explore the TCP resets and timeouts <a href="https://radar.cloudflare.com/security-and-attacks#tcp-resets-and-timeouts"><u>dashboard</u></a> and <a href="https://developers.cloudflare.com/api/operations/radar-get-tcp-resets-timeouts-summary"><u>API</u></a> on Cloudflare Radar. We welcome you to reach out to us with your own questions and observations at <a><u>radar@cloudflare.com</u></a>.</p> ]]></content:encoded>
            <category><![CDATA[Research]]></category>
            <category><![CDATA[Radar]]></category>
            <category><![CDATA[Internet Traffic]]></category>
            <category><![CDATA[Internet Quality]]></category>
            <guid isPermaLink="false">3SsAGFwmMK2KDYd7THI6Dn</guid>
            <dc:creator>Luke Valenta</dc:creator>
        </item>
        <item>
            <title><![CDATA[NIST’s first post-quantum standards]]></title>
            <link>https://blog.cloudflare.com/nists-first-post-quantum-standards/</link>
            <pubDate>Tue, 20 Aug 2024 21:00:00 GMT</pubDate>
            <description><![CDATA[ NIST has published the first cryptographic standards for protecting against attacks from quantum computers. Learn what this means for you and your organization. ]]></description>
            <content:encoded><![CDATA[ <p>On August 13th, 2024, the US National Institute of Standards and Technology (NIST) <a href="https://www.nist.gov/news-events/news/2024/08/nist-releases-first-3-finalized-post-quantum-encryption-standards"><u>published</u></a> the first three cryptographic standards designed to resist an <a href="https://blog.cloudflare.com/the-quantum-menace"><u>attack</u></a> from quantum computers: <a href="https://nvlpubs.nist.gov/nistpubs/fips/nist.fips.203.pdf"><u>ML-KEM</u></a>, <a href="https://nvlpubs.nist.gov/nistpubs/fips/nist.fips.204.pdf"><u>ML-DSA</u></a>, and <a href="https://nvlpubs.nist.gov/nistpubs/fips/nist.fips.205.pdf"><u>SLH-DSA</u></a>. This announcement marks a significant milestone for ensuring that today’s communications remain secure in a future world where large-scale quantum computers are a reality.</p><p>In this blog post, we briefly discuss the significance of NIST’s recent announcement, how we expect the ecosystem to evolve given these new standards, and the next steps we are taking. For a deeper dive, see <a href="https://blog.cloudflare.com/pq-2024"><u>our March 2024 blog post</u></a>.</p>
    <div>
      <h2>Why are quantum computers a threat?</h2>
      <a href="#why-are-quantum-computers-a-threat">
        
      </a>
    </div>
    <p>Cryptography is a fundamental aspect of modern technology, securing everything from online communications to financial transactions. For instance, when visiting this blog, your web browser used cryptography to establish a secure communication channel to Cloudflare’s server to ensure that you’re really talking to Cloudflare (and not an impersonator), and that the conversation remains private from eavesdroppers.</p><p>Much of the cryptography in widespread use today is based on mathematical puzzles (like <a href="https://en.wikipedia.org/wiki/RSA_(cryptosystem)"><u>factoring very large numbers</u></a>) which are computationally out of reach for classical (non-quantum) computers. We could likely continue to use traditional cryptography for decades to come if not for the advent of <a href="https://www.cloudflare.com/learning/ssl/quantum/what-is-quantum-computing/"><u>quantum computers</u></a>, devices that use properties of quantum mechanics to perform certain specialized calculations much more efficiently than traditional computers. Unfortunately, those specialized calculations include solving the mathematical puzzles upon which most widely deployed cryptography depends.</p><p>As of today, no quantum computers exist that are large and stable enough to break today’s cryptography, but experts predict that it’s only a matter of time until such a cryptographically-relevant quantum computer (CRQC) exists. For instance, more than a quarter of interviewed experts in a <a href="https://globalriskinstitute.org/publication/2023-quantum-threat-timeline-report/"><u>2023 survey</u></a> expect that a CRQC is more likely than not to appear in the next decade.</p>
    <div>
      <h2>What is being done about the quantum threat?</h2>
      <a href="#what-is-being-done-about-the-quantum-threat">
        
      </a>
    </div>
    <p>In recognition of the quantum threat, the US National Institute of Standards and Technology (<a href="https://nist.gov"><u>NIST</u></a>) launched a public <a href="https://csrc.nist.gov/projects/post-quantum-cryptography"><u>competition in 2016</u></a> to solicit, evaluate, and standardize new “post-quantum” cryptographic schemes that are designed to be resistant to attacks from quantum computers. On August 13, 2024, NIST <a href="https://www.nist.gov/news-events/news/2024/08/nist-releases-first-3-finalized-post-quantum-encryption-standards"><u>published</u></a> the final standards for the first three post-quantum algorithms to come out of the competition: <a href="https://nvlpubs.nist.gov/nistpubs/fips/nist.fips.203.pdf"><u>ML-KEM</u></a> for key agreement, and <a href="https://nvlpubs.nist.gov/nistpubs/fips/nist.fips.204.pdf"><u>ML-DSA</u></a> and <a href="https://nvlpubs.nist.gov/nistpubs/fips/nist.fips.205.pdf"><u>SLH-DSA</u></a> for digital signatures. A <a href="https://www.nist.gov/news-events/news/2022/07/nist-announces-first-four-quantum-resistant-cryptographic-algorithms"><u>fourth standard</u></a> based on <a href="https://falcon-sign.info/"><u>FALCON</u></a> is planned for release in late 2024 and will be dubbed FN-DSA, short for FFT (fast-Fourier transform) over NTRU-Lattice-Based Digital Signature Algorithm.</p><p>The publication of the final standards marks a significant milestone in an <a href="https://www.nist.gov/news-events/news/2016/04/nist-kicks-effort-defend-encrypted-data-quantum-computer-threat"><u>eight-year</u></a> global community effort managed by NIST to prepare for the arrival of quantum computers. Teams of cryptographers from around the world jointly submitted <a href="https://csrc.nist.gov/Projects/post-quantum-cryptography/post-quantum-cryptography-standardization/round-1-submissions"><u>82 algorithms</u></a> to the first round of the competition in 2017. After years of evaluation and cryptanalysis from the global cryptography community, NIST winnowed the algorithms under consideration down through several rounds until they decided upon the first four algorithms to standardize, which they <a href="https://blog.cloudflare.com/nist-post-quantum-surprise"><u>announced in 2022</u></a>.</p><p>This has been a monumental effort, and we would like to extend our gratitude to NIST and all the cryptographers and engineers across academia and industry that participated.</p><p>Security was a primary concern in the selection process, but algorithms also need to be performant enough to be deployed in real-world systems. Cloudflare’s involvement in the NIST competition began in 2019 when we <a href="https://blog.cloudflare.com/the-tls-post-quantum-experiment"><u>performed experiments</u></a> with industry partners to evaluate how algorithms under consideration performed when deployed on the open Internet. Gaining practical experience with the new algorithms was a crucial part of the evaluation process, and helped to identify and remove obstacles for deploying the final standards.</p><p>Having standardized algorithms is a significant step, but migrating systems to use these new algorithms is going to require a multi-year effort. To understand the effort involved, let’s look at two classes of traditional cryptography that are susceptible to quantum attacks: key agreement and digital signatures.</p><p><b>Key agreement</b> allows two parties that have never communicated before to establish a shared secret over an insecure communication channel (like the Internet). The parties can then use this shared secret to encrypt future communications between them. An adversary may be able to observe the encrypted communication going over the network, but without access to the shared secret they cannot decrypt and “see inside” the encrypted packets.</p><p>However, in what is known as the <a href="https://en.wikipedia.org/wiki/Harvest_now,_decrypt_later"><u>"harvest now, decrypt later"</u></a> threat model, an adversary can store encrypted data until some point in the future when they gain access to a sufficiently large quantum computer, and then can decrypt at their leisure. Thus, today’s communication is already at risk from a future quantum adversary, and it is urgent that we upgrade systems to use post-quantum key agreement as soon as possible.</p><p>In 2022, soon after NIST announced the first set of algorithms to be standardized, Cloudflare worked with industry partners to deploy a preliminary version of ML-KEM to protect traffic arriving at Cloudflare’s servers (and our internal systems), both to pave the way for adoption of the final standard and to start protecting traffic as soon as possible. As of mid-August 2024, over 16% of human-generated requests to Cloudflare’s servers are already protected with post-quantum key agreement.</p>
          <figure>
          <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/4vTixjEDsg7Tu5YW6Xhy9p/7ad1860335cb330637629c4625b5fc76/2499-2.png" />
          </figure><p><sub><i>Percentage of human traffic to Cloudflare protected by X25519Kyber, a preliminary version of ML-KEM as shown on </i></sub><a href="https://radar.cloudflare.com/adoption-and-usage#post-quantum-encryption-adoption"><sub><i><u>Cloudflare Radar</u></i></sub></a><sub><i>.</i></sub></p><p>Other players in the tech industry have deployed post-quantum key agreement as well, including <a href="https://blog.chromium.org/2024/05/advancing-our-amazing-bet-on-asymmetric.html"><u>Google</u></a>, <a href="https://security.apple.com/blog/imessage-pq3/"><u>Apple</u></a>, <a href="https://engineering.fb.com/2024/05/22/security/post-quantum-readiness-tls-pqr-meta/"><u>Meta</u></a>, and <a href="https://signal.org/blog/pqxdh/"><u>Signal</u></a>.</p><p><b>Signatures</b> are crucial to ensure that you’re communicating with who you think you are communicating. In the web public key infrastructure (WebPKI), signatures are used in certificates to prove that a website operator is the rightful owner of a domain. The threat model for signatures is different than for key agreement. An adversary capable of forging a digital signature could carry out an <i>active</i> attack to impersonate a web server to a client, but today’s communication is not yet at risk.</p><p>While the migration to post-quantum signatures is less urgent than the migration for key agreement (since traffic is only at risk once CRQCs exist), it is much more challenging. Consider, for instance, the number of parties involved. In key agreement, only two parties need to support a new key agreement protocol: the client and the server. In the WebPKI, there are many more parties involved, from library developers, to browsers, to server operators, to certificate authorities, to hardware manufacturers. Furthermore, post-quantum signatures are <a href="https://dadrian.io/blog/posts/pqc-signatures-2024/"><u>much larger</u></a> than we’re used to from traditional signatures. For more details on the tradeoffs between the different signature algorithms, deployment challenges, and out-of-the-box solutions see our <a href="https://blog.cloudflare.com/pq-2024"><u>previous blog post</u></a>.</p><p>Reaching consensus on the right approach for migrating to post-quantum signatures is going to require extensive effort and coordination among stakeholders. However, that work is already well underway. For instance, in 2021 we ran large scale <a href="https://blog.cloudflare.com/sizing-up-post-quantum-signatures/"><u>experiments</u></a> to understand the feasibility of post-quantum signatures in the WebPKI, and we have more studies planned.</p>
    <div>
      <h2>What’s next?</h2>
      <a href="#whats-next">
        
      </a>
    </div>
    <p>Now that NIST has published the first set of standards for post-quantum cryptography, what comes next?</p><p>In 2022, Cloudflare <a href="https://blog.cloudflare.com/post-quantum-cryptography-ga"><u>deployed</u></a> a preliminary version of the ML-KEM key agreement algorithm, Kyber, which is now used to protect <a href="https://radar.cloudflare.com/adoption-and-usage#post-quantum-encryption-adoption"><u>double-digit percentages</u></a> of requests to Cloudflare’s network. We use a <a href="https://datatracker.ietf.org/doc/html/draft-ietf-tls-hybrid-design"><i><u>hybrid</u></i></a> with X25519, to hedge against future advances in cryptanalysis and implementation vulnerabilities. In coordination with industry partners at the <a href="https://www.nccoe.nist.gov/"><u>NIST NCCoE</u></a> and <a href="https://www.ietf.org/"><u>IETF</u></a>, we will upgrade our systems to support the final ML-KEM standard, again using a hybrid. We will slowly phase out support for the pre-standard version X25519Kyber768 after clients have moved to the ML-KEM-768 hybrid, and will quickly phase out X25519Kyber512, which hasn’t seen real-world usage.</p><p>Now that the final standards are available, we expect to see widespread adoption of ML-KEM industry-wide as support is added in software and hardware, and post-quantum becomes the new default for key agreement. Organizations should look into upgrading their systems to use post-quantum key agreement as soon as possible to protect their data from future quantum-capable adversaries. Check if your browser already supports post-quantum key agreement by visiting <a href="https://pq.cloudflareresearch.com"><u>pq.cloudflareresearch.com</u></a>, and if you’re a Cloudflare customer, see how you can <a href="https://blog.cloudflare.com/post-quantum-to-origins/"><u>enable post-quantum key agreement support to your origin</u></a> today.</p><p>Adoption of the newly-standardized post-quantum signatures ML-DSA and SLH-DSA will take longer as stakeholders work to reach consensus on the migration path. We expect the first post-quantum certificates to be available in 2026, but not to be enabled by default. Organizations should prepare for a future flip-the-switch migration to post-quantum signatures, but there is no need to flip the switch just yet.</p><p>We’ll continue to provide updates in this blog and at <a href="https://pq.cloudflareresearch.com"><u>pq.cloudflareresearch.com</u></a>. Don’t hesitate to reach out to us at <a><u>ask-research@cloudflare.com</u></a> with any questions.</p> ]]></content:encoded>
            <category><![CDATA[Research]]></category>
            <category><![CDATA[Cryptography]]></category>
            <category><![CDATA[Post-Quantum]]></category>
            <guid isPermaLink="false">5JwNgDhEFBcPJq3mVrYMUx</guid>
            <dc:creator>Luke Valenta</dc:creator>
            <dc:creator>Vânia Gonçalves</dc:creator>
            <dc:creator>Bas Westerbaan</dc:creator>
        </item>
        <item>
            <title><![CDATA[Harnessing chaos in Cloudflare offices]]></title>
            <link>https://blog.cloudflare.com/harnessing-office-chaos/</link>
            <pubDate>Fri, 08 Mar 2024 14:00:24 GMT</pubDate>
            <description><![CDATA[ This blog post will cover the new sources of “chaos” that have been added to LavaRand and how you can make use of that harnessed chaos in your next application ]]></description>
            <content:encoded><![CDATA[ <p></p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/6VAXGAjHjvvY5IAEG63gPu/4c199f8bb127b03fe613ab8dc6c0016f/image12-1.png" />
            
            </figure><p>In the children’s book <a href="https://en.wikipedia.org/wiki/The_Snail_and_the_Whale">The Snail and Whale</a>, after an unexpectedly far-flung adventure, the principal character returns to declarations of “How time’s flown” and “Haven’t you grown?” It has been about four years since we last wrote about LavaRand and during that time the story of how Cloudflare uses physical sources of entropy to add to the security of the Internet has continued to travel and be a source of interest to many. What was initially just a single species of physical entropy source – lava lamps – has grown and diversified. We want to catch you up a little on the story of LavaRand. This blog post will cover the new sources of “chaos” that have been added to LavaRand and how you can make use of that harnessed chaos in your next application. We’ll cover how public randomness can open up uses of publicly trusted randomness — imagine not needing to take the holders of a “random draw” at their word when they claim the outcome is not manipulated in some way. And finally we’ll discuss timelock encryption which is a way to ensure that a message cannot be decrypted until some chosen time in the future.</p>
    <div>
      <h2>LavaRand origins</h2>
      <a href="#lavarand-origins">
        
      </a>
    </div>
    <p>The entropy sourced from our wall of lava lamps in San Francisco has long played its part in the randomness that secures connections made through Cloudflare.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/5XdIuQkEWKat2c9YanaCY0/aa873b127b5eea8cea19982f3552ccc2/image11-3.png" />
            
            </figure><p>Lava lamps with flowing wax.</p><p>Cloudflare’s servers collectively handle upwards of 55 million HTTP requests per second, the <a href="https://radar.cloudflare.com/adoption-and-usage#http-vs-https">vast majority of which are secured via the TLS protocol</a> to ensure authenticity and confidentiality. Under the hood, cryptographic protocols like TLS require an underlying source of secure randomness – otherwise, the security guarantees fall apart.</p><p>Secure randomness used in cryptography needs to be computationally indistinguishable from “true” randomness. For this, it must both pass <a href="https://en.wikipedia.org/wiki/Randomness_test">statistical randomness tests</a>, and the output needs to be unpredictable to any computationally-bounded adversary, no matter how much previous output they’ve already seen. The typical way to achieve this is to take some random ‘seed’ and feed it into a <a href="https://en.wikipedia.org/wiki/Cryptographically_secure_pseudorandom_number_generator"><i>Cryptographically Secure Pseudorandom Number Generator</i></a> (CSPRNG) that can produce an essentially-endless stream of unpredictable bytes upon request. The properties of a CSPRNG ensure that all outputs are practically indistinguishable from truly random outputs to anyone that does not know its internal state. However, this all depends on having a secure random seed to begin with. Take a look at <a href="/lavarand-in-production-the-nitty-gritty-technical-details">this blog</a> for more details on true randomness versus pseudorandomness, and this blog for some great examples of <a href="/why-randomness-matters">what can go wrong with insecure randomness</a>.</p><p>For many years, Cloudflare’s servers relied on local sources of entropy (such as the precise timing of packet arrivals or keyboard events) to seed their entropy pools. While there’s no reason to believe that the local entropy sources on those servers are insecure or could be easily compromised, we wanted to hedge our bets against that possibility. Our solution was to set up a system where our servers could periodically refresh their entropy pools with true randomness from an external source.</p><p>That brings us to LavaRand. “Lavarand” has long been the name given to <a href="https://en.wikipedia.org/wiki/Lavarand">systems used for the generation of randomness</a> (first by Silicon Graphics in 1997). Cloudflare <a href="/randomness-101-lavarand-in-production/">launched its instantiation of a LavaRand</a> system in 2017 as a system that collects entropy from the wall of lava lamps in our San Francisco office and makes it available via an internal API. Our servers then periodically query the API to retrieve fresh randomness from LavaRand and incorporate it into their entropy pools. The contributions made by LavaRand can be considered spice added to the entropy pool mix! (For more technical details on <a href="/lavarand-in-production-the-nitty-gritty-technical-details">contributions made by LavaRand</a>, read our previous blog post.)</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/1IPp9Lizp0pL83clLWGGNa/19d397787b5a5adbb337f581d9639fce/image10.jpg" />
            
            </figure><p>Lava lamps in Cloudflare’s San Francisco office.</p>
    <div>
      <h2>Adding to the office chaos</h2>
      <a href="#adding-to-the-office-chaos">
        
      </a>
    </div>
    <p>Our lava lamps in San Francisco have been working tirelessly for years to supply fresh entropy to our systems, but they now have siblings across the world to help with their task! As Cloudflare has grown, so has the variety of entropy sources found in and sourced from our offices. <a href="/cloudflare-top-100-most-loved-workplaces-in-2022">Cloudflare’s Places team works hard</a> to ensure that our offices reflect aspects of our values and culture. Several of our larger office locations include installations of physical systems of entropy, and it is these installations that we have worked to incorporate into LavaRand over time. The tangible and exciting draw of these systems is their basis in physical mechanics that we intuitively consider random. The gloops of warmed ascending “lava” floating past cooler sinking blobs within lava lamps attract our attention just as other unpredictable (and often beautiful) dynamic systems capture our interest.</p>
    <div>
      <h3>London’s unpredictable pendulums</h3>
      <a href="#londons-unpredictable-pendulums">
        
      </a>
    </div>
    <p>Visible to visitors of our London office is a wall of double pendulums whose beautiful swings translate to another source of entropy to LavaRand and to the pool of randomness that Cloudflare’s servers pull from.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/1JjgKso6GgfvLX74LEyYsE/7688dcdd10f3f3219f0c569724cb42ab/image8.jpg" />
            
            </figure><p>Close-up of double pendulum display in Cloudflare’s London office.</p><p>To the untrained eye the shadows of the pendulum stands and those cast by the rotating arms on the rear wall might seem chaotic. If so, then this installation should be labeled a success! Different light conditions and those shadows add to the chaos that is captured from this entropy source.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/2JWrKSqoaPJQC2VSbHygj/e87c2936282e55730a1db4af7d4f7e7f/Screenshot-2024-03-08-at-13.13.12.png" />
            
            </figure><p>Double pendulum display in Cloudflare’s London office with changing light conditions.</p><p>Indeed, even with these arms restricted to motion in two dimensions, the path traced by the arms is mesmerizingly varied, and can be shown to be <a href="https://en.wikipedia.org/wiki/Double_pendulum">mathematically chaotic</a>. Even if we forget air resistance, temperature, and the environment, and then assume that the mutation is completely deterministic, still the resulting long-term motion is hard to predict. In particular the system is very sensitive to initial conditions, this initial state – how they are set in motion – paired with deterministic behavior produces a unique path that is traced until the pendulum comes to rest, and the system is set in motion by a Cloudflare employee in London once again.</p>
    <div>
      <h3>Austin’s mesmerizing mobiles</h3>
      <a href="#austins-mesmerizing-mobiles">
        
      </a>
    </div>
    <p>The beautiful new Cloudflare office in Austin, Texas recently celebrated its first year since opening. This office contributes its own spin on physical entropy: suspended above the entrance of the Cloudflare office in downtown Austin is an installation of translucent rainbow mobiles. These twirl, reflecting the changing light, and cast coloured patterns on the enclosing walls. The display of hanging mobiles and their shadows are very sensitive to a physical environment which includes the opening and closing of doors, HVAC changes, and ambient light. This chaotic system’s mesmerizing and changing scene is captured periodically and fed into the stream of LavaRand randomness.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/5mfXP2V8pX0C0CoheE369Q/83fe1b4bdba232b8c8c722bc49987bfe/Screenshot-2024-03-08-at-13.14.22.png" />
            
            </figure><p>Hanging rainbow mobiles in Cloudflare’s Austin office.</p>
    <div>
      <h2>Mixing new sources into LavaRand</h2>
      <a href="#mixing-new-sources-into-lavarand">
        
      </a>
    </div>
    <p>We incorporated the new sources of office chaos into the LavaRand system (still called LavaRand despite including much more than lava lamps) in the same way as the existing lava lamps, which we’ve previously <a href="/lavarand-in-production-the-nitty-gritty-technical-details">described in detail</a>.</p><p>To recap, at repeated intervals, a camera captures an image of the current state of the randomness display. Since the underlying system is truly random, the produced image contains true randomness. Even shadows and changing light conditions play a part in producing something unique and unpredictable! There is another secret that we should share: at a base level, image sensors in the real world are often a source of sufficient noise that even images taken without the lens cap removed could work well as a source of entropy! We consider this added noise to be a serendipitous addition to the beautiful chaotic motion of these installations.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/7zrgpZA2xosqvTzU6dk8V/6e1f061640192f7de4585d7f2959f4a7/Screenshot-2024-03-08-at-13.16.23.png" />
            
            </figure><p>Close-up of hanging rainbow mobiles in Cloudflare’s Austin office.</p><p>Once we have a still image that captures the state of the randomness display at a particular point in time, we compute a compact representation – a hash – of the image to derive a fixed-sized output of truly random bytes.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/1VjuWFkK83t3EkTjPxYGc6/2ddc9da8c2553a8a1dbb04513de6acbd/image4-26.png" />
            
            </figure><p>Process of converting physical entropy displays into random byte strings.</p><p>The random bytes are then used as an input (along with the previous seed and some randomness from the system’s local entropy sources) to a <i>Key Derivation Function</i> (KDF) to compute a new randomness seed that is fed into a <a href="https://en.wikipedia.org/wiki/Cryptographically_secure_pseudorandom_number_generator"><i>Cryptographically Secure Pseudorandom Number Generator</i></a> (CSPRNG) that can produce an essentially-endless stream of unpredictable bytes upon request. The properties of a CSPRNG ensure that all outputs are practically indistinguishable from truly random outputs to anyone that does not know its internal state. LavaRand then exposes this stream of randomness via a simple internal API where clients can request fresh randomness.</p>
            <pre><code>seed = KDF(new image || previous seed || system randomness)
rng = CSPRNG(seed)
…
rand1 = rng.random()
rand2 = rng.random()</code></pre>
            
    <div>
      <h2>How can I use LavaRand?</h2>
      <a href="#how-can-i-use-lavarand">
        
      </a>
    </div>
    <p>Applications typically use secure randomness in one of two flavors: private and public.</p><p><b>Private randomness</b> is used for generating passwords, cryptographic keys, user IDs, and other values that are meant to stay secret forever. As we’ve <a href="/lavarand-in-production-the-nitty-gritty-technical-details">previously described</a>, our servers periodically request fresh private randomness from LavaRand to help to update their entropy pools. Because of this, randomness from LavaRand is essentially available to the outside world! One easy way for developers to tap into private randomness from LavaRand is to use the <a href="https://developers.cloudflare.com/workers/runtime-apis/web-crypto/#methods">Web Crypto API’s getRandomValues function</a> from a Cloudflare Worker, or use one that someone has already built, like <a href="https://csprng.xyz/">csprng.xyz</a> (<a href="https://github.com/ejcx/csprng.xyz">source</a>).</p><p><b>Public randomness</b> consists of unpredictable and unbiased random values that are made available to everyone once they are published, and for this reason <b><i>should not be used for generating cryptographic keys</i></b>. The winning lottery numbers and the coin flip at the start of a sporting event are some examples of public random values. A double-headed coin would <i>not</i> be an unbiased and unpredictable source of entropy and would have drastic impacts on the sports betting world.</p><p>In addition to being unpredictable and unbiased, it’s also desirable for public randomness to be <i>trustworthy</i> so that consumers of the randomness are assured that the values were faithfully produced. Not many people would buy lottery tickets if they believed that the winning ticket was going to be chosen unfairly! Indeed, there are known cases of corrupt insiders subverting public randomness for personal gain, like the <a href="https://www.nytimes.com/interactive/2018/05/03/magazine/money-issue-iowa-lottery-fraud-mystery.html">state lottery employee</a> who co-opted the lottery random number generator, allowing his friends and family to win millions of dollars.</p><p>A fundamental challenge of public randomness is that one must trust the authority producing the random outputs. Trusting a well-known authority like <a href="https://beacon.nist.gov/home">NIST</a> may suffice for many applications, but could be problematic for others (especially for applications where decentralization is important).</p>
    <div>
      <h2>drand: distributed and verifiable public randomness</h2>
      <a href="#drand-distributed-and-verifiable-public-randomness">
        
      </a>
    </div>
    <p>To help solve this problem of trust, Cloudflare joined forces with seven other independent and geographically distributed organizations back in 2019 to form the <a href="/league-of-entropy/">League of Entropy</a> to launch a public randomness beacon using the <a href="/inside-the-entropy">drand</a> (pronounced dee-rand) protocol. Each organization contributes its own unique source of randomness into the joint pool of entropy used to seed the drand network – with Cloudflare using randomness from LavaRand, of course!</p><p>While the League of Entropy started out as an experimental network, with the guidance and support from the drand team at <a href="https://protocol.ai/">Protocol Labs</a>, it’s become a reliable and production-ready core Internet service, relied upon by applications ranging from <a href="https://spec.filecoin.io/libraries/drand/">distributed file storage</a> to <a href="https://twitter.com/etherplay/status/1734875536608882799">online gaming</a> to <a href="https://medium.com/tierion/tierion-joins-the-league-of-entropy-replaces-nist-randomness-beacon-with-drand-in-chainpoint-9f3c32f0cd9b">timestamped proofs</a> to <a href="https://drand.love/docs/timelock-encryption/">timelock encryption</a> (discussed further below). The League of Entropy has also grown, and there are now 18 organizations across four continents participating in the drand network.</p><p>The League of Entropy’s drand beacons (each of which runs with different parameters, such as how frequently random values are produced and whether the randomness is <i>chained</i> – more on this below) have two important properties that contribute to their trustworthiness: they are <i>decentralized</i> and <i>verifiable</i>. Decentralization ensures that one or two bad actors cannot subvert or bias the randomness beacon, and verifiability allows anyone to check that the random values are produced according to the drand protocol and with participation from a threshold (at least half, but usually more) of the participants in the drand network. Thus, with each new member, the trustworthiness and reliability of the drand network continues to increase.</p><p>We give a brief overview of how drand achieves these properties using distributed key generation and threshold signatures below, but for an in-depth dive see our <a href="/inside-the-entropy">previous blog post</a> and some of the <a href="https://drand.love/blog/">excellent posts</a> from the drand team.</p>
    <div>
      <h3>Distributed key generation and threshold signatures</h3>
      <a href="#distributed-key-generation-and-threshold-signatures">
        
      </a>
    </div>
    <p>During the initial setup of a drand beacon, nodes in the network run a distributed key generation (DKG) protocol based on the <a href="https://en.wikipedia.org/wiki/Distributed_key_generation">Pedersen commitment scheme</a>, the result of which is that each node holds a “share” (a keypair) for a distributed group key, which remains fixed for the lifetime of the beacon. In order to do something useful with the group secret key like signing a message, at least a threshold (for example 7 out of 9) of nodes in the network must participate in constructing a <a href="https://en.wikipedia.org/wiki/BLS_digital_signature">BLS threshold signature</a>. The group information for the <a href="https://drand.love/blog/2023/10/16/quicknet-is-live/">quicknet</a> beacon on the League of Entropy’s mainnet drand network is shown below:</p>
            <pre><code>curl -s https://drand.cloudflare.com/52db9ba70e0cc0f6eaf7803dd07447a1f5477735fd3f661792ba94600c84e971/info | jq
{
  "public_key": "83cf0f2896adee7eb8b5f01fcad3912212c437e0073e911fb90022d3e760183c8c4b450b6a0a6c3ac6a5776a2d1064510d1fec758c921cc22b0e17e63aaf4bcb5ed66304de9cf809bd274ca73bab4af5a6e9c76a4bc09e76eae8991ef5ece45a",
  "period": 3,
  "genesis_time": 1692803367,
  "hash": "52db9ba70e0cc0f6eaf7803dd07447a1f5477735fd3f661792ba94600c84e971",
  "groupHash": "f477d5c89f21a17c863a7f937c6a6d15859414d2be09cd448d4279af331c5d3e",
  "schemeID": "bls-unchained-g1-rfc9380",
  "metadata": {
    "beaconID": "quicknet"
  }
}</code></pre>
            <p>(The hex value 52db9b… in the URL above is the hash of the beacon’s configuration. Visit <a href="https://drand.cloudflare.com/chains">https://drand.cloudflare.com/chains</a> to see all beacons supported by our mainnet drand nodes.)</p><p>The nodes in the network are configured to periodically (every 3s for quicknet) work together to produce a signature over some agreed-upon message, like the current round number and previous round signature (more on this below). Each node uses its share of the group key to produce a partial signature over the current round message, and broadcasts it to other nodes in the network. Once a node has enough partial signatures, it can aggregate them to produce a group signature for the given round.</p>
            <pre><code>curl -s https://drand.cloudflare.com/52db9ba70e0cc0f6eaf7803dd07447a1f5477735fd3f661792ba94600c84e971/public/13335 | jq
{
  "round": 13335,
  "randomness": "f4eb2e59448d155b1bc34337f2a4160ac5005429644ba61134779a8b8c6087b6",
  "signature": "a38ab268d58c04ce2d22b8317e4b66ecda5fa8841c7215bf7733af8dbaed6c5e7d8d60b77817294a64b891f719bc1b40"
}</code></pre>
            <p>The group signature for a round <i>is</i> the randomness (in the output above, the randomness value is simply the sha256 hash of the signature, for applications that prefer a shorter, fixed-sized output). The signature is unpredictable in advance as long as enough (at least a majority, but can be configured to be higher) of the nodes in the drand network are honest and do not collude. Further, anyone can validate the signature for a given round using the beacon’s group public key. It’s recommended that developers use the drand client <a href="https://drand.love/developer/clients/">libraries</a> or <a href="https://drand.love/developer/drand-client/">CLI</a> to perform verification on every value obtained from the beacon.</p>
    <div>
      <h3>Chained vs unchained randomness</h3>
      <a href="#chained-vs-unchained-randomness">
        
      </a>
    </div>
    <p>When the League of Entropy launched its first generation of drand beacons in 2019, the per-round message over which the group signature was computed included the previous round’s signature. This creates a chain of randomness rounds all the way to the first “genesis” round. Chained randomness provides some nice properties for single-source randomness beacons, and is included as a requirement in <a href="https://csrc.nist.gov/projects/interoperable-randomness-beacons">NIST’s spec for interoperable public randomness beacons</a>.</p><p>However, back in 2022 the drand team introduced the notion of <a href="https://drand.love/blog/2022/02/21/multi-frequency-support-and-timelock-encryption-capabilities/#unchained-randomness-timed-encryption">unchained randomness</a>, where the message to be signed is <i>predictable</i> and doesn’t depend on any randomness from previous rounds, and showed that it provides the same security guarantees as chained randomness for the drand network (both require an honest threshold of nodes). In the implementation of unchained randomness in the <a href="https://drand.love/blog/2023/10/16/quicknet-is-live/">quicknet</a>, the message to be signed simply consists of the round number.</p>
            <pre><code># chained randomness
signature = group_sign(round || previous_signature)

# unchained randomness
signature = group_sign(round)</code></pre>
            <p>Unchained randomness provides some powerful properties and usability improvements. In terms of usability, a consumer of the randomness beacon does not need to reconstruct the full chain of randomness to the genesis round to fully validate a particular round – the only information needed is the current round number and the group public key. This provides much more flexibility for clients, as they can choose how frequently they consume randomness rounds without needing to continuously follow the randomness chain.</p><p>Since the messages to be signed are known in advance (since they’re just the round number), unchained randomness also unlocks a powerful new property: timelock encryption.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/5PVw1hyLALNYG3p20U2f2D/eeac0fd2fe805cabc1b75055cc0b0076/image7-7.png" />
            
            </figure><p>Rotating double pendulums.</p>
    <div>
      <h2>Timelock encryption</h2>
      <a href="#timelock-encryption">
        
      </a>
    </div>
    <p>Timelock (or “timed-release”) encryption is a method for encrypting a message such that it cannot be decrypted until a certain amount of time has passed. Two basic approaches to timelock encryption were described by <a href="https://dspace.mit.edu/bitstream/handle/1721.1/149822/MIT-LCS-TR-684.pdf">Rivest, Shamir, and Wagner</a>:</p><p> There are two natural approaches to implementing timed release cryptography:</p><p>  - Use “time-lock puzzles” – computational problems that cannot be solved without running a computer continuously for at least a certain amount of time.</p><p>  - Use trusted agents who promise not to reveal certain information until a specified date.</p><p>Using trusted agents has the obvious problem of ensuring that the agents are trustworthy. Secret sharing approaches can be used to alleviate this concern.</p><p>The drand network is a group of independent agents using secret sharing for trustworthiness, and the ‘certain information’ not to be revealed until a specified date sounds a lot like the per-round randomness! We describe next how timelock encryption can be implemented on top of a drand network with unchained randomness, and finish with a practical demonstration. While we don’t delve into the bilinear groups and pairings-based cryptography that make this possible, if you’re interested we encourage you to read <a href="https://eprint.iacr.org/2023/189">tlock: Practical Timelock Encryption from Threshold BLS</a> by Nicolas Gailly, Kelsey Melissaris, and Yolan Romailler.</p>
    <div>
      <h3>How to timelock your secrets</h3>
      <a href="#how-to-timelock-your-secrets">
        
      </a>
    </div>
    <p>First, identify the randomness round that, once revealed, will allow your timelock-encrypted message to be decrypted. An important observation is that since drand networks produce randomness at fixed intervals, each round in a drand beacon is closely tied to a specific timestamp (modulo small delays for the network to actually produce the beacon) which can be easily computed taking the beacon’s genesis timestamp and then adding the round number multiplied by the beacon’s period.</p><p>Once the round is decided upon, the properties of bilinear groups allow you to encrypt your message to some round with the drand beacon’s group public key.</p>
            <pre><code>ciphertext = EncryptToRound(msg, round, beacon_public_key)</code></pre>
            <p>After the nodes in the drand network cooperate to derive the randomness for the round (really, just the signature on the round number using the beacon’s group secret key), <i>anyone</i> can decrypt the ciphertext (this is where the magic of bilinear groups comes in).</p>
            <pre><code>random = Randomness(round)
message = Decrypt(ciphertext,random)</code></pre>
            <p>To make this practical, the timelocked message is actually the secret key for a symmetric scheme. This means that we encrypt the message with a symmetric key and encrypt the key with timelock, allowing for a decryption in the future.</p><p>Now, for a practical demonstration of timelock encryption, we use a tool that one of our own engineers built on top of Cloudflare Workers. The <a href="https://github.com/thibmeu/tlock-worker">source code</a> is publicly available if you’d like to take a look under the hood at how it works.</p>
            <pre><code># 1. Create a file
echo "A message from the past to the future..." &gt; original.txt

# 2. Get the drand round 1 minute into the future (20 rounds) 
BEACON="52db9ba70e0cc0f6eaf7803dd07447a1f5477735fd3f661792ba94600c84e971"
ROUND=$(curl "https://drand.cloudflare.com/$BEACON/public/latest" | jq ".round+20")

# 3. Encrypt and require that round number
curl -X POST --data-binary @original.txt --output encrypted.pem https://tlock-worker.crypto-team.workers.dev/encrypt/$ROUND

# 4. Try to decrypt it (and only succeed 20 rounds x 3s later)
curl -X POST --data-binary @encrypted.pem --fail --show-error https://tlock-worker.crypto-team.workers.dev/decrypt</code></pre>
            
    <div>
      <h2>What’s next?</h2>
      <a href="#whats-next">
        
      </a>
    </div>
    <p>We hope you’ve enjoyed revisiting the tale of LavaRand as much as we have, and are inspired to visit one of Cloudflare’s offices in the future to see the randomness displays first-hand, and to use verifiable public randomness and timelock encryption from drand in your next project.</p><p>Chaos is required by the encryption that secures the Internet. LavaRand at Cloudflare will continue to turn the chaotic beauty of our physical world into a randomness stream – even as new sources are added – for novel uses all of us explorers – just like that snail – have yet to dream up.</p><p>And she gazed at the sky, the sea, the landThe waves and the caves and the golden sand.She gazed and gazed, amazed by it all,And she said to the whale, “I feel so small.”</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/aUx8oEz7t6W649nYlAmzD/f4658fe8a6b467804f2e6c21c9dec2cb/image1-30.png" />
            
            </figure><p>A snail on a whale.</p><div>
  
</div><p>Tune in for more news, announcements and thought-provoking discussions! Don't miss the full <a href="https://cloudflare.tv/shows/security-week">Security Week hub page</a>.</p> ]]></content:encoded>
            <category><![CDATA[Security Week]]></category>
            <category><![CDATA[Randomness]]></category>
            <category><![CDATA[LavaRand]]></category>
            <category><![CDATA[Research]]></category>
            <guid isPermaLink="false">2V4nElKOJ2taKnxH7Q9pw6</guid>
            <dc:creator>Cefan Daniel Rubin</dc:creator>
            <dc:creator>Luke Valenta</dc:creator>
            <dc:creator>Thibault Meunier</dc:creator>
        </item>
        <item>
            <title><![CDATA[Cloudflare now uses post-quantum cryptography to talk to your origin server]]></title>
            <link>https://blog.cloudflare.com/post-quantum-to-origins/</link>
            <pubDate>Fri, 29 Sep 2023 13:00:45 GMT</pubDate>
            <description><![CDATA[ Starting today, you can secure the connection between Cloudflare and your origin server with post-quantum cryptography ]]></description>
            <content:encoded><![CDATA[ <p></p><p>Quantum computers pose a <a href="/the-quantum-menace/">serious threat</a> to security and privacy of the Internet: encrypted communication intercepted today can be decrypted <a href="https://en.wikipedia.org/wiki/Harvest_now,_decrypt_later">in the future</a> by a sufficiently advanced quantum computer. To counter this <a href="https://en.wikipedia.org/wiki/Harvest_now,_decrypt_later">store-now/decrypt-later</a> threat, cryptographers have been hard at work over the last decades proposing and vetting <a href="https://www.cloudflare.com/learning/ssl/quantum/what-is-post-quantum-cryptography/">post-quantum cryptography (PQC)</a>, cryptography that’s designed to withstand attacks of quantum computers. After a six-year public competition, in July 2022, the US National Institute of Standards and Technology (NIST), known for standardizing AES and SHA, announced <a href="https://pq-crystals.org/kyber/index.shtml">Kyber</a> as <a href="/nist-post-quantum-surprise/">their pick</a> for post-quantum key agreement. Now the baton has been handed to Industry to deploy post-quantum key agreement to protect today’s communications from the threat of future decryption by a quantum computer.</p><p>Cloudflare operates as a reverse proxy between clients (“visitors”) and customers’ web servers (“origins”), so that we can protect origin sites from attacks and improve site performance. In this post we explain how we secure the connection from Cloudflare to <i>origin servers</i>. To put that in context, let’s have a look at the connection involved when visiting an uncached page on a website served through Cloudflare.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/2WZQZByAjMmuu53BzxjNik/170ebefe3aec6f8277f4c2e4e34b76f1/Connections-involved-when-user-visits-an-uncached-page-on-a-website-served-through-Cloudflare.png" />
            
            </figure><p>The first connection is from the visitor’s browser to Cloudflare. In October 2022, <a href="/post-quantum-for-all/">we enabled <i>X25519+Kyber</i> as a beta for all websites and APIs</a> served through Cloudflare. However, it takes two to tango: the connection is only secured if the browser also supports post-quantum cryptography. As of August 2023, <a href="https://blog.chromium.org/2023/08/protecting-chrome-traffic-with-hybrid.html">Chrome</a> is slowly enabling <i>X25519+Kyber</i> by default.</p><p>The visitor’s request is routed through Cloudflare’s network (2). We have <a href="/post-quantum-cryptography-ga">upgraded</a> many of these internal connections to use post-quantum cryptography, and expect to be done upgrading all of our internal connections by the end of 2024. That leaves as the final link the connection (3) between us and the <i>origin server</i>.</p><p>We are happy to announce that <b>we are rolling out support for X25519+Kyber for most outbound connections</b>, including <i>origin servers</i> and <a href="https://workers.cloudflare.com/">Cloudflare Workers</a> <code>fetch()</code> calls.</p>
<table>
<thead>
  <tr>
    <th><span>Plan</span></th>
    <th><span>Support for post-quantum outbound connections</span></th>
  </tr>
</thead>
<tbody>
  <tr>
    <td><span>Free</span></td>
    <td><span>Started roll-out. Aiming for 100% by the end of the October.</span></td>
  </tr>
  <tr>
    <td><span>Pro and Business</span></td>
    <td><span>Started roll-out. Aiming for 100% by the end of year.</span></td>
  </tr>
  <tr>
    <td><span>Enterprise</span></td>
    <td><span>Start roll-out February 2024. 100% by March 2024.</span></td>
  </tr>
</tbody>
</table><p>You can skip the roll-out and opt-in your zone today, or opt-out ahead of time, using an API described below. Before rolling out this support for enterprise customers in February 2024, we will add a toggle on the dashboard to opt out.</p><p>In this post we will dive into the nitty-gritty of what we enabled; how we have to be a bit subtle to prevent breaking connections to origins that are not ready yet, and how you can add support to your (origin) server.</p><p>But before we dive in, for the impatient:</p>
    <div>
      <h3>Quick start</h3>
      <a href="#quick-start">
        
      </a>
    </div>
    <p>To enable a post-quantum connection between Cloudflare and your origin server today, opt-in your zone to skip the gradual roll-out:</p>
            <pre><code>curl --request PUT \
  --url https://api.cloudflare.com/client/v4/zones/(zone_id)/cache/origin_post_quantum_encryption \
  --header 'Content-Type: application/json' \
  --header 'Authorization: Bearer (API token)' \
  --data '{"value": "preferred"}'</code></pre>
            <p>Replace <a href="https://developers.cloudflare.com/fundamentals/setup/find-account-and-zone-ids/"><code>(zone_id)</code></a> and <a href="https://developers.cloudflare.com/fundamentals/api/get-started/create-token/"><code>(API token)</code></a> appropriately. Then, make sure your server supports TLS 1.3; enable and prefer the key agreement <code>X25519Kyber768Draft00;</code> and ensure it’s configured with <i>server cipher preference</i>. For example, to configure <a href="https://www.nginx.com/">nginx</a> (compiled with a recent <a href="https://boringssl.googlesource.com/boringssl">BoringSSL</a>) like this, use</p>
            <pre><code>	http {
		# [...]
		ssl_ecdh_curve X25519Kyber768Draft00:X25519;
		ssl_prefer_server_ciphers on;
		ssl_protocols TLSv1.3;
	}</code></pre>
            <p>To check your server is properly configured, you can use the <code>bssl</code> tool of <a href="https://github.com/google/boringssl">BoringSSL</a>:</p>
            <pre><code>	$ bssl client -connect (your server):443 -curves X25519:X25519Kyber768Draft00
[...]
	  ECDHE curve: X25519Kyber768Draft00
[...]</code></pre>
            <p>We’re looking for <code>X25519Kyber768Draft00</code> for a post-quantum connection as shown above instead of merely <code>X25519</code>.For more client and server support, check out <a href="https://pq.cloudflareresearch.com/">pq.cloudflareresearch.com</a>. Now, let’s dive in.</p>
    <div>
      <h2>Overview of a TLS 1.3 handshake</h2>
      <a href="#overview-of-a-tls-1-3-handshake">
        
      </a>
    </div>
    <p>To understand how a smooth upgrade is possible, and where it might go wrong, we need to understand a few basics of the TLS 1.3 protocol, which is used to protect traffic on the Internet. A TLS connection starts with a <b>handshake</b> which is used to authenticate the server and derive a shared key. The browser (client) starts by sending a <i>ClientHello</i> message that contains among other things, the hostname (SNI) and the list of key agreement methods it supports.</p><p>To remove a round trip, the client is allowed to make a guess of what the server supports and start the key agreement by sending one or more <i>client keyshares</i>. That guess might be correct (on the left in the diagram below) or the client has to retry (on the right). By the way, this guessing of keyshares is a <a href="/rfc-8446-aka-tls-1-3/">new feature of TLS 1.3</a>, and it is the main reason why it’s faster than TLS 1.2.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/QbpgdMdMdt9aW2nmrBSnT/97fee7c97d8c726e29fbf7b72666bfb6/image2-30.png" />
            
            </figure><p><i>Protocol flow for server-authenticated TLS 1.3 with a supported client keyshare on the left and a</i> HelloRetryRequest <i>on the right.</i></p><p>In both cases the client sends a <i>client keyshare</i> to the server. From this client keyshare the server generates the <i>shared key</i>. The server then returns a <i>server keyshare</i> with which the client can also compute the shared key. This shared key is used to protect the rest of the connection using symmetric cryptography, such as AES.</p><p>Today <a href="https://cr.yp.to/ecdh.html">X25519</a> is used as the key agreement in the vast majority of connections. To secure the connection against store-now/decrypt-later in the post-quantum world, a client can simply send a <a href="https://datatracker.ietf.org/doc/draft-tls-westerbaan-xyber768d00/">X25519+Kyber</a> keyshare.</p>
    <div>
      <h3>Hello! Retry Request? (HRR)</h3>
      <a href="#hello-retry-request-hrr">
        
      </a>
    </div>
    <p>What we just described is the happy flow, where the client guessed correctly which key agreement the server supports. If the server does not support the keyshare that the client sent, then the server picks one of the supported key agreements that the client advertised, and asks for it in a <i>HelloRetryRequest</i> message.</p><p>This is not the only case where a server can use a HelloRetryRequest: even if the client sent keyshares that the server supports, the server is allowed to prefer a different key agreement the client advertised, and ask for it with a HelloRetryRequest. This will turn out to be very useful.</p><p>_HelloRetryRequest_s are mostly undesirable: they add an extra round trip, and bring us back to the performance of TLS 1.2. We already had a transition of key agreement methods: back in the day P-256 was the de facto standard. When browsers couldn’t assume support for the newer X25519, some would send two keyshares, both X25519 and P-256 to prevent a <i>HelloRetryRequest</i>.</p><p>Also today, when enabling <a href="https://blog.chromium.org/2023/08/protecting-chrome-traffic-with-hybrid.html">Kyber in Chrome</a>, Chrome will send two keyshares: X25519 and X25519+Kyber to prevent a <i>HelloRetryRequest</i>. Sending two keyshares is not ideal: it requires the client to compute more, and it takes more space on the wire. This becomes more problematic when we want to send two post-quantum keyshares, as post-quantum keyshares are much larger. Talking about post-quantum keyshares, let’s have a look at X25519+Kyber.</p>
    <div>
      <h2>The nitty-gritty of X25519+Kyber</h2>
      <a href="#the-nitty-gritty-of-x25519-kyber">
        
      </a>
    </div>
    <p>The full name of the post-quantum key agreement we have enabled is <a href="https://datatracker.ietf.org/doc/draft-tls-westerbaan-xyber768d00/">X25519Kyber768Draft00</a>, which has become the industry standard for early deployment. It is the combination (a so-called <i>hybrid</i>, more about that later) of two key agreements: <a href="https://cr.yp.to/ecdh.html">X25519</a> and a <a href="https://datatracker.ietf.org/doc/draft-cfrg-schwabe-kyber/">preliminary version</a> of NIST’s pick Kyber. Preliminary, because standardization of Kyber is not complete: NIST has released a <a href="https://csrc.nist.gov/pubs/fips/203/ipd">draft standard</a> for which it has requested public input. The final standard might change a little, but we do not expect any radical changes in security or performance. One notable change is the name: the NIST standard is set to be called <a href="https://csrc.nist.gov/pubs/fips/203/ipd"><i>ML-KEM</i></a>. Once ML-KEM is released in 2024, we will promptly adopt support for the corresponding hybrid, and deprecate support for X25519Kyber768Draft00. We will announce deprecation on this blog and <a href="https://pq.cloudflareresearch.com/">pq.cloudflareresearch.com</a>.</p>
    <div>
      <h3>Picking security level: 512 vs 768</h3>
      <a href="#picking-security-level-512-vs-768">
        
      </a>
    </div>
    <p>Back in 2022, for incoming connections, <a href="/post-quantum-for-all/">we enabled</a> hybrids with both Kyber512 and Kyber768. The difference is target security level: Kyber512 aims for the same security as AES-128, whereas Kyber768 matches up with AES-192. Contrary to popular belief, AES-128 is <a href="/nist-post-quantum-surprise/#grover-s-algorithm">not broken</a> in practice by quantum computers.</p><p>So why go with Kyber768? After years of analysis, there is no indication that Kyber512 fails to live up to its target security level. The designers of Kyber feel more comfortable, though, with the wider security margin of Kyber768, and we follow their advice.</p>
    <div>
      <h3>Hybrid</h3>
      <a href="#hybrid">
        
      </a>
    </div>
    <p>It is not inconceivable though, that an unexpected improvement in cryptanalysis will completely break Kyber768. Notably <a href="https://eprint.iacr.org/2022/214.pdf">Rainbow</a>, GeMMS and <a href="https://eprint.iacr.org/2022/975">SIDH</a> survived several rounds of public review before being broken. We do have to add nuance here. For a big break you need some mathematical trick, and compared to other schemes, SIDH had a lot of <i>mathematical attack surface</i>. Secondly, even though a scheme participated in many rounds of review doesn’t mean it saw a lot of attention. Because of their performance characteristics, these three schemes have more niche applications, and therefore received much less scrutiny from cryptanalysts. In contrast, Kyber is the big prize: breaking it will ensure fame.</p><p>Notwithstanding, for the moment, we feel it’s wiser to stick with hybrid key agreement. We combine Kyber together with X25519, which is currently the de facto standard key agreement, so that if Kyber turns out to be broken, we retain the non-post quantum security of X25519.</p>
    <div>
      <h3>Performance</h3>
      <a href="#performance">
        
      </a>
    </div>
    <p>Kyber is fast. Very fast. It easily beats X25519, which is already known for its speed:</p><table>
	<thead>
		<tr>
			<th> </th>
			<th> </th>
			<th><span>Size keyshares(in bytes)</span></th>
			<th><span>Ops/sec (higher is better)</span></th>
		</tr>
	</thead>
	<tbody>
		<tr>
			<td><span>Algorithm</span></td>
			<td><span>PQ</span></td>
			<td><strong>Client</strong></td>
			<td><strong>Server</strong></td>
			<td><strong>Client</strong></td>
			<td><strong>Server</strong></td>
		</tr>
		<tr>
			<td><strong>X25519</strong></td>
			<td><span>❌</span></td>
			<td><span>32</span></td>
			<td><span>32</span></td>
			<td><span>17,000</span></td>
			<td><span>17,000</span></td>
		</tr>
		<tr>
			<td><strong>Kyber768</strong></td>
			<td><span>✅</span></td>
			<td><span>1,184</span></td>
			<td><span>1,088</span></td>
			<td><span>31,000</span></td>
			<td><span>70,000</span></td>
		</tr>
		<tr>
			<td><strong>X25519Kyber768Draft00</strong></td>
			<td><span>✅</span></td>
			<td><span>1,216</span></td>
			<td><span>1,120</span></td>
			<td><span>11,000</span></td>
			<td><span>14,000</span></td>
		</tr>
	</tbody>
</table><p>Combined X25519Kyber768Draft00 is slower than X25519, but not by much. The big difference is its size: when connecting the client has to send 1,184 extra bytes for Kyber in the first message. That brings us to the next topic.</p>
    <div>
      <h2>When things break, and how to move forward</h2>
      <a href="#when-things-break-and-how-to-move-forward">
        
      </a>
    </div>
    
    <div>
      <h3>Split ClientHello</h3>
      <a href="#split-clienthello">
        
      </a>
    </div>
    <p>As we saw, the <i>ClientHello</i> is the first message that is sent by the client when setting up a TLS connection. With X25519, the ClientHello almost always fits within one network packet. With Kyber, the ClientHello doesn’t fit anymore with typical packet sizes and needs to be split over two network packets.</p><p>The TLS standard allows for the ClientHello to be split in this way. However, it used to be so exceedingly rare to see a split ClientHello that there is plenty of software and hardware out there that falsely assumes it never happens.</p><p>This so-called <b>protocol ossification</b> is the major challenge rolling out post-quantum key agreement. Back in 2019, during <a href="/the-tls-post-quantum-experiment/">earlier post-quantum experiments</a>, middleboxes of a particular vendor dropped connections with a split ClientHello. Chrome is currently <a href="https://blog.chromium.org/2023/08/protecting-chrome-traffic-with-hybrid.html">slowly ramping up</a> the number of post-quantum connections to catch these issues early. Several reports are listed <a href="https://twitter.com/davidcadrian/status/1692572405368078816">here</a>, and luckily most vendors seem to fix issues promptly.</p><p>Over time, with the slow ramp up of browsers, many of these implementation bugs will be found and corrected. However, we cannot completely rely on this for our outbound connections since in many cases Cloudflare is the sole client to connect directly to the origin server. Thus, we must exercise caution when deploying post-quantum cryptography to ensure that we are still able to reach origin servers even in the presence of buggy implementations.</p>
    <div>
      <h3>HelloRetryRequest to the rescue</h3>
      <a href="#helloretryrequest-to-the-rescue">
        
      </a>
    </div>
    <p>To enable support for post-quantum key agreement on all outbound connections, without risking issues with split ClientHello for those servers that are not ready yet, we make clever use of HelloRetryRequest. Instead of sending a X25519+Kyber keyshare, we will only advertise support for it, and send a non-post quantum secure X25519 keyshare in the first ClientHello.</p><p>If the origin does not support X25519+Kyber, then nothing changes. One might wonder: could merely advertising support for it trip up any origins? This used to be a real concern in the past, but luckily browsers have adopted a clever mechanism called <a href="https://datatracker.ietf.org/doc/html/rfc8701">GREASE</a>: they will send codepoints selected from unpredictable regions to make it hard to implement any software that could trip up on unknown codepoints.</p><p>If the origin does support X25519+Kyber, then it can use the HelloRetryRequest to request a post-quantum key agreement from us.</p><p>Things might still break then: for instance a malfunctioning middlebox, load-balancer, or the server software itself might still trip over the large ClientHello with X25519+Kyber sent in response to the HelloRetryRequest.</p><p>If we’re frank, the HRR trick kicks the can down the road: we as an industry will need to fix broken hardware and software before we can enable post-quantum on every last connection. The important thing though is that those past mistakes will not hold us back from securing the majority of connections. Luckily, from our experience, breakage will not be common.</p><p>So, when you have flipped the switch on your origin server, and things do break against expectation, what could be the root cause?</p>
    <div>
      <h3>Debugging and examples</h3>
      <a href="#debugging-and-examples">
        
      </a>
    </div>
    <p>It’s impossible to exhaustively list all bugs that could interfere with the post-quantum connection, but we like to share a few we’ve seen.</p><p>The first step is to figure out what pieces of hardware and software are involved in the connection. Rarely it’s just the server: there could be a load-balancer, and even a humble router could be at fault.</p><p>One straightforward mistake is to conveniently assume the ClientHello is small by reserving only a small, say 1000 byte, buffer.</p><p>A variation of this is where a server uses a single call to <a href="https://man7.org/linux/man-pages/man2/recv.2.html"><code>recv()</code></a> to read the ClientHello from the TCP connection. This works perfectly fine if it fits within one packet, but when split over multiple, it might require more calls.</p><p>Not all issues that we encountered relate directly to split ClientHello. For instance, servers using the Rust TLS library <a href="https://github.com/rustls/rustls">rustls</a> did <a href="https://github.com/rustls/rustls/issues/1373">not implement HelloRetryRequest correctly</a> before 0.21.7.</p><p>If you turned on post-quantum support for your origin, and hit issues, please do reach out: email <a>ask-research@cloudflare.com</a>.</p>
    <div>
      <h2>Opting in and opting out</h2>
      <a href="#opting-in-and-opting-out">
        
      </a>
    </div>
    <p>Now that you know what might lie in wait for you, let’s cover how to configure the outbound connections of your zone. There are three settings. The setting affects all outbound connections for your zone: to the origin server, but also for <code>fetch()</code> requests made by Workers on your zone.</p><table>
	<thead>
		<tr>
			<th><strong>Setting</strong></th>
			<th><strong>Meaning</strong></th>
		</tr>
	</thead>
	<tbody>
		<tr>
			<td><span><span>supported</span></span></td>
			<td><span>Advertise support for post-quantum key agreement, but send a classical keyshare in the first </span><em>ClientHello</em><span>.When the origin supports and prefers X25519+Kyber, a post-quantum connection will be established, but it incurs an extra roundtrip.This is the most compatible way to enable post-quantum.</span></td>
		</tr>
		<tr>
			<td><span><span>preferred</span></span></td>
			<td><span>Send a post-quantum keyshare in the first </span><em>ClientHello</em><span>.When the origin supports X25519+Kyber, a post-quantum connection will be established without an extra roundtrip. We continue advertising support for classical keyshares as well, so that origins that do not support X25519+Kyber will continue to function.
This is the most performant way to enable post-quantum.</span></td>
		</tr>
		<tr>
			<td><span><span>off</span></span></td>
			<td><span>Do not send or advertise support for post-quantum key agreement to the origin.</span></td>
		</tr>
		<tr>
			<td><span>(default)</span></td>
			<td><span>Allow us to determine the best behavior for your zone. (More about that later.)</span></td>
		</tr>
	</tbody>
</table><p>The setting can be adjusted using the following API call:</p>
            <pre><code>curl --request PUT \
  --url https://api.cloudflare.com/client/v4/zones/(zone_id)/cache/origin_post_quantum_encryption \
  --header 'Content-Type: application/json' \
  --header 'Authorization: Bearer (API token)' \
  --data '{"value": "(setting)"}'</code></pre>
            <p>Here, the parameters are as follows.</p><table>
	<thead>
		<tr>
			<th><strong>Parameter</strong></th>
			<th><strong>Value</strong></th>
		</tr>
	</thead>
	<tbody>
		<tr>
			<td><span>setting</span></td>
			<td><span><span>supported</span>, <span>preferred</span>, or <span>off</span>, with meaning as described above</span></td>
		</tr>
		<tr>
			<td><span>zone_id</span></td>
			<td><span>Identifier of the zone to control. You can </span><a href="https://developers.cloudflare.com/fundamentals/setup/find-account-and-zone-ids/"><u>look up the zone_id</u></a><span> in the dashboard.</span></td>
		</tr>
		<tr>
			<td><span>API token</span></td>
			<td><span>Token used to authenticate you. You can </span><a href="https://developers.cloudflare.com/fundamentals/api/get-started/create-token/"><u>create one in the dashboard</u></a><span>. Use </span><em>create custom token</em><span> and under permissions select </span><em>zone → zone settings → edit</em><span>.</span></td>
		</tr>
	</tbody>
</table>
    <div>
      <h3>Testing whether your origin server is configured correctly</h3>
      <a href="#testing-whether-your-origin-server-is-configured-correctly">
        
      </a>
    </div>
    <p>If you set your zone to <code>preferred</code> mode, you only need to check support for the proper post-quantum key agreement with your origin server. This can be done with the <code>bssl</code> tool of <a href="https://github.com/google/boringssl">BoringSSL</a>:</p>
            <pre><code>	$ bssl client -connect (your server):443 -curves X25519:X25519Kyber768Draft00
[...]
	  ECDHE curve: X25519Kyber768Draft00
[...]</code></pre>
            <p>If you set your zone to <code>supported</code> mode, or if you wait for the gradual roll-out, you will need to make sure that your origin server prefers post-quantum key agreement even if we sent a classical keyshare in the initial <i>ClientHello</i>. This can be done with <a href="https://github.com/cloudflare/boringssl-pq">our fork of BoringSSL</a>:</p>
            <pre><code>	$ git clone https://github.com/cloudflare/boringssl-pq
	[...]
	$ cd boringssl-pq &amp;&amp; cmake -B build &amp;&amp; make -C build
$ build/bssl client -connect (your server):443 -curves X25519:X25519Kyber768Draft00 -disable-second-keyshare
[...]
	  ECDHE curve: X25519Kyber768Draft00
[...]</code></pre>
            
    <div>
      <h2>Scanning ahead to remove the extra roundtrip</h2>
      <a href="#scanning-ahead-to-remove-the-extra-roundtrip">
        
      </a>
    </div>
    <p>With the <i>HelloRetryRequest</i> trick today, we can safely advertise support for post-quantum key agreement to all origins. The downside is that for those origins that do support post-quantum key agreement, we’re incurring an extra roundtrip for the <i>HelloRetryRequest</i>, which hurts performance.</p><p>You can remove the roundtrip by configuring your zone as <code>preferred</code>, but we can do better: the best setting is the one you shouldn’t have to touch.</p><p>We have started scanning all active origins for support of post-quantum key agreement. Roughly every 24 hours, we will attempt a series of about ten TLS connections to your origin, to test support and preferences for the various key agreements.</p><p>Our preliminary results show that 0.5% of origins support a post-quantum connection. As expected, we found that a small fraction (&lt;0.34%) of all origins do not properly establish a connection, when we send a post-quantum keyshare in the first ClientHello, which corresponds to the <code>preferred</code> setting. Unexpectedly the vast majority of these origins do return a <i>HelloRetryRequest</i>, but fail after receiving the second ClientHello with a classical keyshare. We are investigating the exact causes of these failures, and will reach out to vendors to help resolve them.</p><p>Later this year, we will start using these scan results to determine the best setting for zones that haven’t been configured yet. That means that for those zones whose origins support it reliably, we will send a post-quantum keyshare directly without extra roundtrip.</p>
    <div>
      <h3>Also speeding up non post-quantum origins</h3>
      <a href="#also-speeding-up-non-post-quantum-origins">
        
      </a>
    </div>
    <p>The scanner pipeline we built will not just benefit post-quantum origins. By default we send X25519, but not every origin supports or prefers X25519. We find that 4% of origin servers will send us a HelloRetryRequest for other key agreements such as P-384.</p>
<table>
<thead>
  <tr>
    <th><span>Key agreement</span></th>
    <th><span>Fraction supported</span></th>
    <th><span>Fraction preferred</span></th>
  </tr>
</thead>
<tbody>
  <tr>
    <td><span>X25519</span></td>
    <td><span>96%</span></td>
    <td><span>96%</span></td>
  </tr>
  <tr>
    <td><span>P-256</span></td>
    <td><span>97%</span></td>
    <td><span>0.6%</span></td>
  </tr>
  <tr>
    <td><span>P-384</span></td>
    <td><span>89%</span></td>
    <td><span>2.3%</span></td>
  </tr>
  <tr>
    <td><span>P-521</span></td>
    <td><span>82%</span></td>
    <td><span>0.1%</span></td>
  </tr>
  <tr>
    <td><span>X25519Kyber768Draft00</span></td>
    <td><span>0.5%</span></td>
    <td><span>0.5%</span></td>
  </tr>
</tbody>
</table><p>Also, later this year, we will use these scan results to directly send the most preferred keyshare to your origin removing the need for an extra roundtrip caused by HRR.</p>
    <div>
      <h2>Wrapping up</h2>
      <a href="#wrapping-up">
        
      </a>
    </div>
    <p>To mitigate the <i>store-now/decrypt-later</i> threat, and ensure the Internet stays encrypted, the IT industry needs to work together to roll out post-quantum cryptography. We’re excited that today we’re rolling out support for post-quantum secure outbound connections: connections between Cloudflare and the origins.</p><p>We would love it if you would try and enable post-quantum key agreement on your origin. Please, do share your experiences, or reach out for any questions: <a>ask-research@cloudflare.com</a>.</p><p>To follow the latest developments of our deployment of post-quantum cryptography, and client/server support, check out <a href="https://pq.cloudflareresearch.com/">pq.cloudflareresearch.com</a> and keep an eye on this blog.</p> ]]></content:encoded>
            <category><![CDATA[Birthday Week]]></category>
            <category><![CDATA[Post-Quantum]]></category>
            <category><![CDATA[Research]]></category>
            <category><![CDATA[Cryptography]]></category>
            <category><![CDATA[Security]]></category>
            <guid isPermaLink="false">7D9GZLWGiSDKHz84NFp54d</guid>
            <dc:creator>Suleman Ahmad</dc:creator>
            <dc:creator>Luke Valenta</dc:creator>
            <dc:creator>Bas Westerbaan</dc:creator>
        </item>
        <item>
            <title><![CDATA[Privacy-Preserving Compromised Credential Checking]]></title>
            <link>https://blog.cloudflare.com/privacy-preserving-compromised-credential-checking/</link>
            <pubDate>Thu, 14 Oct 2021 12:59:53 GMT</pubDate>
            <description><![CDATA[ Announcing a public demo and open-sourced implementation of a privacy-preserving compromised credential checking service ]]></description>
            <content:encoded><![CDATA[ <p></p><p>Today we’re announcing a <a href="https://migp.cloudflare.com">public demo</a> and an <a href="https://github.com/cloudflare/migp-go">open-sourced Go implementation</a> of a next-generation, privacy-preserving compromised credential checking protocol called MIGP (“Might I Get Pwned”, a nod to Troy Hunt’s “<a href="https://haveibeenpwned.com/About">Have I Been Pwned</a>”). Compromised credential checking services are used to alert users when their credentials might have been exposed in data breaches. Critically, the ‘privacy-preserving’ property of the MIGP protocol means that clients can check for leaked credentials without leaking <i>any</i> information to the service about the queried password, and only a small amount of information about the queried username. Thus, not only can the service inform you when one of your usernames and passwords may have become compromised, but it does so without exposing any unnecessary information, keeping credential checking from becoming a vulnerability itself. The ‘next-generation’ property comes from the fact that MIGP advances upon the current state of the art in credential checking services by allowing clients to not only check if their <i>exact</i> password is present in a data breach, but to check if <i>similar</i> passwords have been exposed as well.</p><p>For example, suppose your password last year was amazon20\$, and you change your password each year (so your current password is amazon21\$). If last year’s password got leaked, MIGP could tell you that your current password is weak and guessable as it is a simple variant of the leaked password.</p><p>The MIGP protocol was designed by researchers at Cornell Tech and the University of Wisconsin-Madison, and we encourage you to <a href="https://arxiv.org/pdf/2109.14490.pdf">read the paper</a> for more details. In this blog post, we provide motivation for why compromised credential checking is important for security hygiene, and how the MIGP protocol improves upon the current generation of credential checking services. We then describe our implementation and the deployment of MIGP within Cloudflare’s infrastructure.</p><p>Our MIGP demo and public API are not meant to replace existing credential checking services today, but rather demonstrate what is possible in the space. We aim to push the envelope in terms of privacy and are excited to employ some cutting-edge cryptographic primitives along the way.</p>
    <div>
      <h2>The threat of data breaches</h2>
      <a href="#the-threat-of-data-breaches">
        
      </a>
    </div>
    <p>Data breaches are rampant. The <a href="https://lmddgtfy.net/?q=million%20customer%20records">regularity of news articles</a> detailing how tens or hundreds of millions of customer records have been compromised have made us almost numb to the details. Perhaps we all hope to stay safe just by being a small fish in the middle of a very large school of similar fish that is being predated upon. But we can do better than just hope that our particular authentication credentials are safe. We can actually check those credentials against known databases of the very same compromised user information we learn about from the news.</p><p>Many of the security breaches we read about involve leaked databases containing user details. In the worst cases, user data entered during account registration on a particular website is made available (often offered for sale) after a data breach. Think of the addresses, password hints, credit card numbers, and other private details you have submitted via an online form. We rely on the care taken by the online services in question to protect those details. On top of this, consider that the same (or quite similar) usernames and passwords are commonly used on more than one site. Our information across all of those sites may be as vulnerable as the site with the weakest security practices. Attackers take advantage of this fact to actively compromise accounts and exploit users every day.</p><p><a href="https://www.cloudflare.com/learning/bots/what-is-credential-stuffing/">Credential stuffing</a> is an attack in which malicious parties use leaked credentials from an account on one service to attempt to log in to a variety of <i>other</i> services. These attacks are effective because of the prevalence of reused credentials across services and domains. After all, who hasn’t at some point had a favorite password they used for everything? (Quick plug: please use a password manager like LastPass to generate unique and complex passwords for each service you use.)</p><p>Website operators have (or should have) a vested interest in making sure that users of their service are using secure and non-compromised credentials. Given the sophistication of techniques employed by malevolent actors, the standard requirement to “include uppercase, lowercase, digit, and special characters” really is not enough (and can be actively harmful according to <a href="https://pages.nist.gov/800-63-3/sp800-63b.html#appA">NIST’s latest guidance</a>). We need to offer better options to users that keep them safe and preserve the privacy of vulnerable information. Dealing with account compromise and recovery is an expensive process for all parties involved.</p><p>Users and organizations need a way to know if their credentials have been compromised, but how can they do it? One approach is to scour dark web forums for data breach torrent links, download and parse gigabytes or terabytes of archives to your laptop, and then search the dataset to see if their credentials have been exposed. This approach is not workable for the majority of Internet users and website operators, but fortunately there’s a better way — have someone with terabytes to spare do it for you!</p>
    <div>
      <h2>Making compromise checking fast and easy</h2>
      <a href="#making-compromise-checking-fast-and-easy">
        
      </a>
    </div>
    <p>This is exactly what compromised credential checking services do: they aggregate breach datasets and make it possible for a client to determine whether a username and password are present in the breached data. <a href="https://haveibeenpwned.com/">Have I Been Pwned</a> (HIBP), launched by Troy Hunt in 2013, was the first major public breach alerting site. It provides a service, Pwned Passwords, where users can <a href="https://www.troyhunt.com/i-wanna-go-fast-why-searching-through-500m-pwned-passwords-is-so-quick/">efficiently check</a> if their passwords have been compromised. The initial version of Pwned Passwords required users to send the full password hash to the service to check if it appears in a data breach. In a <a href="/validating-leaked-passwords-with-k-anonymity/">2018 collaboration</a> with Cloudflare, the service was upgraded to allow users to run range queries over the password dataset, leaking only the salted hash prefix rather than the entire hash. Cloudflare <a href="https://haveibeenpwned.com/Passwords">continues to support</a> the HIBP project by providing CDN and security support for organizations to download the raw Pwned Password datasets.</p><p>The HIBP approach was replicated by <a href="https://www.usenix.org/system/files/sec19-thomas.pdf">Google Password Checkup</a> (GPC) in 2019, with the primary difference that GPC alerts are based on username-password pairs instead of passwords alone, which limits the rate of false positives. <a href="https://www.enzoic.com/">Enzoic</a> and <a href="https://www.microsoft.com/en-us/research/blog/password-monitor-safeguarding-passwords-in-microsoft-edge/">Microsoft Password Monitor</a> are two other similar services. This year, Cloudflare also released <a href="https://developers.cloudflare.com/waf/exposed-credentials-check">Exposed Credential Checks</a> as part of our <a href="https://www.cloudflare.com/learning/ddos/glossary/web-application-firewall-waf/">Web Application Firewall (WAF)</a> to help inform opted-in website owners when login attempts to their sites use compromised credentials. In fact, we use MIGP on the backend for this service to ensure that plaintext credentials <a href="/account-takeover-protection/">never leave the edge server</a> on which they are being processed.</p><p>Most standalone credential checking services work by having a user submit a query containing their password's or username-password pair’s hash prefix. However, this leaks some information to the service, which could be problematic if the service turns out to be malicious or is compromised. In a collaboration with researchers at Cornell Tech published at <a href="https://dl.acm.org/doi/pdf/10.1145/3319535.3354229">CCS’19</a>, we showed just how damaging this leaked information can be. Malevolent actors with access to the data shared with most credential checking services can drastically improve the effectiveness of password-guessing attacks. This left open the question: how can you do compromised credential checking without sharing (leaking!) vulnerable credentials to the service provider itself?</p>
    <div>
      <h3>What does a privacy-preserving credential checking service look like?</h3>
      <a href="#what-does-a-privacy-preserving-credential-checking-service-look-like">
        
      </a>
    </div>
    <p>In the aforementioned <a href="https://dl.acm.org/doi/pdf/10.1145/3319535.3354229">CCS'19 paper</a>, we proposed an alternative system in which only the hash prefix of the <i>username</i> is exposed to the MIGP server (<a href="https://www.usenix.org/system/files/sec19-thomas.pdf">independent work out of Google and Stanford</a> proposed a similar system). No information about the password leaves the user device, alleviating the risk of password-guessing attacks. These credential checking services help to preserve password secrecy, but still have a limitation: they can only alert users if the <i>exact</i> queried password appears in the breach.</p><p>The present evolution of this work, <a href="https://arxiv.org/pdf/2109.14490.pdf">Might I Get Pwned (MIGP)</a>, proposes a next-generation <i>similarity-aware</i> compromised credential checking service that supports checking if a password <i>similar</i> to the one queried has been exposed in the data breach. This approach supports the detection of <i>credential tweaking</i> attacks, an advanced version of credential stuffing.</p><p>Credential tweaking takes advantage of the fact that many users, when forced to change their password, use simple variants of their original password. Rather than just attempting to log in using an exact leaked password, say ‘password123’, a credential tweaking attacker might also attempt to log in with easily-predictable variants of the password such as ‘password124’ and ‘password123!’.</p><p>There are two main mechanisms described in the MIGP paper to add password variant support: client-side generation and server-side precomputation. With client-side generation, the client simply applies a series of transform rules to the password to derive the set of variants (e.g., truncating the last letter or adding a ‘!’ at the end), and runs multiple queries to the MIGP service with each username and password variant pair. The second approach is server-side precomputation, where the server applies the transform rules to generate the password variants when encrypting the dataset, essentially treating the password variants as additional entries in the breach dataset. The MIGP paper describes tradeoffs between the two approaches and techniques for generating variants in more detail. Our demo service includes variant support via server-side precomputation.</p>
    <div>
      <h3>Breach extraction attacks and countermeasures</h3>
      <a href="#breach-extraction-attacks-and-countermeasures">
        
      </a>
    </div>
    <p>One challenge for credential checking services are <i>breach extraction</i> attacks, in which an adversary attempts to learn username-password pairs that are present in the breach dataset (which might not be publicly available) so that they can attempt to use them in future credential stuffing or tweaking attacks. Similarity-aware credential checking services like MIGP can make these attacks more effective, since adversaries can potentially check for more breached credentials per API query. Fortunately, additional measures can be incorporated into the protocol to help counteract these attacks. For example, if it is problematic to leak the number of ciphertexts in a given bucket, dummy entries and padding can be employed, or an alternative length-hiding bucket format can be used. <a href="https://arxiv.org/pdf/2109.14490.pdf">Slow hashing and API rate limiting</a> are other common countermeasures that credential checking services can deploy to slow down breach extraction attacks. For instance, our demo service applies the memory-hard slow hash algorithm scrypt to credentials as part of the key derivation function to slow down these attacks.</p><p>Let’s now get into the nitty-gritty of how the MIGP protocol works. For readers not interested in the cryptographic details, feel free to skip to the demo below!</p>
    <div>
      <h2>MIGP protocol</h2>
      <a href="#migp-protocol">
        
      </a>
    </div>
    <p>There are two parties involved in the MIGP protocol: the client and the server. The server has access to a dataset of plaintext breach entries (username-password pairs), and a secret key used for both the precomputation and the online portions of the protocol. In brief, the client performs some computation over the username and password and sends the result to the server; the server then returns a response that allows the client to determine if their password (or a similar password) is present in the breach dataset.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/7wWJeFPjrWKw67UctL5CPa/86bd7f838d10f71329227ba85daac96f/image8-11.png" />
            
            </figure><p>Full protocol description from the <a href="https://arxiv.org/pdf/2109.14490.pdf">MIGP paper</a>: clients learn if their credentials are in the breach dataset, leaking only the hash prefix of the queried username to the server</p>
    <div>
      <h3>Precomputation</h3>
      <a href="#precomputation">
        
      </a>
    </div>
    <p>At a high level, the MIGP server partitions the breach dataset into <i>buckets</i> based on the hash prefix of the username (the <i>bucket identifier</i>), which is usually 16-20 bits in length.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/2t6QnE6TyphfMbfBOAPMnc/def2d8eb92120a6af7ee0745663d19da/unnamed--1--2.png" />
            
            </figure><p>During the precomputation phase of the MIGP protocol, the server derives password variants, encrypts entries, and stores them in buckets based on the hash prefix of the username</p><p>We use server-side precomputation as the variant generation mechanism in our implementation. The server derives one ciphertext for each exact username-password pair in the dataset, and an additional ciphertext per password variant. A bucket consists of the set ciphertexts for all breach entries and variants with the same username hash prefix. For instance, suppose there are n breach entries assigned to a particular bucket. If we compute m variants per entry, counting the original entry as one of the variants, there will be n*m ciphertexts stored in the bucket. This introduces a large expansion in the size of the processed dataset, so in practice it is necessary to limit the number of variants computed per entry. Our demo server stores 10 ciphertexts per breach entry in the input: the exact entry, eight variants (see <a href="https://arxiv.org/pdf/2109.14490.pdf">Appendix A of the MIGP paper</a>), and a special variant for allowing username-only checks.</p><p>Each ciphertext is the encryption of a username-password (or password variant) pair along with some associated metadata. The metadata describes whether the entry corresponds to an exact password appearing in the breach, or a variant of a breached password. The server derives a per-entry secret key pad using a key derivation function (KDF) with the username-password pair and server secret as inputs, and uses XOR encryption to derive the entry ciphertext. The bucket format also supports storing optional encrypted metadata, such as the date the breach was discovered.</p>
            <pre><code>Input:
  Secret sk       // Server secret key
  String u        // Username
  String w        // Password (or password variant)
  Byte mdFlag     // Metadata flag
  String mdString // Optional metadata string

Output:
  String C        // Ciphertext

function Encrypt(sk, u, w, mdFlag, mdString):
  padHdr=KDF1(u, w, sk)
  padBody=KDF2(u, w, sk)
  zeros=[0] * KEY_CHECK_LEN
  C=XOR(padHdr, zeros || mdFlag) || mdString.length || XOR(padBody, mdString)</code></pre>
            <p>The precomputation phase only needs to be done rarely, such as when the MIGP parameters are changed (in which case the entire dataset must be re-processed), or when new breach datasets are added (in which case the new data can be appended to the existing buckets).</p>
    <div>
      <h3>Online phase</h3>
      <a href="#online-phase">
        
      </a>
    </div>
    
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/38tgoXWJDA2F7AXTWK63y6/606db165b48b09a953044b2e216af88a/image1-39.png" />
            
            </figure><p>During the online phase of the MIGP protocol, the client requests a bucket of encrypted breach entries corresponding to the queried username, and with the server’s help derives a key that allows it to decrypt an entry corresponding to the queried credentials</p><p>The online phase of the MIGP protocol allows a client to check if a username-password pair (or variant) appears in the server’s breach dataset, while only leaking the hash prefix of the username to the server. The client and server engage in an <a href="https://datatracker.ietf.org/doc/html/draft-irtf-cfrg-voprf">OPRF</a> protocol message exchange to allow the client to derive the per-entry decryption key, without leaking the username and password to the server, or the server’s secret key to the client. The client then computes the bucket identifier from the queried username and downloads the corresponding bucket of entries from the server. Using the decryption key derived in the previous step, the client scans through the entries in the bucket attempting to decrypt each one. If the decryption succeeds, this signals to the client that their queried credentials (or a variant thereof) are in the server’s dataset. The decrypted metadata flag indicates whether the entry corresponds to the exact password or a password variant.</p><p>The MIGP protocol solves many of the shortcomings of existing credential checking services with its solution that avoids leaking <i>any</i> information about the client’s queried password to the server, while also providing a mechanism for checking for similar password compromise. Read on to see the protocol in action!</p>
    <div>
      <h2>MIGP demo</h2>
      <a href="#migp-demo">
        
      </a>
    </div>
    <p>As the state of the art in attack methodologies evolve with new techniques such as credential tweaking, so must the defenses. To that end, we’ve collaborated with the designers of the MIGP protocol to prototype and deploy the MIGP protocol within Cloudflare’s infrastructure.</p><p>Our MIGP demo server is deployed at <a href="https://migp.cloudflare.com">migp.cloudflare.com</a>, and runs entirely on top of <a href="https://workers.cloudflare.com/">Cloudflare Workers</a>. We use <a href="https://www.cloudflare.com/products/workers-kv/">Workers KV</a> for efficient storage and retrieval of buckets of encrypted breach entries, capping out each bucket size at the current <a href="https://developers.cloudflare.com/workers/platform/limits#kv">KV value limit</a> of 25MB. In our instantiation, we set the username hash prefix length to 20 bits, so that there are a total of 2^20 (or just over 1 million) buckets.</p><p>There are currently two ways to interact with the demo MIGP service: via the browser client at <a href="https://migp.cloudflare.com">migp.cloudflare.com</a>, or via the Go client included in our <a href="https://github.com/cloudflare/migp-go">open-sourced MIGP library</a>. As shown in the screenshots below, the browser client displays the request from your device and the response from the MIGP service. You should take caution to not input any sensitive credentials in a third-party service (feel free to use the test credentials <a>username1@example.com</a> and password1 for the demo).</p><p>Keep in mind that “absence of evidence is not evidence of absence”, especially in the context of data breaches. We intend to periodically update the breach datasets used by the service as new public breaches become available, but no breach alerting service will be able to provide 100% accuracy in assuring that your credentials are safe.</p><p>See the MIGP demo in action in the attached screenshots. Note that in all cases, the username (<a>username1@example.com</a>) and corresponding username prefix hash (000f90f4) remain the same, so the client retrieves the exact same bucket contents from the server each time. However, the blindElement parameter in the client request differs per request, allowing the client to decrypt different bucket elements depending on the queried credentials.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/14k0Waq8epRl1bJ2ixvalS/2da5c4cb0bd12ff46190a3e7e3fb502c/image7-10.png" />
            
            </figure><p>Example query in which the credentials are exposed in the breach dataset</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/39Efa4f8dTFJvEyh1nviV7/500bbd1a954cbb5ec7f96d2d3b1886ea/image4-23.png" />
            
            </figure><p>Example query in which similar credentials were exposed in the breach dataset</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/7xtaESNMejE9ZJrEZMYZZB/30d679b03c5e027413ab7eac02e4db22/image2-25.png" />
            
            </figure><p>Example query in which the username is present in the breach dataset</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/IpsaGiNzjKSmZcjJ9fao9/7110906f0c3cff82af25d09a324dd0ec/image3-23.png" />
            
            </figure><p>Example query in which the credentials are not found in the dataset</p>
    <div>
      <h2>Open-sourced MIGP library</h2>
      <a href="#open-sourced-migp-library">
        
      </a>
    </div>
    <p>We are open-sourcing our implementation of the MIGP library under the BSD-3 License. The code is written in Go and is available at <a href="https://github.com/cloudflare/migp-go">https://github.com/cloudflare/migp-go</a>. Under the hood, we use Cloudflare’s <a href="https://github.com/cloudflare/circl">CIRCL library</a> for OPRF support and Go’s supplementary cryptography library for <a href="https://pkg.go.dev/golang.org/x/crypto/scrypt">scrypt</a> support. Check out the repository for instructions on setting up the MIGP client to connect to Cloudflare’s demo MIGP service. Community contributions and feedback are welcome!</p>
    <div>
      <h2>Future directions</h2>
      <a href="#future-directions">
        
      </a>
    </div>
    <p>In this post, we announced our open-sourced implementation and demo deployment of MIGP, a next-generation breach alerting service. Our deployment is intended to lead the way for other credential compromise checking services to migrate to a more privacy-friendly model, but is not itself currently meant for production use. However, we identify several concrete steps that can be taken to improve our service in the future:</p><ul><li><p>Add more breach datasets to the database of precomputed entries</p></li><li><p>Increase the number of variants in server-side precomputation</p></li><li><p>Add library support in more programming languages to reach a broader developer base</p></li><li><p>Hide the number of ciphertexts per bucket by padding with dummy entries</p></li><li><p>Add support for efficient client-side variant checking by batching API calls to the server</p></li></ul><p>For exciting future research directions that we are investigating — including one proposal to remove the transmission of plaintext passwords from client to server entirely — take a look at <a href="/research-directions-in-password-security">https://blog.cloudflare.com/research-directions-in-password-security</a>.</p><p>We are excited to share and build upon these ideas with the wider Internet community, and hope that our efforts impact positive change in the password security ecosystem. We are particularly interested in collaborating with stakeholders in the space to develop, test, and deploy next-generation protocols to improve user security and privacy. You can reach us with questions, comments, and research ideas at <a>ask-research@cloudflare.com</a>. For those interested in joining our team, please visit our <a href="https://www.cloudflare.com/careers/jobs/?department=Technology%20Research&amp;location=default">Careers Page</a>.</p> ]]></content:encoded>
            <category><![CDATA[Research]]></category>
            <category><![CDATA[Security]]></category>
            <category><![CDATA[Product News]]></category>
            <guid isPermaLink="false">4eEeycGCnihnf3zSNxUYLY</guid>
            <dc:creator>Luke Valenta</dc:creator>
            <dc:creator>Cefan Daniel Rubin</dc:creator>
            <dc:creator>Christopher Wood</dc:creator>
        </item>
        <item>
            <title><![CDATA[Introducing SSL/TLS Recommender]]></title>
            <link>https://blog.cloudflare.com/ssl-tls-recommender/</link>
            <pubDate>Tue, 12 Oct 2021 13:01:00 GMT</pubDate>
            <description><![CDATA[ Introducing customized recommendations to improve the security of your website. ]]></description>
            <content:encoded><![CDATA[ <p></p><p>Seven years ago, Cloudflare made HTTPS availability for any Internet property easy and free with <a href="/introducing-universal-ssl/">Universal SSL</a>. At the time, few websites — other than those that processed sensitive data like passwords and credit card information — were using HTTPS because of how difficult it was to set up.</p><p>However, as we all started using the Internet for more and more private purposes (communication with loved ones, financial transactions, shopping, healthcare, etc.) the need for encryption became apparent. Tools like <a href="https://en.wikipedia.org/wiki/Firesheep">Firesheep</a> demonstrated how easily attackers could snoop on people using public Wi-Fi networks at coffee shops and airports. The <a href="https://blog.cryptographyengineering.com/2019/09/24/looking-back-at-the-snowden-revelations/">Snowden revelations</a> showed the ease with which governments could listen in on unencrypted communications at scale. We have seen attempts by browser vendors to increase HTTPS adoption such as the <a href="https://blog.chromium.org/2021/07/increasing-https-adoption.html">recent announcement by Chromium</a> for loading websites on HTTPS by default. Encryption has become a vital part of the modern Internet, not just to keep your information safe, but to keep you safe.</p><p>When it was launched, Universal SSL <a href="/introducing-universal-ssl/">doubled</a> the number of sites on the Internet using HTTPS. We are building on that with <a href="https://developers.cloudflare.com/ssl/origin-configuration/ssl-tls-recommender">SSL/TLS Recommender</a>, a tool that guides you to stronger configurations for the backend connection from Cloudflare to origin servers. Recommender has been available in the SSL/TLS tab of the Cloudflare dashboard since August 2020 for self-serve customers. Over 500,000 zones are currently signed up. <b>As of today, it is available for all customers!</b></p>
    <div>
      <h2>How Cloudflare connects to origin servers</h2>
      <a href="#how-cloudflare-connects-to-origin-servers">
        
      </a>
    </div>
    <p>Cloudflare operates as a reverse proxy between clients (“visitors”) and customers’ web servers (“origins”), so that Cloudflare can protect origin sites from attacks and improve site performance. This happens, in part, because visitor requests to websites proxied by Cloudflare are processed by an “edge” server located in a data center close to the client. The edge server either responds directly back to the visitor, if the requested content is cached, or creates a new request to the origin server to retrieve the content.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/oClT8gZN3TtQjhYiJr464/642f9cba63b4f5489ed8d60274238e3c/image6-12.png" />
            
            </figure><p>The backend connection to the origin can be made with an unencrypted HTTP connection or with an HTTPS connection where requests and responses are encrypted using the <a href="https://www.cloudflare.com/learning/ssl/transport-layer-security-tls/">TLS</a> protocol (historically known as <a href="https://www.cloudflare.com/learning/ssl/what-is-ssl/">SSL</a>). HTTPS is the secured form of HTTP and should be used <a href="https://www.cloudflare.com/learning/ssl/why-is-http-not-secure/">whenever possible</a> to avoid leaking information or allowing content tampering by third-party entities. The origin server can further authenticate itself by presenting a valid <a href="https://www.cloudflare.com/application-services/products/ssl/">TLS certificate</a> to prevent active <a href="/monsters-in-the-middleboxes/">monster-in-the-middle</a> attacks. Such a certificate can be obtained from a certificate authority such as <a href="https://letsencrypt.org/">Let’s Encrypt</a> or <a href="https://developers.cloudflare.com/ssl/origin-configuration/origin-ca">Cloudflare’s Origin CA</a>. Origins can also set up <a href="https://developers.cloudflare.com/ssl/origin-configuration/authenticated-origin-pull">authenticated origin pull</a>, which ensures that any HTTPS requests outside of Cloudflare will not receive a response from your origin.</p><p><a href="/tunnel-for-everyone/">Cloudflare Tunnel</a> provides an even more secure option for the connection between Cloudflare and origins. With Tunnel, users run a lightweight daemon on their origin servers that proactively establishes secure and private tunnels to the nearest Cloudflare data centers. With this configuration, users can completely lock down their origin servers to only receive requests routed through Cloudflare. While we encourage customers to set up tunnels if feasible, it's important to encourage origins with more traditional configurations to adopt the strongest possible security posture.</p>
    <div>
      <h3>Detecting HTTPS support</h3>
      <a href="#detecting-https-support">
        
      </a>
    </div>
    <p>You might wonder, why doesn’t Cloudflare always connect to origin servers with a secure TLS connection? To start, some origin servers have no TLS support at all (for example, certain <a href="https://community.letsencrypt.org/t/web-hosting-who-support-lets-encrypt/6920">shared hosting providers</a> and even <a href="https://kurti.sh/pubs/IMC_2020___Long_Tail_of_the_Internet.pdf">government sites</a> have been slow adopters) and rely on Cloudflare to ensure that the client request is at least encrypted over the Internet from the browser to Cloudflare’s edge.</p><p>Then why don’t we simply probe the origin to determine if TLS is supported? It turns out that many sites only <i>partially</i> support HTTPS, making the problem non-trivial. A single customer site can be served from multiple separate origin servers with differing levels of TLS support. For instance, some sites support HTTPS on their landing page but serve certain resources only over unencrypted HTTP. Further, site content can differ when accessed over HTTP versus HTTPS (for example, <a href="http://example.com">http://example.com</a> and <a href="https://example.com">https://example.com</a> can return different results).</p><p>Such content differences can arise due to misconfiguration on the origin server, accidental mistakes by developers when migrating their servers to HTTPS, or can even be intentional depending on the use case.</p><p>A <a href="https://www.cs.umd.edu/~dml/papers/https_tma20.pdf">study</a> by researchers at Northeastern University, the Max Planck Institute for Informatics, and the University of Maryland highlights reasons for some of these inconsistencies. They found that 1.5% of surveyed sites had at least one page that was unavailable over HTTPS — despite the protocol being supported on other pages — and 3.7% of sites served different content over HTTP versus HTTPS for at least one page. Thus, always using the most secure TLS setting detected on a particular resource could result in unforeseen side effects and usability issues for the entire site.</p><p>We wanted to tackle all such issues and maximize the number of TLS connections to origin servers, but without compromising a website’s functionality and performance.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/J0sdbGlU6cKVkaWJaR6nC/d98d243ee7d890676ba86a41a85d4d74/Screenshot-2021-10-11-at-16.17.39.png" />
            
            </figure><p>Content differences on sites when loaded over HTTPS vs HTTP; images taken from <a href="https://www.cs.umd.edu/~dml/papers/https_tma20.pdf">https://www.cs.umd.edu/~dml/papers/https_tma20.pdf</a> with author permission</p>
    <div>
      <h3>Configuring the SSL/TLS encryption mode</h3>
      <a href="#configuring-the-ssl-tls-encryption-mode">
        
      </a>
    </div>
    <p>Cloudflare relies on customers to indicate the level of TLS support at their origins via the zone’s <a href="https://developers.cloudflare.com/ssl/origin-configuration/ssl-modes">SSL/TLS encryption mode</a>. The following SSL/TLS encryption modes can be configured from the Cloudflare dashboard:</p><ul><li><p><b>Off</b> indicates that client requests reaching Cloudflare as well as Cloudflare’s requests to the origin server should only use unencrypted HTTP. This option is never recommended, but is still in use by a handful of customers for legacy reasons or testing.</p></li><li><p><b>Flexible</b> allows clients to connect to Cloudflare’s edge via HTTPS, but requests to the origin are over HTTP only. This is the most common option for origins that do not support TLS. However, we encourage customers to upgrade their origins to support TLS whenever possible and only use <b>Flexible</b> as a <b>last resort</b>.</p></li><li><p><b>Full</b> enables encryption for requests to the origin when clients connect via HTTPS, but Cloudflare <i>does not attempt to validate the certificate</i>. This is useful for origins that have a self-signed or otherwise invalid certificate at the origin, but leaves open the possibility for an active attacker to impersonate the origin server with a fake certificate. Client HTTP requests result in HTTP requests to the origin.</p></li><li><p><b>Full (strict)</b> indicates that Cloudflare should validate the origin certificate to fully secure the connection. The origin certificate can either be issued by a public CA or by <a href="https://developers.cloudflare.com/ssl/origin-configuration/origin-ca">Cloudflare Origin CA</a>. HTTP requests from clients result in HTTP requests to the origin, exactly the same as in <b>Full</b> mode. We <b>strongly</b> recommend <b>Full (strict)</b> over weaker options if supported by the origin.</p></li><li><p><b>Strict (SSL-Only Origin Pull)</b> causes all traffic to the origin to go over HTTPS, even if the client request was HTTP. This differs from <b>Full (strict)</b> in that HTTP client requests will result in an <i>HTTPS</i> request to the origin, not HTTP. Most customers do not need to use this option, and it is available only to Enterprise customers. The preferred way to ensure that no HTTP requests reach your origin is to enable <a href="/how-to-make-your-site-https-only/">Always Use HTTPS</a> in conjunction with <b>Full</b> or <b>Full (strict)</b> to redirect visitor HTTP requests to the HTTPS version of the content.</p></li></ul>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/6aX0Vn2QoaVooEamreEEha/0d8e29a895c9409b2ba7a3fd7bfb950f/image3-17.png" />
            
            </figure><p>SSL/TLS encryption modes determine how Cloudflare connects to origins</p><p>The SSL/TLS encryption mode is a zone-wide setting, meaning that Cloudflare applies the same policy to all subdomains and resources. If required, you can configure this setting more granularly via <a href="https://support.cloudflare.com/hc/en-us/articles/218411427-Understanding-and-Configuring-Cloudflare-Page-Rules-Page-Rules-Tutorial-">Page Rules</a>. Misconfiguring this setting can make site resources unavailable. For instance, suppose your website loads certain assets from an HTTP-only subdomain. If you set your zone to <b>Full</b> or <b>Full (strict)</b>, you might make these assets unavailable for visitors that request the content over HTTPS, since the HTTP-only subdomain lacks HTTPS support.</p>
    <div>
      <h3>Importance of secure origin connections</h3>
      <a href="#importance-of-secure-origin-connections">
        
      </a>
    </div>
    <p>When an end-user visits a site proxied by Cloudflare, there are two connections to consider: the front-end connection between the visitor and Cloudflare and the back-end connection between Cloudflare and the customer origin server. The front-end connection typically presents the largest attack surface (for example, think of the classic example of an attacker snooping on a coffee shop’s Wi-Fi network), but securing the back-end connection is equally important. While all SSL/TLS encryption modes (except <b>Off</b>) secure the front-end connection, less secure modes leave open the possibility of malicious activity on the backend.</p><p>Consider a zone set to <b>Flexible</b> where the origin is connected to the Internet via an untrustworthy ISP. In this case, spyware deployed by the customer’s ISP in an on-path middlebox could inspect the plaintext traffic from Cloudflare to the origin server, potentially resulting in privacy violations or leaks of confidential information. Upgrading the zone to <b>Full</b> or a stronger mode to encrypt traffic to the ISP would help prevent this basic form of snooping.</p><p>Similarly, consider a zone set to <b>Full</b> where the origin server is hosted in a shared hosting provider facility. An attacker colocated in the same facility could generate a fake certificate for the origin (since the certificate isn’t validated for <b>Full</b>) and deploy an attack technique such as <a href="https://en.wikipedia.org/wiki/ARP_spoofing">ARP spoofing</a> to direct traffic intended for the origin server to an attacker-owned machine instead. The attacker could then leverage this setup to inspect and filter traffic intended for the origin, resulting in site breakage or content unavailability. The attacker could even inject malicious JavaScript into the response served to the visitor to carry out other nefarious goals. Deploying a valid Cloudflare-trusted certificate on the origin and configuring the zone to use <b>Full (strict)</b> would prevent Cloudflare from trusting the attacker’s fake certificate in this scenario, preventing the <a href="https://www.cloudflare.com/learning/dns/what-is-domain-hijacking/">hijack</a>.</p><p>Since a secure backend only improves your <a href="https://www.cloudflare.com/learning/security/how-to-secure-a-website/">website security</a>, we strongly encourage setting your zone to the highest possible SSL/TLS encryption mode whenever possible.</p>
    <div>
      <h3>Balancing functionality and security</h3>
      <a href="#balancing-functionality-and-security">
        
      </a>
    </div>
    <p>When Universal SSL was launched, Cloudflare’s goal was to get as many sites away from the status quo of HTTP as possible. To accomplish this, Cloudflare provisioned TLS certificates for all customer domains to secure the connection between the browser and the edge. Customer sites that did not already have TLS support were defaulted to <b>Flexible,</b> to preserve existing site functionality. Although <b>Flexible</b> is <b>not recommended</b> for most zones, we continue to support this option as some Cloudflare customers still rely on it for origins that do not yet support TLS. Disabling this option would make these sites unavailable. Currently, the default option for newly onboarded zones is <b>Full</b> if we detect a TLS certificate on the origin zone, and <b>Flexible</b> otherwise.</p><p>Further, the SSL/TLS encryption mode configured at the time of zone sign-up can become suboptimal as a site evolves. For example, a zone might switch to a hosting provider that supports origin certificate installation. An origin server that is able to serve all content over TLS should at least be on <b>Full</b>. An origin server that has a valid TLS certificate installed should use <b>Full (strict)</b> to ensure that communication between Cloudflare and the origin server is not susceptible to monster-in-the-middle attacks.</p><p>The Research team combined lessons from academia and our engineering efforts to make encryption easy, while ensuring the highest level of security possible for our customers. Because of that goal, we’re proud to introduce SSL/TLS Recommender.</p>
    <div>
      <h2>SSL/TLS Recommender</h2>
      <a href="#ssl-tls-recommender">
        
      </a>
    </div>
    <p>Cloudflare’s mission is to help build a better Internet, and that includes ensuring that requests from visitors to our customers’ sites are as secure as possible. To that end, we began by asking ourselves the following question: how can we detect when a customer is able to use a more secure SSL/TLS encryption mode without impacting site functionality?</p><p>To answer this question, we built the <a href="https://developers.cloudflare.com/ssl/origin-configuration/ssl-tls-recommender">SSL/TLS Recommender</a>. Customers can enable Recommender for a zone via the SSL/TLS tab of the Cloudflare dashboard. Using a zone’s currently configured SSL/TLS option as the baseline for expected site functionality, the Recommender performs a series of checks to determine if an upgrade is possible. If so, we email the zone owner with the recommendation. If a zone is currently misconfigured — for example, an HTTP-only origin configured on <b>Full</b> — Recommender will not recommend a downgrade.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/3nc5iSzjUtxNTAjNF0g8Kz/619643b0edcc9019e001a551206efcc5/image9-8.png" />
            
            </figure><p>The checks that Recommender runs are determined by the site’s currently configured SSL/TLS option.</p><p>The simplest check is to determine if a customer can upgrade from <b>Full</b> to <b>Full (strict)</b>. In this case, all site resources are already served over HTTPS, so the check comprises a few simple tests of the validity of the TLS certificate for the domain and all subdomains (which can be on separate origin servers).</p><p>The check to determine if a customer can upgrade from <b>Off</b> or <b>Flexible</b> to <b>Full</b> is more complex. A site can be upgraded if all resources on the site are available over HTTPS and the content <i>matches</i> when served over HTTP versus HTTPS. Recommender carries out this check as follows:</p><ul><li><p>Crawl customer sites to collect links. For large sites where it is impractical to scan every link, Recommender tests only a subset of links (up to some threshold), leading to a trade-off between performance and potential false positives. Similarly, for sites where the crawl turns up an insufficient number of links, we augment our results with a sample of links from recent visitors requests to the zone to provide a high-confidence recommendation. The crawler uses the user agent <i>Cloudflare-SSLDetector</i> and has been added to Cloudflare’s list of <a href="https://developers.cloudflare.com/firewall/known-issues-and-faq#bots-currently-detected">known good bots</a>. Similar to <a href="https://developers.cloudflare.com/cache/about/always-online">other Cloudflare crawlers</a>, Recommender ignores robots.txt (except for rules explicitly targeting the crawler’s user agent) to avoid negatively impacting the accuracy of the recommendation.</p></li><li><p>Download the content of each link over both HTTP and HTTPS. Recommender makes only idempotent GET requests when scanning origin servers to avoid modifying server resource state.</p></li><li><p>Run a content similarity algorithm to determine if the content matches. The algorithm is adapted from a research paper called "<a href="https://www.cs.umd.edu/~dml/papers/https_tma20.pdf">A Deeper Look at Web Content Availability and Consistency over HTTP/S</a>" (TMA Conference 2020) and is designed to provide an accurate similarity score even for sites with dynamic content.</p></li></ul><p>Recommender is conservative with recommendations, erring on the side of maintaining current site functionality rather than risking breakage and usability issues. If a zone is non-functional, the zone owner blocks all types of bots, or if misconfigured SSL-specific Page Rules are applied to the zone, then Recommender will not be able to complete its scans and provide a recommendation. Therefore, it is not intended to resolve issues with website or domain functionality, but rather maximize your zone’s security when possible.</p><p>Please send questions and feedback to <a>ask-research@cloudflare.com</a>. We’re excited to continue this line of work to improve the security of customer origins!</p>
    <div>
      <h2>Mentions</h2>
      <a href="#mentions">
        
      </a>
    </div>
    <p>While this work is led by the Research team, we have been extremely privileged to get support from all across the company!</p><p>Special thanks to the incredible team of interns that contributed to SSL/TLS Recommender. Suleman Ahmad (now full-time), Talha Paracha, and Ananya Ghose built the current iteration of the project and Matthew Bernhard helped to lay the groundwork in a previous iteration of the project.</p> ]]></content:encoded>
            <category><![CDATA[Research]]></category>
            <category><![CDATA[Security]]></category>
            <category><![CDATA[SSL]]></category>
            <category><![CDATA[TLS]]></category>
            <category><![CDATA[Product News]]></category>
            <guid isPermaLink="false">6WBTTN7lG2fbQfdx6Z4eq8</guid>
            <dc:creator>Suleman Ahmad</dc:creator>
            <dc:creator>Talha Paracha</dc:creator>
            <dc:creator>Luke Valenta</dc:creator>
        </item>
        <item>
            <title><![CDATA[The TLS Post-Quantum Experiment]]></title>
            <link>https://blog.cloudflare.com/the-tls-post-quantum-experiment/</link>
            <pubDate>Wed, 30 Oct 2019 13:00:00 GMT</pubDate>
            <description><![CDATA[ In a June 2019 experiment with Google, we implemented two post-quantum key exchanges, integrated them into our TLS stack and deployed the implementation on edge servers and in Chrome Canary clients. ]]></description>
            <content:encoded><![CDATA[ <p></p><p>In June, we <a href="/towards-post-quantum-cryptography-in-tls/">announced</a> a wide-scale post-quantum experiment with Google. We implemented two post-quantum (i.e., not yet known to be broken by quantum computers) key exchanges, integrated them into our TLS stack and deployed the implementation on our edge servers and in Chrome Canary clients. The goal of the experiment was to evaluate the performance and feasibility of deployment in TLS of two post-quantum key agreement ciphers.</p><p>In our <a href="/towards-post-quantum-cryptography-in-tls/">previous blog post</a> on <a href="https://www.cloudflare.com/learning/ssl/quantum/what-is-post-quantum-cryptography/">post-quantum cryptography</a>, we described differences between those two ciphers in detail. In case you didn’t have a chance to read it, we include a quick recap here. One characteristic of post-quantum key exchange algorithms is that the public keys are much larger than those used by "classical" algorithms. This will have an impact on the duration of the TLS handshake. For our experiment, we chose two algorithms: <a href="/towards-post-quantum-cryptography-in-tls/#cecpq2b-isogeny-based-post-quantum-tls">isogeny</a>-based SIKE and <a href="https://en.wikipedia.org/wiki/Lattice-based_cryptography">lattice</a>-based HRSS. The former has short key sizes (~330 bytes) but has a high computational cost; the latter has larger key sizes (~1100 bytes), but is a few orders of magnitude faster.</p><p>During NIST’s <i>Second PQC Standardization Conference</i>, Nick Sullivan <a href="https://csrc.nist.gov/CSRC/media/Presentations/measuring-tls-key-exchange-with-post-quantum-kem/images-media/sullivan-session-1-paper-pqc2019.pdf">presented</a> our approach to this experiment and some initial results. Quite accurately, he compared NTRU-HRSS to an ostrich and SIKE to a turkey—one is big and fast and the other is small and slow.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/5600IZEbaJcZ2V0k94geH3/ab7f92737bba59c2ca9f53484bcbeba8/Screen-Shot-2019-10-29-at-1.33.21-PM.png" />
            
            </figure>
    <div>
      <h2>Setup &amp; Execution</h2>
      <a href="#setup-execution">
        
      </a>
    </div>
    <p>We based our experiment on TLS 1.3. Cloudflare operated the server-side TLS connections and Google Chrome (Canary and Dev builds) represented the client side of the experiment. We enabled both CECPQ2 (HRSS + X25519) and CECPQ2b (SIKE/p434 + X25519) key-agreement algorithms on all TLS-terminating edge servers. Since the post-quantum algorithms are considered experimental, the X25519 key exchange serves as a fallback to ensure the classical security of the connection.</p><p>Clients participating in the experiment were split into 3 groups—those who initiated TLS handshake with post-quantum CECPQ2, CECPQ2b or non post-quantum X25519 public keys. Each group represented approximately one third of the Chrome Canary population participating in the experiment.</p><p>In order to distinguish between clients participating in or excluded from the experiment, we added a custom extension to the TLS handshake. It worked as a simple flag sent by clients and echoed back by Cloudflare edge servers. This allowed us to measure the duration of TLS handshakes only for clients participating in the experiment.</p><p>For each connection, we collected telemetry metrics. The most important metric was a TLS server-side handshake duration defined as the time between receiving the Client Hello and Client Finished messages. The diagram below shows details of what was measured and how post-quantum key exchange was integrated with TLS 1.3.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/k6tBsggyYQ4ZSdjewV5kh/fe555ffe2b4fbf517cd88167416ee9b0/image1.png" />
            
            </figure><p>The experiment ran for 53 days in total, between August and October. During this time we collected millions of data samples, representing 5% of (anonymized) TLS connections that contained the extension signaling that the client was part of the experiment. We carried out the experiment in two phases.</p><p>In the first phase of the experiment, each client was assigned to use one of the three key exchange groups, and each client offered the same key exchange group for every connection. We collected over 10 million records over 40 days.</p><p>In the second phase of the experiment, client behavior was modified so that each client randomly chose which key exchange group to offer for each new connection, allowing us to directly compare the performance of each algorithm on a per-client basis. Data collection for this phase lasted 13 days and we collected 270 thousand records.</p>
    <div>
      <h2>Results</h2>
      <a href="#results">
        
      </a>
    </div>
    <p>We now describe our server-side measurement results. Client-side results are described at <a href="https://www.imperialviolet.org/2019/10/30/pqsivssl.html">https://www.imperialviolet.org/2019/10/30/pqsivssl.html</a>.</p>
    <div>
      <h3>What did we find?</h3>
      <a href="#what-did-we-find">
        
      </a>
    </div>
    <p>The primary metric we collected for each connection was the server-side handshake duration. The below histograms show handshake duration timings for all client measurements gathered in the first phase of the experiment, as well as breakdowns into the top five operating systems. The operating system breakdowns shown are restricted to only desktop/laptop devices except for Android, which consists of only mobile devices.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/3DhkWkx8LGaOZpiziA6cWv/850d3d3fbd38bfd8b80c0550158af323/Screen-Shot-2019-10-29-at-2.04.13-PM.png" />
            
            </figure><p>It’s clear from the above plots that for most clients, CECPQ2b performs worse than CECPQ2 and CONTROL. Thus, the small key size of CECPQ2b does not make up for its large computational cost—the ostrich outpaces the turkey.</p>
    <div>
      <h3>Digging a little deeper</h3>
      <a href="#digging-a-little-deeper">
        
      </a>
    </div>
    <p>This means we’re done, right? Not quite. We are interested in determining if there are <i>any</i> populations of TLS clients for which CECPQ2b consistency outperforms CECPQ2. This requires taking a closer look at the long tail of handshake durations. The below plots show <a href="https://en.wikipedia.org/wiki/Cumulative_distribution_function">cumulative distribution functions</a> (CDFs) of handshake timings zoomed in on the 80th percentile (e.g., showing the top 20% of slowest handshakes).</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/3ZK481qKXDJSN9exzz2DnN/eca75f3df9dadc29c41416632395a0a5/Screen-Shot-2019-10-29-at-2.04.33-PM-4.png" />
            
            </figure><p>Here, we start to see something interesting. For Android, Linux, and Windows devices, there is a <i>crossover</i> point where CECPQ2b actually starts to outperform CECPQ2 (Android: ~94th percentile, Linux: ~92nd percentile, Windows: ~95th percentile). macOS and ChromeOS do not appear to have these crossover points.</p><p>These effects are small but statistically significant in some cases. The below table shows approximate 95% <a href="https://en.wikipedia.org/wiki/Confidence_interval">confidence intervals</a> for the 50th (median), 95th, and 99th percentiles of handshake durations for each key exchange group and device type, calculated using <a href="https://docs.scipy.org/doc/scipy/reference/generated/scipy.stats.mstats.mquantiles_cimj.html">Maritz-Jarrett estimators</a>. The numbers within square brackets give the lower and upper bounds on our estimates for each percentile of the “true” distribution of handshake durations based on the samples collected in the experiment. For example, with a 95% confidence level we can say that the 99th percentile of handshake durations for CECPQ2 on Android devices lies between 4057ms and 4478ms, while the 99th percentile for CECPQ2b lies between 3276ms and 3646ms. Since the intervals do not overlap, we say that with <i>statistical significance</i>, the experiment indicates that CECPQ2b performs better than CECPQ2 for the slowest 1% of Android connections. Configurations where CECPQ2 or CECPQ2b outperforms the other with statistical significance are marked with green in the table.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/QEGlVhyK9fxu4gFAlhIq8/a8e8271d4965d40ce64b55ed634e06be/Screen-Shot-2019-10-29-at-2.23.52-PM.png" />
            
            </figure>
    <div>
      <h3>Per-client comparison</h3>
      <a href="#per-client-comparison">
        
      </a>
    </div>
    <p>A second phase of the experiment directly examined the performance of each key exchange algorithm for individual clients, where a client is defined to be a unique (anonymized) IP address and user agent pair. Instead of choosing a single key exchange algorithm for the duration of the experiment, clients randomly selected one of the experiment configurations for each new connection. Although the duration and sample size were limited for this phase of the experiment, we collected at least three handshake measurements for each group configuration from 3900 unique clients.</p><p>The plot below shows for each of these clients the difference in latency between CECPQ2 and CECPQ2b, taking the minimum latency sample for each key exchange group as the representative value. The CDF plot shows that for 80% of clients, CECPQ2 outperformed or matched CECPQ2b, and for 99% of clients, the latency gap remained within 70ms. At a high level, this indicates that very few clients performed significantly worse with CECPQ2 over CECPQ2b.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/3FdAbGJuJBIDIjT0zExyvF/2a4cbf6befc35e6faa50492ca34d1dc0/TLS-handshake-latency-gap-per-client--All-_logspace_symlog_randomconfig.png" />
            
            </figure>
    <div>
      <h3>Do other factors impact the latency gap?</h3>
      <a href="#do-other-factors-impact-the-latency-gap">
        
      </a>
    </div>
    <p>We looked at a number of other factors—including session resumption, IP version, and network location—to see if they impacted the latency gap between CECPQ2 and CECPQ2b. These factors impacted the overall handshake latency, but we did not find that any made a significant impact on the latency gap between post-quantum ciphers. We share some interesting observations from this analysis below.</p>
    <div>
      <h4>Session resumption</h4>
      <a href="#session-resumption">
        
      </a>
    </div>
    <p>Approximately 53% of all connections in the experiment were completed with <a href="https://tools.ietf.org/html/rfc8446#section-2.2">TLS handshake resumption</a>. However, the percentage of resumed connections varied significantly based on the device configuration. Connections from mobile devices were only resumed ~25% of the time, while between 40% and 70% of connections from laptop/desktop devices were resumed. Additionally, resumption provided between a 30% and 50% speedup for all device types.</p>
    <div>
      <h4>IP version</h4>
      <a href="#ip-version">
        
      </a>
    </div>
    <p>We also examined the impact of IP version on handshake latency. Only 12.5% of the connections in the experiment used IPv6. These connections were 20-40% faster than IPv4 connections for desktop/laptop devices, but ~15% slower for mobile devices. This could be an artifact of IPv6 being generally deployed on newer devices with faster processors. For Android, the experiment was only run on devices with more modern processors, which perhaps eliminated the bias.</p>
    <div>
      <h4>Network location</h4>
      <a href="#network-location">
        
      </a>
    </div>
    <p>The slow connections making up the long tail of handshake durations were not isolated to a few countries, Autonomous Systems (ASes), or subnets, but originated from a globally diverse set of clients. We did not find a correlation between the relative performance of the two post-quantum key exchange algorithms based on these factors.</p>
    <div>
      <h2>Discussion</h2>
      <a href="#discussion">
        
      </a>
    </div>
    <p>We found that CECPQ2 (the ostrich) outperformed CECPQ2b (the turkey), for the majority of connections in the experiment, indicating that fast algorithms with large keys may be more suitable for TLS than slow algorithms with small keys. However, we observed the opposite—that CECPQ2b outperformed CECPQ2—for the slowest connections on some devices, including Windows computers and Android mobile devices. One possible explanation for this is packet fragmentation and packet loss. The maximum size of TCP packets that can be sent across a network is limited by the maximum transmission unit (MTU) of the network path, which is often ~1400 bytes. During the TLS handshake the server responds to the client with its public key and ciphertext, the combined size of which exceeds the MTU, so it is likely that handshake messages must be split across multiple TCP packets. This increases the risk of lost packets and delays due to retransmission. A repeat of this experiment that includes collection of fine-grained TCP telemetry could confirm this hypothesis.</p><p>A somewhat surprising result of this experiment is just how fast HRSS performs for the majority of connections. Recall that the CECPQ2 cipher performs key exchange operations for both X25519 and HRSS, but the additional overhead of HRSS is barely noticeable. Comparing benchmark results, we can see that HRSS will be faster than X25519 on the server side and slower on the client side.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/1fH5vILIYldcwbFurzWlt5/05136ac598d8255bf108138854d88c0e/Screen-Shot-2019-10-29-at-2.24.57-PM.png" />
            
            </figure><p>In our design, the client side performs two operations—key generation and KEM decapsulation. Looking at those two operations we can see that the key generation is a bottleneck here.</p>
            <pre><code>Key generation: 	3553.5 [ops/sec]
KEM decapsulation: 	17186.7 [ops/sec]</code></pre>
            <p>In algorithms with quotient-style keys (like NTRU), the key generation algorithm performs an inversion in the quotient ring—an operation that is quite computationally expensive. Alternatively, a TLS implementation could generate ephemeral keys ahead of time in order to speed up key exchange. There are several other lattice-based key exchange candidates that may be worth experimenting with in the context of TLS key exchange, which are based on different underlying principles than the HRSS construction. These candidates have similar key sizes and faster key generation algorithms, but have their own drawbacks. <b>For now, HRSS looks like the more promising algorithm for use in TLS</b>.</p><p>In the case of SIKE, we <a href="https://github.com/post-quantum-cryptography/c-sike/">implemented</a> the most recent version of the algorithm, and instantiated it with the most performance-efficient parameter set for our experiment. The algorithm is computationally expensive, so we were required to use assembly to optimize it. In order to ensure best performance on Intel, most performance-critical operations have two different implementations; the library detects CPU capabilities and uses <a href="https://www.intel.com/content/dam/www/public/us/en/documents/white-papers/ia-large-integer-arithmetic-paper.pdf">faster instructions</a> if available, but otherwise falls back to a slightly slower generic implementation. We developed our own optimizations for 64-bit ARM CPUs. Nevertheless, our results show that SIKE incurred a significant overhead for every connection, especially on devices with weaker processors. It must be noted that high-performance isogeny-based public key cryptography is arguably much less developed than its lattice-based counterparts. Some ideas to develop this are <a href="https://www.youtube.com/watch?v=UfF3_YtYzPA">floating around</a>, and we expect to see performance improvements in the future.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/1nRjTCxKGIX2eghIjIGTXb/9cfaf88594f50d09738177372fefb4d0/tales-from-the-crypto-team_2x-6.png" />
            
            </figure><p></p> ]]></content:encoded>
            <category><![CDATA[Crypto Week]]></category>
            <category><![CDATA[TLS]]></category>
            <category><![CDATA[Security]]></category>
            <category><![CDATA[Research]]></category>
            <category><![CDATA[Post-Quantum]]></category>
            <category><![CDATA[Cryptography]]></category>
            <guid isPermaLink="false">3bVzoY16y2yy4PGR8r0cL5</guid>
            <dc:creator>Kris Kwiatkowski</dc:creator>
            <dc:creator>Luke Valenta</dc:creator>
        </item>
        <item>
            <title><![CDATA[Monsters in the Middleboxes: Introducing Two New Tools for Detecting HTTPS Interception]]></title>
            <link>https://blog.cloudflare.com/monsters-in-the-middleboxes/</link>
            <pubDate>Mon, 18 Mar 2019 17:47:50 GMT</pubDate>
            <description><![CDATA[ The practice of HTTPS interception continues to be commonplace on the Internet. This blog post discusses types of monster-in-the-middle devices and software, and how to detect them. ]]></description>
            <content:encoded><![CDATA[ <p></p><p>The practice of HTTPS interception continues to be commonplace on the Internet. HTTPS interception has encountered scrutiny, most notably in the 2017 study “<a href="https://jhalderm.com/pub/papers/interception-ndss17.pdf">The Security Impact of HTTPS Interception</a>” and the United States Computer Emergency Readiness Team (US-CERT)  <a href="https://www.us-cert.gov/ncas/alerts/TA17-075A">warning</a> that the technique weakens security. In this blog post, we provide a brief recap of HTTPS interception and introduce two new tools:</p><ol><li><p><a href="https://github.com/cloudflare/mitmengine">MITMEngine</a>, an open-source library for HTTPS interception detection, and</p></li><li><p><a href="https://malcolm.cloudflare.com/">MALCOLM</a>, a dashboard displaying metrics about HTTPS interception we observe on Cloudflare’s network.</p></li></ol><p>In a basic HTTPS connection, a browser (client) establishes a TLS connection directly to an origin server to send requests and download content. However, many connections on the Internet are not directly from a browser to the server serving the website, but instead traverse through some type of proxy or middlebox (a “monster-in-the-middle” or MITM). There are many reasons for this behavior, both malicious and benign.</p>
    <div>
      <h3>Types of HTTPS Interception, as Demonstrated by Various Monsters in the Middle</h3>
      <a href="#types-of-https-interception-as-demonstrated-by-various-monsters-in-the-middle">
        
      </a>
    </div>
    <p>One common HTTPS interceptor is TLS-terminating forward proxies. (These are a subset of all forward proxies; non-TLS-terminating forward proxies forward TLS connections without any ability to inspect encrypted traffic). A TLS-terminating forward proxy sits in front of a client in a TLS connection, transparently forwarding and possibly modifying traffic from the browser to the destination server. To do this, the proxy must terminate the TLS connection from the client, and then (hopefully) re-encrypt and forward the payload to the destination server over a new TLS connection. To allow the connection to be intercepted without a browser certificate warning appearing at the client, forward proxies often require users to install a root certificate on their machine so that the proxy can generate and present a trusted certificate for the destination to the browser. These root certificates are often installed for corporate managed devices, done by network administrators without user intervention.</p>
    <div>
      <h2>Antivirus and Corporate Proxies</h2>
      <a href="#antivirus-and-corporate-proxies">
        
      </a>
    </div>
    
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/lQlpoDWmUQ7mvaOQjOCzR/cf1df0af814a7ba373072b727102c5dd/my-stapler-_2x.png" />
            
            </figure><p>Some legitimate reasons for a client to connect through a forward proxy would be to allow antivirus software or a corporate proxy to inspect otherwise encrypted data entering and leaving a local network in order to detect inappropriate content, malware, and data breaches. The Blue Coat data loss prevention tools offered by Symantec are one example. In this case, HTTPS interception occurs to check if an employee is leaking sensitive information before sending the request to the intended destination.</p>
    <div>
      <h2>Malware Proxies</h2>
      <a href="#malware-proxies">
        
      </a>
    </div>
    
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/2VTM6e5HggvoJsREQ4t2BX/3670abf896ee660c9aef85f658346fff/business-sasquatch_2x.png" />
            
            </figure><p>Malicious forward proxies, however, might insert advertisements into web pages or <a href="https://www.cloudflare.com/learning/security/what-is-data-exfiltration/">exfiltrate private user information</a>. Malware like <a href="https://www.us-cert.gov/ncas/alerts/TA15-051A">Superfish</a> insert targeted ads into encrypted traffic, which requires intercepting HTTPS traffic and modifying the content in the response given to a client.</p>
    <div>
      <h2>Leaky Proxies</h2>
      <a href="#leaky-proxies">
        
      </a>
    </div>
    
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/4sW8l4AlgtkLvFVsF0RiYe/94b9c16eb8fc3ad8bf47596c4817dbc7/blabbermouth_2x.png" />
            
            </figure><p>Any TLS-terminating forward proxy--whether it’s well-intentioned or not--also risks exposing private information and opens the door to spoofing. When a proxy root certificate is installed, Internet browsers lose the ability to validate the connection end-to-end, and must trust the proxy to maintain the security of the connection to ensure that sensitive data is protected. Some proxies re-encrypt and forward traffic to destinations using less secure TLS parameters.</p><p>Proxies can also require the installation of vendor root certificates that can be easily abused by other malicious parties. In November 2018, a type of Sennheiser wireless headphones required the user to install a <a href="https://arstechnica.com/information-technology/2018/11/sennheiser-discloses-monumental-blunder-that-cripples-https-on-pcs-and-macs/">root certificate which used insecure parameters</a>. This root certificate could allow any adversary to impersonate websites and send spoofed responses to machines with this certificate, as well as observe otherwise encrypted data.</p><p>TLS-terminating forward proxies could even trust root certificates considered insecure, like Symantec’s CA. If poorly implemented, any TLS-terminating forward proxy can become a widespread attack vector, leaking private information or allowing for response spoofing.</p>
    <div>
      <h2>Reverse Proxies</h2>
      <a href="#reverse-proxies">
        
      </a>
    </div>
    
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/10jWDwqO36EovaMh7yezP0/8cbc6e9d12d744f1e6f294944ce788a0/speedy-_2x.png" />
            
            </figure><p>Reverse proxies also sit between users and origin servers. Reverse proxies (such as Cloudflare and <a href="https://www.cloudflare.com/cloudflare-vs-akamai/">Akamai</a>) act on behalf of origin servers, caching static data to improve the speed of content delivery and offering security services such as DDoS mitigation. Critically, reverse proxies do not require special root certificates to be installed on user devices, since browsers establish connections directly to the reverse proxy to download content that is hosted at the origin server. Reverse proxies are often used by origin servers to improve the security of client HTTPS connections (for example, by enforcing strict security policies and using the <a href="/rfc-8446-aka-tls-1-3/">newest security protocols like TLS 1.3</a>). In this case, reverse proxies are intermediaries that provide better performance and security to TLS connections.</p>
    <div>
      <h2>Why Continue Examining HTTPS Interception?</h2>
      <a href="#why-continue-examining-https-interception">
        
      </a>
    </div>
    <p><a href="/understanding-the-prevalence-of-web-traffic-interception/">In a previous blog post, we argued that HTTPS interception is prevalent on the Internet</a> and that it often degrades the security of Internet connections. A server that refuses to negotiate weak cryptographic parameters should be safe from many of the risks of degraded connection security, but there are plenty of reasons why a server operator may want to know if HTTPS traffic from its clients has been intercepted.</p><p>First, detecting HTTPS interception can help a server to identify suspicious or potentially vulnerable clients connecting to its network. A server can use this knowledge to notify legitimate users that their connection security might be degraded or compromised. HTTPS interception also increases the attack surface area of the system, and presents an attractive target for attackers to gain access to sensitive connection data.</p><p>Second, the presence of content inspection systems can not only weaken the security of TLS connections, but it can hinder the <a href="/why-tls-1-3-isnt-in-browsers-yet/">adoption of new innovations and improvements to TLS</a>.  Users connecting through older middleboxes may have their connections downgraded to older versions of TLS the middleboxes still support, and may not receive the security, privacy, and performance benefits of new TLS versions, even if newer versions are supported by both the browser and the server.</p>
    <div>
      <h2>Introducing MITMEngine: Cloudflare’s HTTPS Interception Detector</h2>
      <a href="#introducing-mitmengine-cloudflares-https-interception-detector">
        
      </a>
    </div>
    <p>Many TLS client implementations can be uniquely identified by features of the Client Hello message such as the supported version, cipher suites, extensions, elliptic curves, point formats, compression, and signature algorithms. The technique introduced by “<a href="https://jhalderm.com/pub/papers/interception-ndss17.pdf">The Security Impact of HTTPS Interception</a>” is to construct TLS Client Hello <i>signatures</i> for common browser and middlebox implementations. Then, to identify HTTPS requests that have been intercepted, a server can look up the signature corresponding to the request’s HTTP User Agent, and check if the request’s Client Hello message matches the signature. A mismatch indicates either a spoofed User Agent or an intercepted HTTPS connection. The server can also compare the request’s Client Hello to those of known HTTPS interception tools to understand which interceptors are responsible for intercepting the traffic.</p><p>The <a href="https://caddyserver.com/docs/mitm-detection">Caddy Server MITM Detection</a> tool is based on these heuristics and implements support for a limited set of browser versions. However, we wanted a tool that could be easily applied to the broad set of TLS implementations that Cloudflare supports, with the following goals:</p><ul><li><p>Maintainability: It should be easy to add support for new browsers and to update existing browser signatures when browser updates are released.</p></li><li><p>Flexibility: Signatures should be able to capture a wide variety of TLS client behavior without being overly broad. For example, signatures should be able to account for the <a href="https://tools.ietf.org/html/draft-davidben-tls-grease-01">GREASE</a> values sent in modern versions of Chrome.</p></li><li><p>Performance: Per-request MITM detection should be cheap so that the system can be deployed at scale.</p></li></ul><p>To accomplish these goals, the Cryptography team at Cloudflare developed <a href="https://github.com/cloudflare/mitmengine">MITMEngine</a>, an open-source HTTPS interception detector. MITMEngine is a Golang library that ingests User Agents and TLS Client Hello fingerprints, then returns the likelihood of HTTPS interception and the factors used to identify interception. To learn how to use MITMEngine, check out the project on GitHub.</p><p>MITMEngine works by comparing the values in an observed TLS Client Hello to a set of known browser Client Hellos. The fields compared include:</p><ul><li><p>TLS version,</p></li><li><p>Cipher suites,</p></li><li><p>Extensions and their values,</p></li><li><p>Supported elliptic curve groups, and</p></li><li><p>Elliptic curve point formats.</p></li></ul><p>When given a pair of User Agent and observed TLS Client Hello, MITMEngine detects differences between the given Client Hello and the one expected for the presented User Agent. For example, consider the following User Agent:</p>
            <pre><code>Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko)
Chrome/47.0.2526.111 Safari/537.36</code></pre>
            <p>This User Agent corresponds to Chrome 47 running on Windows 7. The paired TLS Client Hello includes the following cipher suites, displayed below as a hex dump:</p>
            <pre><code>0000  c0 2b c0 2f 00 9e c0 0a  c0 14 00 39 c0 09 c0 13   .+./.... ...9....
0010  00 33 00 9c 00 35 00 2f  00 0a                     .3...5./ ..</code></pre>
            <p>These cipher suites translate to the following list (and order) of 13 ciphers:</p>
            <pre><code>TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256 (0xc02b)
TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (0xc02f)
TLS_DHE_RSA_WITH_AES_128_GCM_SHA256 (0x009e)
TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA (0xc00a)
TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA (0xc014)
TLS_DHE_RSA_WITH_AES_256_CBC_SHA (0x0039)
TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA (0xc009)
TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA (0xc013)
TLS_DHE_RSA_WITH_AES_128_CBC_SHA (0x0033)
TLS_RSA_WITH_AES_128_GCM_SHA256 (0x009c)
TLS_RSA_WITH_AES_256_CBC_SHA (0x0035)
TLS_RSA_WITH_AES_128_CBC_SHA (0x002f)
TLS_RSA_WITH_3DES_EDE_CBC_SHA (0x000a)</code></pre>
            <p>The reference TLS Client Hello cipher suites for Chrome 47 are the following:</p>
            <pre><code>0000  c0 2b c0 2f 00 9e cc 14  cc 13 c0 0a c0 14 00 39   .+./.... .......9
0010  c0 09 c0 13 00 33 00 9c  00 35 00 2f 00 0a         .....3.. .5./..</code></pre>
            <p>Looking closely, we see that the cipher suite list for the observed traffic is shorter than we expect for Chrome 47; two cipher suites have been removed, though the remaining cipher suites remain in the same order. The two missing cipher suites are</p>
            <pre><code>TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305_SHA256 (0xcc14)
TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305_SHA256 (0xcc13)</code></pre>
            <p>Chrome prioritizes these two ChaCha ciphers above AES-CBC ciphers--a good choice, given that <a href="/padding-oracles-and-the-decline-of-cbc-mode-ciphersuites/">CBC (cipher block chaining) mode is vulnerable to padding oracle attacks</a>. It looks like the traffic we received underwent HTTPS interception, and the interceptor potentially didn't support ChaCha ciphers.</p><p>Using contextual clues like the used cipher suites, as well as additional User Agent text, we can also detect which software was used to intercept the HTTPS connection. In this case, MITMEngine recognizes that the fingerprint observed actually matches a fingerprint collected from Sophos antivirus software, and indicates that this software is likely the cause of this interception.</p><p>We welcome contributions to MITMEngine. We are particularly interested in collecting more fingerprints of MITM software and browser TLS Client Hellos, because MITMEngine depends on these reference fingerprints to detect HTTPS interception. Contributing these fingerprints is as simple as opening <a href="https://www.wireshark.org/">Wireshark</a>, capturing a pcap file with a TLS Client Hello, and submitting the pcap file in a PR. More instructions on how to contribute can be found in the <a href="https://github.com/cloudflare/mitmengine">MITMEngine documentation</a>.</p>
    <div>
      <h2>Observing HTTPS Interception on Cloudflare’s Network with MALCOLM</h2>
      <a href="#observing-https-interception-on-cloudflares-network-with-malcolm">
        
      </a>
    </div>
    <p>To complement MITMEngine, we also built a dashboard, <a href="https://malcolm.cloudflare.com/">MALCOLM</a>, to apply MITMEngine to a sample of Cloudflare’s overall traffic and observe HTTPS interception in the requests hitting our network. Recent MALCOLM data incorporates a fresh set of reference TLS Client Hellos, so readers will notice that percentage of "unknown" instances of HTTPS interception has decreased from Feburary 2019 to March 2019.</p><p>In this section of this blog post, we compare HTTPS interception statistics from MALCOLM to the 2017 study “<a href="https://jhalderm.com/pub/papers/interception-ndss17.pdf">The Security Impact of HTTPS Interception</a>”. With this data, we can see the changes in HTTPS interception patterns observed by Cloudflare over the past two years.</p><p>Using MALCOLM, let’s see how HTTPS connections have been intercepted as of late. This MALCOLM data was collected between March 12 and March 13, 2019.</p><p>The 2017 study found that 10.9% of Cloudflare-bound TLS Client Hellos had been intercepted. MALCOLM shows that the number of interceptions has increased by a substantial amount, to 18.6%:</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/308RiVWeL9fqieIEzt7DsR/1de5978ad5319a33e0f6d670a2fbf69c/1.png" />
            
            </figure><p>This result, however, is likely inflated compared to the results of the 2017 study. The 2017 study considered all traffic that went through Cloudflare, regardless of whether it had a recognizable User Agent or not. MALCOLM only considers results with recognizable User Agents that could be identified by <a href="https://github.com/avct/uasurfer">uasurfer</a>, a Golang library for parsing User Agent strings. Indeed, when we don’t screen out TLS Client Hellos with unidentified User Agents, we see that 11.3% of requests are considered intercepted--an increase of 0.4%. Overall, the prevalence of HTTPS interception activity does not seem to have changed much over the past two years.</p><p>Next, we examine the prevalence of HTTPS interception by browser and operating system. The paper presented the following table. We’re interested in finding the most popular browsers and most frequently intercepted browsers.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/3HJcWioFHJY1gSjUGbM0Fo/aa06678c9b4cac6d7c4a71b4a601c39c/2-1.png" />
            
            </figure><p>MALCOLM yields the following statistics for all traffic by browsers. MALCOLM presents mobile and desktop browsers as a single item. This can be broken into separate views for desktop and mobile using the filters on the dashboard.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/6ueWD4onXq5T1fTh2ZULTt/746be2f8618fe4c3979ba6f8bc4ac61c/3.png" />
            
            </figure><p>Chrome usage has expanded substantially since 2017, while usage of Safari, IE, and Firefox has fallen somewhat (here, IE includes Edge). Examining the most frequently intercepted browsers, we see the following results:</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/2DoOG6gtyJKloQ6f7N2YM/a7259a93ac04c0a687cc6c9865dbefa1/NC5wbmc-.png" />
            
            </figure><p>We see above that Chrome again accounts for a larger percentage of intercepted traffic, likely given growth in Chrome’s general popularity. As a result, HTTPS interception rates for other browsers, like Internet Explorer, have fallen as IE is less frequently used. MALCOLM also highlights the prevalence of other browsers that have their traffic intercepted--namely, UCBrowser, a browser common in China.</p><p>Now, we examine the most common operating systems observed in Cloudflare’s traffic:</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/33AywIjUylFoFgSgdXG0LX/97790997880300e3cd9ed30a0101c0d1/6.png" />
            
            </figure><p>Android use has clearly increased over the past two years as smartphones become peoples’ primary device for accessing the Internet. Windows also remains a common operating system.</p><p>As Android becomes more popular, the likelihood of HTTPS interception occurring on Android devices also has increased substantially:</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/7D4pH8O2VNOUfPZLiV6bV9/1ea61b5d21caa3d35b65ab5f0dcf33af/aW1hZ2UucG5n.png" />
            
            </figure><p>Since 2017, Android devices have overtaken those of Windows as the most intercepted.</p><p>As more of the world’s Internet consumption occurs through mobile devices, it’s important to acknowledge that simply changing platforms and browsers has not impacted the prevalence of HTTPS interception.</p>
    <div>
      <h2>Conclusion</h2>
      <a href="#conclusion">
        
      </a>
    </div>
    <p>Using MITMEngine and MALCOLM, we’ve been able to continuously track the state of HTTPS interception on over 10% of Internet traffic. It’s imperative that we track the status of HTTPS interception to give us foresight when deploying new security measures and detecting breaking changes in security protocols. Tracking HTTPS interception also helps us contribute to our broader mission of “helping to build a better Internet” by keeping tabs on software that possibly weakens good security practices.</p><p>Interested in exploring more HTTPS interception data? Here are a couple of next steps:</p><ol><li><p>Check out <a href="https://malcolm.cloudflare.com/">MALCOLM</a>, click on a couple of percentage bars to apply filters, and share any interesting HTTPS interception patterns you see!</p></li><li><p>Experiment with <a href="https://github.com/cloudflare/mitmengine">MITMEngine</a> today, and see if TLS connections to your website have been impacted by HTTPS interception.</p></li><li><p>Contribute to MITMEngine!</p></li></ol><p></p> ]]></content:encoded>
            <category><![CDATA[HTTPS]]></category>
            <category><![CDATA[Malware]]></category>
            <category><![CDATA[Security]]></category>
            <category><![CDATA[Speed & Reliability]]></category>
            <category><![CDATA[Research]]></category>
            <guid isPermaLink="false">1Pl12Ah2e26vZxqTeuN3vm</guid>
            <dc:creator>Gabbi Fisher</dc:creator>
            <dc:creator>Luke Valenta</dc:creator>
        </item>
    </channel>
</rss>