
<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>Tue, 07 Apr 2026 13:14:04 GMT</lastBuildDate>
        <item>
            <title><![CDATA[State of the post-quantum Internet in 2025]]></title>
            <link>https://blog.cloudflare.com/pq-2025/</link>
            <pubDate>Tue, 28 Oct 2025 13:00:00 GMT</pubDate>
            <description><![CDATA[ Today over half of human-initiated traffic with Cloudflare is protected against harvest-now/decrypt-later with post-quantum encryption. What once was a cool science project, is the new security baseline for the Internet. We’re not done yet: in this blog post we’ll take measure where we are, what we expect for the coming years, and what you can do today. ]]></description>
            <content:encoded><![CDATA[ <p></p><p>This week, the last week of October 2025, we reached a major milestone for Internet security: the majority of human-initiated traffic with Cloudflare is <a href="https://radar.cloudflare.com/adoption-and-usage#post-quantum-encryption"><u>using</u></a> post-quantum encryption mitigating the <a href="https://blog.cloudflare.com/the-quantum-menace/"><u>threat</u></a> of <a href="https://en.wikipedia.org/wiki/Harvest_now,_decrypt_later"><u>harvest-now/decrypt-later</u></a>.</p>
          <figure>
          <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/1EUFTKSnJptvd5WDGvB9Rf/4865f75c71e43f2c261d393322d24f34/image5.png" />
          </figure><p>We want to use this joyous moment to give an update on the current state of the migration of the Internet to post-quantum cryptography and the long road ahead. Our last <a href="https://blog.cloudflare.com/pq-2024/"><u>overview</u></a> was 21 months ago, and quite a lot has happened since. A lot of it has been passed as we <a href="https://blog.cloudflare.com/pq-2024/"><u>predicted</u></a>: finalization of the NIST standards; broad adoption of post-quantum encryption; more detailed roadmaps from regulators; progress on building quantum computers; some cryptography was broken (not to worry: nothing close to what’s deployed); and new exciting cryptography was proposed.</p><p>But there were also a few surprises: there was a giant leap in progress towards Q-day by improving quantum algorithms, and we had a proper scare because of a new quantum algorithm. We’ll cover all this and more: what we expect for the coming years; and what you can do today.</p>
    <div>
      <h2>The quantum threat</h2>
      <a href="#the-quantum-threat">
        
      </a>
    </div>
    <p>First things first: why are we changing our cryptography? It’s because of <b>quantum computers</b>. <a href="https://www.cloudflare.com/learning/ssl/quantum/what-is-quantum-computing/"><u>These marvelous devices</u></a>, instead of restricting themselves to zeroes and ones, compute using more of what nature actually affords us: quantum superposition, interference, and entanglement. This allows quantum computers to excel at certain very specific computations, notably simulating nature itself, which will be very helpful in developing new materials.</p><p>Quantum computers are not going to replace regular computers, though: they’re actually much worse than regular computers at most tasks that matter for our daily lives. Think of them as graphic cards or neural engines — specialized devices for specific computations, not general-purpose ones.</p><p>Unfortunately, quantum computers also <a href="https://blog.cloudflare.com/the-quantum-menace"><u>excel</u></a> at breaking key cryptography that still is in common use today, such as RSA and elliptic curves (ECC). Thus, we are moving to <b>post-quantum cryptography</b>: cryptography designed to be resistant against quantum attack. We’ll discuss the exact impact on the different types of cryptography later on.</p><p>For now, quantum computers are rather anemic: they’re simply not good enough today to crack any real-world cryptographic keys. That doesn’t mean we shouldn’t worry yet: encrypted traffic can be <a href="https://en.wikipedia.org/wiki/Harvest_now,_decrypt_later"><u>harvested today</u></a>, and decrypted after <b>Q-day</b>: the day that quantum computers are capable of breaking today’s still widely used cryptography such as RSA-2048. We call that a “harvest-now-decrypt-later” attack.</p><p>Using factoring as a benchmark, quantum computers don’t impress at all: the largest number factored by a quantum computer without cheating is 15, a record that’s easily beaten in a <a href="https://eprint.iacr.org/2025/1237.pdf"><u>variety of funny ways</u></a>. It’s tempting to disregard quantum computers until they start beating classical computers on factoring, but that would be a big mistake. Even conservative estimates place Q-day <a href="https://youtu.be/nJxENYdsB6c?si=doosb_aZRpQgo6X8&amp;t=1302"><u>less than three years</u></a> after the day that quantum computers beat classical computers on factoring. So how do we track progress?</p>
    <div>
      <h3>Quantum numerology</h3>
      <a href="#quantum-numerology">
        
      </a>
    </div>
    <p>There are two categories to consider in the march towards Q-day: progress on quantum hardware, and algorithmic improvements to the software that runs on that hardware. We have seen significant progress on both fronts.</p>
    <div>
      <h4>Progress on quantum hardware</h4>
      <a href="#progress-on-quantum-hardware">
        
      </a>
    </div>
    <p>Like clockwork, every year there are news stories of new quantum computers with record-breaking number of qubits. This focus on counting qubits is also quite misleading. To start, quantum computers are analogue machines, and there is always some noise interfering with the computation.</p><p>There are big differences between the different types of technology used to build quantum computers: <a href="https://en.wikipedia.org/wiki/Transmon"><u>silicon-based</u></a> quantum computers seem to scale well, are quick to execute instructions, but have very noisy qubits. This does not mean they’re useless: with <a href="https://en.wikipedia.org/wiki/Quantum_error_correction"><u>quantum error correcting codes</u></a> one can effectively turn millions of noisy silicon qubits into a few thousand high-fidelity ones, which could be enough to <a href="https://quantum-journal.org/papers/q-2021-04-15-433/"><u>break RSA</u></a>. <a href="https://www.quantinuum.com/products-solutions/quantinuum-systems"><u>Trapped-ion quantum computers</u></a>, on the other hand, have much less noise, but have been harder to scale. Only a few hundred-thousand trapped-ion qubits could potentially draw the curtain on RSA-2048.</p><div>
  
</div>
<p></p><p><sup>Timelapse of </sup><a href="https://sam-jaques.appspot.com/quantum_landscape"><sup><u>state-of-art</u></sup></a><sup> in quantum computing from 2021 through 2025 by qubit count on the x-axis and noise on the y-axis. The dots in the gray area are the various quantum computers out there. Once the shaded gray area hits the left-most red line, we’re in trouble as that means a quantum computer can break large RSA keys. Compiled by </sup><a href="https://sam-jaques.appspot.com/"><sup><u>Samuel Jaques</u></sup></a><sup> of the University of Waterloo.</sup></p><p>We’re only scratching the surface with the number of qubits and noise. There are low-level details that can make a big difference, such as the interconnectedness of qubits. More importantly, the graph doesn’t capture how scalable the engineering behind the records is.</p><p>To wit, on these graphs the progress on quantum computers seems to have stalled the last two years, whereas for experts, Google’s <a href="https://blog.google/technology/research/google-willow-quantum-chip/"><u>December 2024 Willow announcement</u></a> that is unremarkable on the graph, is in reality a <a href="https://scottaaronson.blog/?p=8525"><u>real milestone</u></a> achieving the first logical qubit in the surface code in a scalable manner. <a href="https://sam-jaques.appspot.com/quantum_landscape_2024"><u>Quoting</u></a> Sam Jaques:</p><blockquote><p>When I first read these results [Willow’s achievements], I felt chills of “Oh wow, quantum computing is actually real”.</p></blockquote><p>It’s a real milestone, but not an unexpected leap. Quoting Sam again:</p><blockquote><p>Despite my enthusiasm, this is more or less where we should expect to be, and maybe a bit late. All of the big breakthroughs they demonstrated are steps we needed to take to even hope to reach the 20 million qubit machine that could break RSA. There are no unexpected breakthroughs. Think of it like the increases in transistor density of classical chips each year: an impressive feat, but ultimately business-as-usual.</p></blockquote><p>Business-as-usual is also the strategy: the superconducting qubit approach pursued by Google for Willow has always had the clearest path forward attacking the difficulties head-on requiring fewest leaps in engineering.</p><p>Microsoft pursues the opposite strategy with their bet on <a href="https://en.wikipedia.org/wiki/Topological_quantum_computer"><u>topological qubits</u></a>. These are qubits that in theory would mostly not be unaffected by noise. However, they have not been fully realized in hardware. If these can be built in a scalable way, they’d be far superior to superconducting qubits. But we don’t even know if these can be built to begin with. Early 2025 Microsoft announced the <a href="https://scottaaronson.blog/?p=8669"><u>Majorana 1</u></a> chip, which demonstrates how these could be built. The chip is far from a full demonstrator though: it doesn’t support any computation and hence doesn’t even show up in Sam’s comparison graph earlier.</p><p>In between topological and superconducting qubits, there are many other approaches that labs across the world pursue that do show up in the graph, such as QuEra with <a href="https://www.quera.com/neutral-atom-platform"><u>neutral atoms</u></a> and Quantinuum with <a href="https://www.quantinuum.com/products-solutions/quantinuum-systems/system-model-h2"><u>trapped ions</u></a>.</p><p>Progress on the hardware side of getting to Q-day has received by far the most amount of press interest. The biggest breakthrough in the last two years isn’t on the hardware side though.</p>
    <div>
      <h3>Progress on quantum software</h3>
      <a href="#progress-on-quantum-software">
        
      </a>
    </div>
    
    <div>
      <h4>The biggest breakthrough so far: Craig Gidney’s optimisations</h4>
      <a href="#the-biggest-breakthrough-so-far-craig-gidneys-optimisations">
        
      </a>
    </div>
    <p>We thought we’d need about <a href="https://quantum-journal.org/papers/q-2021-04-15-433/"><u>20 million qubits</u></a> with the superconducting approach to break RSA-2048. It turns out we can do it with much less. In a stunningly comprehensive June 2025 paper, <a href="https://algassert.com/about.html"><u>Craig Gidney</u></a> shows that with clever quantum software optimisations we need fewer than <a href="https://arxiv.org/pdf/2505.15917"><u>one million qubits</u></a>. This is the reason the red lines in Sam’s graph above, marking the size of a quantum computer to break RSA, dramatically shift to the left in 2025.</p><p>To put this achievement into perspective, let’s just make a wild guess and say Google can maintain a sort of Moore’s law and doubles the number of physical qubits every one-and-a-half years. That’s a much faster pace than Google demonstrated so far, but it’s also not unthinkable they could achieve this once the groundwork has been laid. Then it’d take until 2052 to reach 20 million qubits, but only until 2045 to reach one million: Craig single-handedly brought Q-day <b>seven years</b> closer!</p><p>How much further can software optimisations go? Pushing it lower than 100,000 superconducting qubits seems impossible to Sam, and <a href="https://sam-jaques.appspot.com/quantum_landscape_2025"><u>he’d expect</u></a> more than 242,000 superconducting qubits are required to break RSA-2048. With the wild guess on quantum computer progress before, that’d correspond to a Q-day of 2039 and 2041+ respectively.</p><p>Although Craig’s estimate makes detailed and reasonable assumptions on the architecture of a large-scale superconducting qubits quantum computer, it’s still a guess, and these estimates could be off quite a bit.</p>
    <div>
      <h4>A proper scare: Chen’s algorithm</h4>
      <a href="#a-proper-scare-chens-algorithm">
        
      </a>
    </div>
    <p>On the algorithmic side, we might not only see improvements to existing quantum algorithms, but also the discovery of completely new quantum algorithms. April 2024, Yilei Chen published <a href="https://eprint.iacr.org/2024/555"><u>a preprint</u></a> claiming to have found such a new quantum algorithm to solve certain lattice problems, which are close, but not the same as those we rely on for the post-quantum cryptography we deploy. This caused a proper stir: even if it couldn’t attack our post-quantum algorithms today, could Chen’s algorithm be improved? To get a sense for potential improvements, you need to understand what the algorithm is really doing on a higher level. With Chen’s algorithm that’s hard, as it’s very complex, much more so than Shor’s quantum algorithm that breaks RSA. So it took some time for experts to <a href="https://nigelsmart.github.io/LWE.html"><u>start</u></a> <a href="https://sam-jaques.appspot.com/static/files/555-notes.pdf"><u>seeing</u></a> limitations to Chen’s approach, and in fact, after ten days they discovered a fundamental bug in the algorithm: the approach doesn’t work. Crisis averted.</p><p>What to take from this? Optimistically, this is business as usual for cryptography, and lattices are in a better shape now as one avenue of attack turned out to be a dead end. Realistically, it <i>is</i> a reminder that we have a lot of eggs in the lattices basket. As we’ll see later, presently there isn’t a real alternative that works everywhere.</p><p>Proponents of quantum key distribution (QKD) might chime in that QKD solves exactly that by being secure thanks to the laws of nature. Well, there are some asterixes to put on that claim, but more fundamentally no one has figured out how to scale QKD beyond point-to-point connections, <a href="https://blog.cloudflare.com/you-dont-need-quantum-hardware/"><u>as we argue in this blog post</u></a>.</p><p>It’s good to speculate about what cryptography might be broken by a completely new attack, but let’s not forget the matter at hand: a lot of cryptography is going to be broken by quantum computers for sure. Q-day is coming; the question is when.</p>
    <div>
      <h2>Is Q-day always fifteen years away?</h2>
      <a href="#is-q-day-always-fifteen-years-away">
        
      </a>
    </div>
    <p>If you've been working on or around cryptography and security long enough, then you have probably heard that "Q-day is X years away" every year for the last several years. This can make it feel like Q-day is always "some time in the future" — until we put such a claim in the proper context.</p>
    <div>
      <h3>What do experts think?</h3>
      <a href="#what-do-experts-think">
        
      </a>
    </div>
    <p>Since 2019, the <a href="https://globalriskinstitute.org/"><u>Global Risk Institute</u></a> has performed a yearly survey amongst experts, asking how probable it is that RSA-2048 will be broken within 5, 10, 15, 20 or 30 years. These are the results <a href="https://globalriskinstitute.org/publication/2024-quantum-threat-timeline-report/"><u>for 2024</u></a>, whose interviews happened before Willow’s release and Gidney’s breakthrough.</p>
          <figure>
          <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/3dx58nMhiJJd3DsQkaHwYF/84e9d8781912925d3b745f50291b00df/image6.png" />
          </figure><p><sup>Global Risk Institute expert survey results from 2024 on the likelihood of a quantum computer breaking RSA-2048 within different timelines.</sup></p><p>As the middle column in this chart shows, well over half of the interviewed experts thought there was at least a ~50% chance that a quantum computer will break RSA-2048 within 15 years. Let’s look up the historical answers from <a href="https://globalriskinstitute.org/publication/quantum-threat-timeline/"><u>2019</u></a>, <a href="https://globalriskinstitute.org/publication/quantum-threat-timeline-report-2020/"><u>2020</u></a>, <a href="https://globalriskinstitute.org/publication/2021-quantum-threat-timeline-report-global-risk-institute-global-risk-institute/"><u>2021</u></a>, <a href="https://globalriskinstitute.org/publication/2022-quantum-threat-timeline-report/"><u>2022</u></a>, and <a href="https://globalriskinstitute.org/publication/2023-quantum-threat-timeline-report/"><u>2023</u></a>. Here we plot the likelihood for Q-day within 15 years (of the time of the interview):</p>
          <figure>
          <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/4rMVWq9lDr49n9BmDkH2Ye/73d14f83f553becedf29dd11ce25deb1/image10.png" />
          </figure><p><sup>Historical answers in the quantum threat timeline reports for the chance of Q-day within 15 years.</sup></p><p>This shows that answers are slowly trending to more certainty, but at the rate we would expect? With six years of answers, we can plot how consistent the predictions are over a year: does the 15-year estimate for 2019 match the 10-year estimate for 2024?</p>
          <figure>
          <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/1cc2fWho4kYRjhJebG6Vll/12fdb65939b8e0143606d04747cfcca9/Screenshot_2025-10-28_at_12.28.49.png" />
          </figure><p><sup>Historical answers in the quantum threat timeline report over the years on the date of Q-day. The x-axis is the alleged year for Q-day and the y-axis shows the fraction of interviewed experts that think it’s at least ~50% (left) or 70% (right) likely to happen then.</sup></p><p>If we ask experts when Q-day could be with about even odds (graph on the left), then they mostly keep saying the same thing over the years: yes, could be 15 years away. However, if we press for more certainty, and ask for Q-day with &gt;70% probability (graph on the right), then the experts are mostly consistent over the years. For instance: one-fifth thought 2034 both in the 2019 and 2024 interviews.</p><p>So, if you want a consistent answer from an expert, don’t ask them when Q-day could be, but when it’s probably there. Now, it’s good fun to guess about Q-day, but the honest answer is that no one really knows for sure: there are just too many unknowns. And in the end, the date of Q-day is far less important than the deadlines set by regulators.</p>
    <div>
      <h3>What action do regulators take?</h3>
      <a href="#what-action-do-regulators-take">
        
      </a>
    </div>
    <p>We can also look at the timelines of various regulators. In 2022, the National Security Agency (NSA) released their <a href="https://media.defense.gov/2025/May/30/2003728741/-1/-1/0/CSA_CNSA_2.0_ALGORITHMS.PDF"><u>CNSA 2.0 guidelines</u></a>, which has deadlines between 2030 and 2033 for migrating to post-quantum cryptography. Also in 2022, the US federal government <a href="http://web.archive.org/web/20240422052137/https://www.whitehouse.gov/briefing-room/statements-releases/2022/05/04/national-security-memorandum-on-promoting-united-states-leadership-in-quantum-computing-while-mitigating-risks-to-vulnerable-cryptographic-systems/"><u>set 2035</u></a> as the target to have the United States fully migrated, from which the new administration hasn’t deviated. In 2024 Australia set 2030 as their <a href="https://www.theregister.com/2024/12/17/australia_dropping_crypto_keys/"><u>aggressive deadline</u></a> to migrate. Early 2025, the UK NCSC matched the common <a href="https://www.ncsc.gov.uk/guidance/pqc-migration-timelines"><u>2035</u></a> as the deadline for the United Kingdom. Mid-2025, the European Union published <a href="https://digital-strategy.ec.europa.eu/en/library/coordinated-implementation-roadmap-transition-post-quantum-cryptography"><u>their roadmap</u></a> with 2030 and 2035 as deadlines depending on the application.</p><p>Far from all national regulators have provided post-quantum migration timelines, but those that do generally stick to the 2030–2035 timeframe.</p>
    <div>
      <h3>When is Q-day?</h3>
      <a href="#when-is-q-day">
        
      </a>
    </div>
    <p>So when will quantum computers start causing trouble? Whether it’s 2034 or 2050, for sure it will be <b>too soon</b>. The immense success of cryptography over fifty years means it’s all around us now, from dishwasher, to pacemaker, to satellite. Most upgrades will be easy, and fit naturally in the product’s lifecycle, but there will be a long tail of difficult and costly upgrades.</p><p>Now, let’s take a look at the migration to post-quantum cryptography.</p>
    <div>
      <h2>Mitigating the quantum threat: two migrations</h2>
      <a href="#mitigating-the-quantum-threat-two-migrations">
        
      </a>
    </div>
    <p>To help prioritize, it is important to understand that there is a big difference in the difficulty, impact, and urgency of the post-quantum migration for the different kinds of cryptography required to create secure connections. In fact, for most organizations there will be two post-quantum migrations: <b>key agreement</b> and <b>signatures / certificates</b>. Let’s explain this for the case of creating a secure connection when visiting a website in a browser.</p>
    <div>
      <h3>Already post-quantum secure: symmetric cryptography</h3>
      <a href="#already-post-quantum-secure-symmetric-cryptography">
        
      </a>
    </div>
    <p>The cryptographic workhorse of a connection is a <b>symmetric cipher </b>such as AES-GCM. It’s what you would think of when thinking of cryptography: both parties, in this case the browser and server, have a shared key, and they encrypt / decrypt their messages with the same key. Unless you have that key, you can’t read anything, or modify anything.</p><p>The good news is that symmetric ciphers, such as <a href="https://blog.cloudflare.com/go-crypto-bridging-the-performance-gap/"><u>AES-GCM</u></a>, are already post-quantum secure. There is a common misconception that <a href="https://en.wikipedia.org/wiki/Grover%27s_algorithm"><u>Grover’s quantum algorithm</u></a> requires us to double the length of symmetric keys. On closer inspection of the algorithm, it’s clear that it is <a href="https://blog.cloudflare.com/nist-post-quantum-surprise#grover-s-algorithm"><u>not</u></a> <a href="https://www.youtube.com/watch?v=eB4po9Br1YY"><u>practical</u></a>. The way <a href="https://www.nist.gov/"><u>NIST</u></a>, the US National Institute for Standards and Technology (who have been spearheading the standardization of post-quantum cryptography) defines their post-quantum security levels is very telling. They define a specific security level by saying the scheme should be as hard to crack using either a classical or quantum computer as an existing symmetric cipher as follows:</p><table><tr><td><p><b>Level</b></p></td><td><p><b>Definition,</b> as least as hard to break as … </p></td><td><p><b>Example</b></p></td></tr><tr><td><p>1</p></td><td><p>To recover the key of <b>AES-128</b> by exhaustive search</p></td><td><p>ML-KEM-512, SLH-DSA-128s</p></td></tr><tr><td><p>2</p></td><td><p>To find a collision in <b>SHA256</b> by exhaustive search</p></td><td><p>ML-DSA-44</p></td></tr><tr><td><p>3</p></td><td><p>To recover the key of <b>AES-192</b> by exhaustive search</p></td><td><p>ML-KEM-768, ML-DSA-65</p></td></tr><tr><td><p>4</p></td><td><p>To find a collision in <b>SHA384</b> by exhaustive search</p></td><td><p></p></td></tr><tr><td><p>5</p></td><td><p>To recover the key of <b>AES-256</b> by exhaustive search</p></td><td><p>ML-KEM-1024, SLH-DSA-256s, ML-DSA-87</p></td></tr></table><p><sup>NIST PQC security levels, higher is harder to break (“more secure”). The examples ML-DSA, SLH-DSA and ML-KEM are covered below.</sup></p><p>There are good intentions behind suggesting doubling the key lengths of symmetric cryptography. In many use cases, the extra cost is not that high, and it mitigates any theoretical risk completely. Scaling symmetric cryptography is cheap: double the bits is typically far less than half the cost. So on the surface, it is simple advice.</p><p>But if we insist on AES-256, it seems only logical to insist on NIST PQC level 5 for the public key cryptography as well. The problem is that public key cryptography does not scale very well. Depending on the scheme, going from level 1 to level 5 typically more than doubles data usage and CPU cost. As we’ll see, deploying post-quantum signatures at level 1 is already painful, and deploying them at level 5 is debilitating.</p><p>But more importantly, organizations only have limited resources. We wouldn’t want an organization to prioritize upgrading AES-128 at the cost of leaving the definitely quantum-vulnerable RSA around.</p>
    <div>
      <h3>First migration: key agreement</h3>
      <a href="#first-migration-key-agreement">
        
      </a>
    </div>
    <p>Symmetric ciphers are not enough on their own: how do I know which key to use when visiting a website for the first time? The browser can’t just send a random key, as everyone listening in would see that key as well. You’d think it’s impossible, but there is some clever math to solve this, so that the browser and server can agree on a shared key. Such a scheme is called a <b>key agreement </b>mechanism, and is performed in the TLS <a href="https://www.cloudflare.com/learning/ssl/what-happens-in-a-tls-handshake/"><u>handshake</u></a>. In 2024 almost all traffic is secured with <a href="https://en.wikipedia.org/wiki/Curve25519"><u>X25519</u></a>, a Diffie–Hellman-style key agreement, but its security is completely broken by <a href="https://en.wikipedia.org/wiki/Shor%27s_algorithm"><u>Shor’s algorithm</u></a> on a quantum computer. Thus, any communication secured today with Diffie–Hellman, when stored, can be decrypted in the future by a quantum computer.</p><p>This makes it <b>urgent</b> to upgrade key agreement today. Luckily post-quantum key agreement is relatively straight-forward to deploy, and as we saw before, half the requests with Cloudflare end 2025 are already secured with post-quantum key agreement!</p>
    <div>
      <h3>Second migration: signatures / certificates</h3>
      <a href="#second-migration-signatures-certificates">
        
      </a>
    </div>
    <p>The key agreement allows secure agreement on a key, but there is a big gap: we do not know <i>with whom</i> we agreed on the key. If we only do key agreement, an attacker in the middle can do separate key agreements with the browser and server, and re-encrypt any exchanged messages. To prevent this we need one final ingredient: authentication.</p><p>This is achieved using <b>signatures</b>. When visiting a website, say <a href="https://cloudflare.com"><u>cloudflare.com</u></a>, the web server presents a <b>certificate</b> signed by a <a href="https://en.wikipedia.org/wiki/Certificate_authority"><u>certification authority</u></a> (CA) that vouches that the public key in that certificate is controlled by <a href="https://cloudflare.com"><u>cloudflare.com</u></a>. In turn, the web server signs the handshake and shared key using the private key corresponding to the public key in the certificate. This allows the client to be sure that they’ve done a key agreement with <a href="https://cloudflare.com"><u>cloudflare.com</u></a>.</p><p>RSA and ECDSA are commonly used traditional signature schemes today. Again, Shor’s algorithm makes short work of them, allowing a quantum attacker to forge any signature. That means that an attacker with a quantum computer can impersonate (and <a href="https://en.wikipedia.org/wiki/Man-in-the-middle_attack"><u>MitM</u></a>) any website for which we accept non post-quantum certificates.</p><p>This attack can only be performed after quantum computers are able to crack RSA / ECDSA. This makes upgrading signature schemes for TLS on the face of it less urgent, as we only need to have everyone migrated before Q-day rolls around. Unfortunately, we will see that migration to post-quantum signatures is much <b>more difficult</b>, and will require more time.</p>
    <div>
      <h2>Progress timeline</h2>
      <a href="#progress-timeline">
        
      </a>
    </div>
    <p>Before we dive into the technical challenges of migrating the Internet to post-quantum cryptography, let’s have a look at how we got here, and what to expect in the coming years. Let’s start with how post-quantum cryptography came to be.</p>
    <div>
      <h3>Origin of post-quantum cryptography</h3>
      <a href="#origin-of-post-quantum-cryptography">
        
      </a>
    </div>
    <p>Physicists Feynman and Manin independently proposed quantum computers <a href="https://plato.stanford.edu/entries/qt-quantcomp/"><u>around 1980</u></a>. It took another 14 years before Shor published <a href="https://ieeexplore.ieee.org/abstract/document/365700"><u>his algorithm</u></a> attacking RSA / ECC. Most post-quantum cryptography predates Shor’s famous algorithm.</p><p>There are various branches of post-quantum cryptography, of which the most prominent are lattice-based, hash-based, multivariate, code-based, and isogeny-based. Except for isogeny-based cryptography, none of these were initially conceived as post-quantum cryptography. In fact, early code-based and hash-based schemes are contemporaries of RSA, being proposed in the 1970s, and comfortably predate the publication of Shor’s algorithm in 1994. Also, the first multivariate scheme from 1988 is comfortably older than Shor’s algorithm. It is a nice coincidence that the most successful branch, lattice-based cryptography, is Shor’s closest contemporary, being proposed <a href="https://dl.acm.org/doi/pdf/10.1145/237814.237838"><u>in 1996</u></a>. For comparison, elliptic curve cryptography, which is widely used today, was first proposed in 1985.</p><p>In the years after the publication of Shor’s algorithm, cryptographers took measure of the existing cryptography: what’s clearly broken, and what could be post-quantum secure? In 2006, the first annual <a href="https://postquantum.cr.yp.to/"><u>International Workshop on Post-Quantum Cryptography</u></a> took place. From that conference, an introductory text <a href="https://www.researchgate.net/profile/Nicolas-Sendrier-2/publication/226115302_Code-Based_Cryptography/links/540d62d50cf2df04e7549388/Code-Based-Cryptography.pdf"><u>was prepared</u></a>, which holds up rather well as an introduction to the field. A notable caveat is the <a href="https://eprint.iacr.org/2022/214.pdf"><u>demise</u></a> of the <a href="https://www.pqcrainbow.org/"><u>Rainbow</u></a> signature scheme. In that same year, 2006, the elliptic-curve key-agreement X25519 <a href="https://cr.yp.to/ecdh/curve25519-20060209.pdf"><u>was proposed</u></a>, which now secures the majority of Internet connections, either on its own or as a hybrid with the post-quantum ML-KEM-768. </p>
    <div>
      <h2>NIST completes the first generation of PQC standards</h2>
      <a href="#nist-completes-the-first-generation-of-pqc-standards">
        
      </a>
    </div>
    <p>Ten years later, in 2016, <a href="https://nist.gov"><u>NIST</u></a>, the US National Institute of Standards and Technology, <a href="https://csrc.nist.gov/CSRC/media/Projects/Post-Quantum-Cryptography/documents/call-for-proposals-final-dec-2016.pdf"><u>launched a public competition</u></a> to standardize post-quantum cryptography. They used a similar open format as was used to standardize <a href="https://en.wikipedia.org/wiki/Advanced_Encryption_Standard"><u>AES</u></a> in 2001, and <a href="https://en.wikipedia.org/wiki/NIST_hash_function_competition"><u>SHA3</u></a> in 2012. Anyone can participate by submitting schemes and evaluating the proposals. Cryptographers from all over the world submitted algorithms. To focus attention, the list of submissions were whittled down over three rounds. From the original 82, based on public feedback, eight made it into the final round. From those eight, in 2022, NIST chose to <a href="https://blog.cloudflare.com/nist-post-quantum-surprise"><u>pick four to standardize first</u></a>: one <b>KEM </b>(for key agreement) and three signature schemes.</p><table><tr><td><p><b>Old name</b></p></td><td><p><b>New name</b></p></td><td><p><b>Branch</b></p></td></tr><tr><td><p>Kyber</p></td><td><p><b>ML-KEM</b> (<a href="https://csrc.nist.gov/pubs/fips/203/final"><u>FIPS 203</u></a>)
Module-lattice based Key-Encapsulation Mechanism Standard</p></td><td><p>Lattice-based</p></td></tr><tr><td><p>Dilithium</p></td><td><p><b>ML-DSA </b>(<a href="https://csrc.nist.gov/pubs/fips/204/final"><u>FIPS 204</u></a>)</p><p>Module-lattice based Digital Signature Standard</p></td><td><p>Lattice-based</p></td></tr><tr><td><p>SPHINCS<sup>+</sup></p></td><td><p><b>SLH-DSA</b> (<a href="https://csrc.nist.gov/pubs/fips/205/final"><u>FIPS 205</u></a>)</p><p>Stateless Hash-Based Digital Signature Standard</p></td><td><p>Hash-based</p></td></tr><tr><td><p>Falcon</p></td><td><p><b>FN-DSA </b>(not standardised yet)<b>
</b>FFT over NTRU lattices Digital Signature Standard</p></td><td><p>Lattice-based</p></td></tr></table><p>The final standards for the first three have been published August 2024. FN-DSA is late and we’ll discuss that later.</p><p>ML-KEM is the only post-quantum key agreement standardised now, and despite some occasional difficulty with its larger key sizes, it’s mostly a drop-in upgrade.</p><p>The situation is rather different with the signatures: it’s quite telling that NIST chose to pursue standardising three already. And there are even more signatures set to be <a href="https://blog.cloudflare.com/another-look-at-pq-signatures/"><u>standardized in the future</u></a>. The reason is that none of the proposed signatures are close to ideal. In short, they all have much larger keys and signatures than we’re used to.</p><p>From a security standpoint SLH-DSA is the most conservative choice, but also the worst performer. For public key and signature sizes, FN-DSA is as good as it gets for these three, but it is difficult to implement signing safely because of floating-point arithmetic. Due to FN-DSA’s limited applicability and design complexity, NIST chose to focus on the other three schemes first.</p><p>This leaves ML-DSA as the default pick. More in depth comparisons are included below.</p>
    <div>
      <h2>Adoption of PQC in protocol standards</h2>
      <a href="#adoption-of-pqc-in-protocol-standards">
        
      </a>
    </div>
    <p>Having NIST’s standards is not enough. It’s also required to standardize the way the new algorithms are used in higher level protocols. In many cases, such as key agreement in TLS, this can be as simple as assigning an identifier to the new algorithms. In other cases, such as <a href="https://www.cloudflare.com/dns/dnssec/how-dnssec-works/"><u>DNSSEC</u></a>, it requires a bit more thought. Many working groups at the <a href="https://www.ietf.org/"><u>IETF</u></a> have been preparing for years for the arrival of NIST’s final standards, and we expected many protocol integrations to be finalized soon after, before the end of 2024. That was too optimistic: some are done, but many are not finished yet.</p><p>Let’s start with the good news and look at what is done.</p><ul><li><p>The hybrid TLS key agreement <a href="https://datatracker.ietf.org/doc/draft-ietf-tls-ecdhe-mlkem/"><u>X25519MLKEM768</u></a> that combines X25519 and ML-KEM-768 (more about it later) is ready to use and is indeed quite widely deployed. Other protocols are likewise adopting ML-KEM in a hybrid mode of operation, such as <a href="https://datatracker.ietf.org/doc/draft-ietf-ipsecme-ikev2-mlkem/"><u>IPsec</u></a>, which is ready to go for simple setups. (For certain setups, there is a <a href="https://datatracker.ietf.org/doc/draft-ietf-ipsecme-ikev2-downgrade-prevention/"><u>little wrinkle</u></a> that still needs to be figured out. We’ll cover that in a future blog post.)

It might be surprising that the corresponding RFCs have not been published yet. Registering a key agreement to TLS or IPsec does not require an RFC though. In both cases, the RFC is still being pursued to avoid confusion for those that would expect an RFC, and for TLS it’s required to mark the key agreement as recommended.</p></li><li><p>For signatures, ML-DSA’s integration <a href="https://datatracker.ietf.org/doc/draft-ietf-lamps-dilithium-certificates/"><u>in X.509</u></a> certificates and <a href="https://datatracker.ietf.org/doc/draft-ietf-tls-mldsa/"><u>TLS</u></a> are good to go. The former is a freshly minted RFC, and the latter doesn’t require one.</p></li></ul><p>Now, for the bad news. At the time of writing, October 2025, the IETF hasn’t <a href="https://datatracker.ietf.org/doc/draft-ietf-lamps-pq-composite-sigs/"><u>locked down</u></a> how to do hybrid certificates: certificates where both a post-quantum and a traditional signature scheme are combined. But it’s close. We hope this’ll be figured out early 2026.</p><p>But if it’s just assigning some identifiers, what’s the cause of the delay? Mostly it’s about choice. Let’s start with the choices that had to be made in ML-DSA.</p>
    <div>
      <h4>ML-DSA delays: much ado about prehashing and private key formats</h4>
      <a href="#ml-dsa-delays-much-ado-about-prehashing-and-private-key-formats">
        
      </a>
    </div>
    <p>The two major topics of discussion for ML-DSA certificates were prehashing and the private key format.</p><p>Prehashing is where one part of the system hashes the message, and another creates the final signatures. This is useful, if you don’t want to send a big file to an <a href="https://en.wikipedia.org/wiki/Hardware_security_module"><u>HSM</u></a> to sign. Early drafts of ML-DSA  support prehashing with SHAKE256, but that <a href="https://csrc.nist.gov/csrc/media/Projects/post-quantum-cryptography/documents/faq/fips204-sec6-03192025.pdf"><u>was</u></a> not obvious. In the final version of ML-DSA, NIST included two variants: regular ML-DSA, and an explicitly prehashed version, where you are allowed to choose any hash. Having different variants is not ideal, as users will have to choose which one to pick; not all software might support all variants; and testing/validation has to be done for all. It’s not controversial to want to pick just one variant, but the issue <a href="https://globalplatform.org/wp-content/uploads/2025/01/4_ML-DSA-and-ML-KEM-Landmines-1.pdf"><u>is</u></a> <a href="https://keymaterial.net/2024/11/05/hashml-dsa-considered-harmful/"><u>which</u></a>. After plenty of debate, regular ML-DSA was chosen.</p><p>The second matter is <a href="https://datatracker.ietf.org/meeting/122/materials/slides-122-pquip-the-great-private-key-war-of-25-02.pdf"><u>private key forma</u></a>t. Because of the way that candidates are compared on performance benchmarks, it looks good for the original ML-DSA submission to cache some computation in the private key. This means that the private key is larger (several kilobytes) than it needs to be and requires more validation steps. It was suggested to cut the private key down to its bare essentials: just a 32-byte <i>seed</i>. For the final standard, NIST decided to allow both the seed and the original larger private key. This is not <a href="https://keymaterial.net/2025/02/19/how-not-to-format-a-private-key/"><u>ideal</u></a>: better stick to one of the two. In this case, the IETF wasn’t able to make a choice, and even added a third option: a pair of both the seed and expanded private key. Technically almost everyone agreed that <i>seed</i> is the superior choice, but the reason it wasn’t palatable is that some vendors already created keys for which they didn’t keep the <i>seed</i> around. Yes, we already have post-quantum legacy. It took almost a year to make these two choices.</p>
    <div>
      <h4>Hybrids require many choices</h4>
      <a href="#hybrids-require-many-choices">
        
      </a>
    </div>
    <p>To define an ML-DSA hybrid signature scheme, there are many more choices to make. With which traditional scheme to combine ML-DSA? What security levels on both sides. Then we also need to make choices for both schemes: which private key format to use? Which hash to use with ECDSA? Hybrids have new questions of their own. Do we allow reuse of the keys in the hybrid, and for that, do we want to prevent stripping attacks? Also, the question of prehashing returns with a third option: prehash on the hybrid level.</p><p>The <a href="https://datatracker.ietf.org/doc/draft-ietf-lamps-pq-composite-sigs/12/"><u>October 2025 draft</u></a> for ML-DSA hybrid signatures contains 18 variants, down from <a href="https://datatracker.ietf.org/doc/draft-ietf-lamps-pq-composite-sigs/03/"><u>26</u></a> a year earlier. Again, everyone agrees that that is too much, but it’s been hard to whittle it down further. To help end-users choose, a short list was added, which started with three options, and of course grew itself to <a href="https://www.ietf.org/archive/id/draft-ietf-lamps-pq-composite-sigs-12.html#section-11.3"><u>six</u></a>. Of those, we think MLDSA44-ECDSA-P256-SHA256 will see wide support and use on the Internet.</p><p>Now, let’s return to key agreement for which the standards have been set.</p>
    <div>
      <h2>TLS stacks get support for ML-KEM</h2>
      <a href="#tls-stacks-get-support-for-ml-kem">
        
      </a>
    </div>
    <p>The next step is software support. Not all ecosystems can move at the same speed, but we’ve seen major adoption of post-quantum key agreement to counter store-now/decrypt-later already. Recent versions of all major browsers, and many TLS libraries and platforms, notably OpenSSL, Go, and recent Apple OSes have enabled X25519MLKEM768 by default. We keep an overview <a href="https://developers.cloudflare.com/ssl/post-quantum-cryptography/pqc-support/"><u>here</u></a>.</p><p>Again, for TLS there is a big difference again between key agreement and signatures. For key agreement, the server and client can add and enable support for post-quantum key agreement independently. Once enabled on both sides, TLS negotiation will use post-quantum key agreement. We go into detail on TLS negotiation in <a href="https://blog.cloudflare.com/post-quantum-for-all#tls-anchor"><u>this blog post</u></a>. If your product just uses TLS, your store-now/decrypt-now problem could be solved by a simple software update of the TLS library.</p><p>Post-quantum <a href="https://www.cloudflare.com/application-services/products/ssl/">TLS certificates</a> are more of a hassle. Unless you control both ends, you’ll need to install two certificates: one post-quantum certificate for the new clients, and a traditional one for the old clients. If you aren’t using <a href="https://www.cloudflare.com/application-services/solutions/certificate-lifecycle-management/">automated issuance of certificates</a> yet, this might be a good reason to <a href="https://letsencrypt.org/docs/client-options/"><u>check that out</u></a>. TLS allows the client to signal which signature schemes it supports so that the server can choose to serve a post-quantum certificate only to those clients that support it. Unfortunately, although almost all TLS libraries support setting up multiple certificates, not all servers expose that configuration. If they do, it will still require a configuration change in most cases. (Although undoubtedly <a href="https://caddyserver.com/"><u>caddy</u></a> will do it for you.)</p><p>Talking about post-quantum certificates: it will take some time before Certification Authorities (CAs) can issue them. Their <a href="https://csrc.nist.gov/glossary/term/hardware_security_module_hsm"><u>HSMs</u></a> will first need (hardware) support, which then will need to be audited. Also, the <a href="https://cabforum.org/"><u>CA/Browser forum</u></a> needs to approve the use of the new algorithms. Root programs have different opinions about timelines. From the grapevine, we hear one of the root programs is preparing a pilot to accept one-year ML-DSA-87 certificates, perhaps even before the end of 2025. A CA/Browser forum ballot is <a href="https://github.com/cabforum/servercert/pull/624"><u>being drafted</u></a> to support this. Chrome on the other hand, <a href="https://www.youtube.com/live/O_BXzJv16zQ?t=19274s"><u>prefers</u></a> to solve the large certificate issue first. For the early movers, the audits are likely to be the bottleneck, as there will be a lot of submissions after the publication of the NIST standards. Although we’ll see the first post-quantum certificates in 2026, it’s unlikely they will be broadly available or trusted by all browsers before 2027.</p><p>We are in an interesting in-between time, where a lot of Internet traffic is protected by post-quantum key agreement, but not a single public post-quantum certificate is used.</p>
    <div>
      <h2>The search continues for more schemes</h2>
      <a href="#the-search-continues-for-more-schemes">
        
      </a>
    </div>
    <p>NIST is not quite done standardizing post-quantum cryptography. There are two more post-quantum competitions running: <b>round 4</b> and the <b>signatures onramp</b>.</p>
    <div>
      <h3>Round 4 winner: HQC</h3>
      <a href="#round-4-winner-hqc">
        
      </a>
    </div>
    <p>NIST only standardized one post-quantum key agreement so far: ML-KEM. They’d like to have a second one, a <b>backup KEM</b>, not based on lattices in case those turn out to be weaker than expected. To find it,  they extended the original competition with a fourth round to pick a backup KEM among the finalists. In March 2025, <a href="https://www.nist.gov/news-events/news/2025/03/nist-selects-hqc-fifth-algorithm-post-quantum-encryption#:~:text=NIST%20has%20chosen%20a%20new,were%20discovered%20in%20ML%2DKEM."><u>HQC</u></a> was <a href="https://www.nist.gov/news-events/news/2025/03/nist-selects-hqc-fifth-algorithm-post-quantum-encryption#:~:text=NIST%20has%20chosen%20a%20new,were%20discovered%20in%20ML%2DKEM."><u>selected</u></a> to be standardized.</p><p>HQC performs much worse than ML-KEM on every single metric. HQC-1, the lowest security level variant, requires 7kB of data on the wire. This is almost double the 3kB required for ML-KEM-1024, the highest security level variant. There is a similar gap in CPU performance. Also HQC scales worse with security level: where ML-KEM-1024 is about double the cost of ML-KEM-512, the highest security level of HQC requires three times the data (21kB!) and more than four times the compute.</p><p>What about the security? To hedge against gradually improved attacks, ML-KEM-768 has a clear edge over HQC-1, it performs much better, and it has a huge security margin at level 3 compared to level 1. What about leaps? Both ML-KEM and HQC use a similar algebraic structure on top of plain lattices and codes respectively: it is not inconceivable that a breakthrough there could apply to both. Now, also without the algebraic structure, codes and lattices feel related. We’re well into speculation: a catastrophic attack on lattices might not affect codes, but it wouldn’t be surprising too if it did. After all, RSA and ECC that are more dissimilar are both broken by quantum computers.</p><p>There might still be peace of mind to keep HQC around just in case. Here, we’d like to share an anecdote from the chaotic week when it was not clear yet that Chen’s quantum algorithm against lattices was flawed. What to replace ML-KEM with if it would be affected? HQC was briefly considered, but it was clear that an adjusted variant of ML-KEM would still be much more performant.</p><p>Stepping back: that we’re looking for a <i>second</i> efficient KEM is a luxury position. If I were granted a wish for a new post-quantum scheme, I wouldn’t ask for a better KEM, but for a better signature scheme. Let’s see if I get lucky.</p>
    <div>
      <h3>Signatures onramp</h3>
      <a href="#signatures-onramp">
        
      </a>
    </div>
    <p>In late 2022, after announcing the first four picks, NIST also called a new competition, dubbed the <i>signatures onramp</i>, to find <a href="https://csrc.nist.gov/projects/pqc-dig-sig"><u>additional signature schemes</u></a>. The competition has two goals. The first is hedging against cryptanalytic breakthroughs against lattice-based cryptography. NIST would like to standardize a signature that performs better than SLH-DSA (both in size and compute), but is not based on lattices. Secondly, they’re looking for a signature scheme that might do well in use cases where the current roster doesn’t do well: we will discuss those at length later on in this post.</p><p>In July 2023, NIST posted the <a href="https://csrc.nist.gov/news/2023/additional-pqc-digital-signature-candidates"><u>40 submissions</u></a> they received for a first round of public review. The cryptographic community got to work, and as is quite normal for a first round, many of the schemes were broken within a week. By February 2024, ten submissions were broken completely, and several others were weakened drastically. Out of the standing candidates, in October 2024, NIST selected 14 submissions for the second round.</p><p>A year ago, we wrote <a href="https://blog.cloudflare.com/another-look-at-pq-signatures/"><u>a blog post</u></a> covering these 14 submissions in great detail. The short of it: there has been amazing progress on post-quantum signature schemes. We will touch briefly upon them later on, and give some updates on the advances since last year. It is worth mentioning that just like the main post-quantum competition, the selection process will take many years. It is unlikely that any of these onramp signature schemes will be standardized before 2028 — if they’re not broken in the first place. That means that although they’re very welcome in the future, we can’t trust that better signature schemes will solve our problems today. As Eric Rescorla, the editor of TLS 1.3, <a href="https://educatedguesswork.org/posts/pq-emergency/"><u>writes</u></a>: “You go to war with the algorithms you have, not the ones you wish you had.”</p><p>With that in mind, let's look at the progress of deployments.</p>
    <div>
      <h2>Migrating the Internet to post-quantum key agreement</h2>
      <a href="#migrating-the-internet-to-post-quantum-key-agreement">
        
      </a>
    </div>
    <p>Now that we have the big picture, let’s dive into some finer details about this X25519MLKEM768 that’s widely deployed now.</p><p>First the post-quantum part. ML-KEM was submitted under the name <a href="https://pq-crystals.org/kyber/index.shtml"><u>CRYSTALS-Kyber</u></a>. Even though it’s a US standard, its designers work in industry and academia across France, Switzerland, the Netherlands, Belgium, Germany, Canada, China, and the United States. Let’s have a look at its performance.</p>
    <div>
      <h2>ML-KEM versus X25519</h2>
      <a href="#ml-kem-versus-x25519">
        
      </a>
    </div>
    <p>Today the vast majority of clients use the traditional key agreement X25519. Let’s compare that to ML-KEM.</p>
          <figure>
          <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/VCx6lbwzhKt4FywhRAZbk/4b7956adbb9a7690d3c3c6ce5d830fe1/Screenshot_2025-10-28_at_13.41.31.png" />
          </figure><p><sup>Size and CPU compared between X25519 and ML-KEM. Performance varies considerably by hardware platform and implementation constraints, and should be taken as a rough indication only.</sup></p><p>ML-KEM-512, -768 and -1024 aim to be as resistant to (quantum) attack as AES-128, -192 and -256 respectively. Even at the AES-128 level, ML-KEM is much bigger than X25519, requiring 800+768=1,568 bytes over the wire, whereas X25519 requires a mere 64 bytes.</p><p>On the other hand, even ML-KEM-1024 is typically significantly faster than X25519, although this can vary quite a bit depending on your platform and implementation.</p>
    <div>
      <h2>ML-KEM-768 and X25519</h2>
      <a href="#ml-kem-768-and-x25519">
        
      </a>
    </div>
    <p>We are not taking advantage of that speed boost just yet. Like many other early adopters, we like to play it safe and deploy a <b>hybrid</b> key-agreement <a href="https://datatracker.ietf.org/doc/draft-ietf-tls-ecdhe-mlkem/"><u>combining</u></a> X25519 and ML-KEM-768. This combination might surprise you for two reasons.</p><ol><li><p>Why combine X25519 (“128 bits of security”) with ML-KEM-768 (“192 bits of security”)?</p></li><li><p>Why bother with the non post-quantum X25519?</p></li></ol><p>The apparent security level mismatch is a hedge against improvements in cryptanalysis in lattice-based cryptography. There is a lot of trust in the (non post-quantum) security of X25519: matching AES-128 is more than enough. Although we are comfortable in the security of ML-KEM-512 today, over the coming decades cryptanalysis could improve. Thus, we’d like to keep a margin for now.</p><p>The inclusion of X25519 has two reasons. First, there is always a remote chance that a breakthrough renders all variants of ML-KEM insecure. In that case, X25519 still provides non-post-quantum security, and our post-quantum migration didn’t make things worse.</p><p>More important is that we do not only worry about attacks on the algorithm, but also on the implementation. A noteworthy example where we dodged a bullet is that of <a href="https://kyberslash.cr.yp.to/"><u>KyberSlash</u></a>, a timing attack that affected many implementations of Kyber (an earlier version of ML-KEM), including <a href="https://github.com/cloudflare/circl/security/advisories/GHSA-9763-4f94-gfch"><u>our own</u></a>. Luckily KyberSlash does not affect Kyber as it is used in TLS. A similar implementation mistake that would actually affect TLS, is likely to require an active attacker. In that case, the likely aim of the attacker wouldn’t be to decrypt data decades down the line, but steal a cookie or other token, or inject a payload. Including X25519 prevents such an attack.</p><p>So how well do ML-KEM-768 and X25519 together perform in practice?</p>
    <div>
      <h2>Performance and protocol ossification</h2>
      <a href="#performance-and-protocol-ossification">
        
      </a>
    </div>
    
    <div>
      <h3>Browser experiments</h3>
      <a href="#browser-experiments">
        
      </a>
    </div>
    <p>Being well aware of potential compatibility and performance issues, Google started <a href="https://security.googleblog.com/2016/07/experimenting-with-post-quantum.html"><u>a first experiment</u></a> with post-quantum cryptography back in 2016, the same year NIST started their competition. This was followed up by a second larger joint experiment by <a href="https://blog.cloudflare.com/towards-post-quantum-cryptography-in-tls/"><u>Cloudflare</u></a> and <a href="https://www.imperialviolet.org/2018/12/12/cecpq2.html"><u>Google</u></a> in 2018. We tested two different hybrid post-quantum key agreements: CECPQ2, which is a combination of the lattice-based NTRU-HRSS and X25519, and CECPQ2b, a combination of the isogeny-based SIKE and again X25519. NTRU-HRSS is very similar to ML-KEM in size, but is computationally somewhat more taxing on the client-side. SIKE on the other hand, has very small keys, is computationally very expensive, and was <a href="https://eprint.iacr.org/2022/975.pdf"><u>completely broken</u></a> in 2022. With respect to TLS handshake times, X25519+NTRU-HRSS performed very well.</p><p>Unfortunately, a small but significant fraction of clients experienced broken connections with NTRU-HRSS. The reason: the size of the NTRU-HRSS keyshares. In the past, when creating a TLS connection, the first message sent by the client, the so-called <i>ClientHello</i>, almost always fit within a single network packet. The TLS specification allows for a larger <i>ClientHello</i>, however no one really made use of that. Thus, protocol ossification strikes again as there are some middleboxes, load-balancers, and other software that tacitly assume the <i>ClientHello</i> always fits in a single packet.</p>
    <div>
      <h2>Long road to 50%</h2>
      <a href="#long-road-to-50">
        
      </a>
    </div>
    <p>Over the subsequent years, we kept experimenting with PQ, switching to Kyber in 2022, and ML-KEM in 2024. Chrome did a great job reaching out to vendors whose products were <a href="https://tldr.fail/"><u>incompatible</u></a>. If it were not for these compatibility issues, we would’ve likely seen Chrome ramp up post-quantum key agreement five years earlier. It took until March 2024 before Chrome felt comfortable enough to enable post-quantum key agreement by default on Desktop. After that many other clients, and all major browsers, have joined Chrome in enabling post-quantum key agreement by default. An incomplete timeline:</p><table><tr><td><p>July 2016</p></td><td><p>Chrome’s <a href="https://security.googleblog.com/2016/07/experimenting-with-post-quantum.html"><u>first experiment with PQ</u></a> (CECPQ)</p></td></tr><tr><td><p>June 2018</p></td><td><p><a href="https://blog.cloudflare.com/the-tls-post-quantum-experiment/"><u>Cloudflare</u></a> / <a href="https://www.imperialviolet.org/2018/12/12/cecpq2.html"><u>Google</u></a> experiment (CECPQ2)</p></td></tr><tr><td><p>October 2022</p></td><td><p>Cloudflare <a href="https://blog.cloudflare.com/post-quantum-for-all/"><u>enables</u></a> PQ by default server side</p></td></tr><tr><td><p>November 2023</p></td><td><p>Chrome ramps up PQ to 10% on Desktop</p></td></tr><tr><td><p>March 2024</p></td><td><p>Chrome <a href="https://blog.chromium.org/2024/05/advancing-our-amazing-bet-on-asymmetric.html"><u>enables</u></a> PQ by default on Desktop</p></td></tr><tr><td><p>August 2024</p></td><td><p>Go <a href="https://github.com/golang/go/issues/67061"><u>enables</u></a> PQ by default</p></td></tr><tr><td><p>November 2024</p></td><td><p>Chrome enables PQ by default on Android and Firefox on Desktop.</p></td></tr><tr><td><p>April 2025</p></td><td><p><a href="https://openssl-library.org/post/2025-04-08-openssl-35-final-release/"><u>OpenSSL</u></a> enables PQ by default</p></td></tr><tr><td><p>October 2025</p></td><td><p>Apple is <a href="https://support.apple.com/en-us/122756"><u>rolling out</u></a> PQ by default with the release of iOS / iPadOS / macOS 26.</p></td></tr></table><p>It’s noteworthy that there is a gap between Chrome enabling PQ on Desktop and on Android. Although ML-KEM doesn’t have a large performance impact, as seen in the graphs, it’s certainly not negligible, especially on the long tail of slower connections more prevalent on mobile, and it required more consideration to proceed.</p><p>But we’re finally here now: over 50% (and rising!) of human traffic is protected against store-now/decrypt-later, making post-quantum key agreement the new security baseline for the Web.</p><p>Browsers are one side of the equation, what about servers?</p>
    <div>
      <h3>Server-side support</h3>
      <a href="#server-side-support">
        
      </a>
    </div>
    <p>Back in 2022 we <a href="https://blog.cloudflare.com/post-quantum-for-all/"><u>enabled</u></a> post-quantum key agreement server side for basically all customers. Google did the same for most of their servers (except GCP) in 2023. Since then many have followed. Jan Schaumann has been posting regular scans of the top 100k domains. In his September 2025 post, <a href="https://www.netmeister.org/blog/pqc-use-2025-09.html"><u>he reports</u></a> 39% support PQ now, up from 28% only six months earlier. In his survey, we see not only support rolling out on large service providers, such as Amazon, Fastly, Squarespace, Google, and Microsoft, but also a trickle of self-hosted servers adding support hosted at Hetzner and OVHcloud.</p><p>This is the publicly accessible web. What about servers behind a service like Cloudflare?</p>
    <div>
      <h3>Support at origins</h3>
      <a href="#support-at-origins">
        
      </a>
    </div>
    <p>In <a href="https://blog.cloudflare.com/post-quantum-to-origins"><u>September 2023</u></a>, we added support for our customers to enable post-quantum key agreement on connections from Cloudflare to their origins. That’s connection (3) in the following diagram:</p>
          <figure>
          <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/7dRJxj1f2otMM41sEKFoFG/d722378a6f74c4033787897334bb4e7a/image12.png" />
          </figure><p><sup>Typical connection flow when a visitor requests an uncached page.</sup></p><p>Back in 2023 only 0.5% of origins supported post-quantum key agreement. Through 2024 that hasn’t changed much. This year, in 2025, we see support slowly pick up with software support rolling out, and we’re now at 3.7%.</p>
          <figure>
          <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/6LaKKWKWTli5NETFHlQ1za/e9eb1e750a72e62bdc522207451e7085/image7.png" />
          </figure><p><sup>Fraction of origins that support the post-quantum key agreement X25519MLKEM768.</sup></p><p>3.7% doesn’t sound impressive at all compared to the previous 50% and 39% for clients and public servers respectively, but it’s nothing to scoff at. There is much more diversity in origins than there are in clients: many more people have to do something to make that number move up. But it’s still a more than seven-fold increase, and let’s not forget that back in 2024 we celebrated reaching 1.8% of client support.For customers, origins aren’t always easy to upgrade at all. Does that mean missing out on post-quantum security? No, not necessarily: you can secure the connection between Cloudflare and your origin by setting up <a href="https://developers.cloudflare.com/cloudflare-one/connections/connect-networks/"><u>Cloudflare Tunnel</u></a> as a sidecar to your origin.</p>
          <figure>
          <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/3bfxtdySAPtc9hn9Qroztz/8233f1fecbed214b9584af6648488587/image3.png" />
          </figure>
    <div>
      <h3>Ossification</h3>
      <a href="#ossification">
        
      </a>
    </div>
    <p>Support is all well and good, but as we saw with browser experiments, protocol ossification is a big concern. What does it look like with origins? Well, it depends.</p><p>There are two ways to enable post-quantum key agreement: the fast way, and the slow but safer way. In both cases, if the origin doesn’t support post-quantum, they’ll fall back safely to traditional key agreement. We explain the details in this <a href="https://blog.cloudflare.com/post-quantum-to-origins"><u>blog post</u></a>, but in short, in the fast way we send the post-quantum keys immediately, and in the safer way we postpone it by one roundtrip using <i>HelloRetryRequest</i>. All major browsers use the fast way.</p><p>We have been regularly scanning all origins to see what they support. The good news is that all origins supported the safe but slow method. The fast method didn’t fare as well, as we found that 0.05% of connections would break. That’s too high to enable the fast method by default. We did enable PQ to origins using the safer method by default for all non-enterprise customers and enterprise customers can opt in.</p><p>We are not satisfied though until it’s fast and enabled for everyone. That’s why we’ll <a href="https://blog.cloudflare.com/automatically-secure/#post-quantum-era"><u>automatically enable</u></a> post-quantum to origins using the fast method for all customers, if our scans show it’s safe.</p>
    <div>
      <h3>Internal connections</h3>
      <a href="#internal-connections">
        
      </a>
    </div>
    <p>So far all the connections we’ve been talking about are between Cloudflare and external parties. There are also a lot of internal connections within Cloudflare (marked 2 in the two diagrams above.) In 2023 we <a href="https://blog.cloudflare.com/post-quantum-cryptography-ga/"><u>made a big push</u></a> to upgrade our internal connections to post-quantum key agreement. Compared to all the other post-quantum efforts we pursue, this has been, by far, the biggest job: we asked every engineering team in the company to stop what they’re doing; take stock of the data and connections that their products secure; and upgrade them to post-quantum key agreement. In most cases the upgrade was simple. In fact, many teams were already upgraded by pulling in software updates. Still, figuring out that you’re already done can take quite some time! On a positive note, we didn’t see any performance or ossification issues in this push.</p><p>We have upgraded the majority of internal connections, but a long tail remains, which we continue to work on. The most important connection that we didn’t get to upgrade in 2023 is the connection between WARP client and Cloudflare. In September 2025 we <a href="https://blog.cloudflare.com/post-quantum-warp/"><u>upgraded it</u></a>, by moving from Wireguard to QUIC.</p>
    <div>
      <h2>Outlook</h2>
      <a href="#outlook">
        
      </a>
    </div>
    <p>As we’ve seen, post-quantum key agreement, despite initial trouble with protocol ossification, has been straightforward to deploy. In the vast majority of cases it’s an uneventful software update. And with 50% deployment (and rising), it’s the new security baseline for the Internet.</p><p>Let’s turn to the second, more difficult migration.</p>
    <div>
      <h2>Migrating the Internet to post-quantum signatures</h2>
      <a href="#migrating-the-internet-to-post-quantum-signatures">
        
      </a>
    </div>
    <p>Now, we’ll turn our attention to upgrading the signatures used on the Internet.</p>
    <div>
      <h2>The zoo of post-quantum signatures</h2>
      <a href="#the-zoo-of-post-quantum-signatures">
        
      </a>
    </div>
    <p>We wrote a <a href="https://blog.cloudflare.com/another-look-at-pq-signatures/"><u>long deep dive</u></a> in the field of post-quantum signature schemes last year, November 2024. Most of that is still up-to-date, but there have been some exciting developments. Here we’ll just go over some highlights and some exciting updates of last year.</p><p>Let’s start by sizing up the post-quantum signatures we have available today at the AES-128 security level: ML-DSA-44 and the two variants of SLH-DSA. We use ML-DSA-44 as the baseline, as that’s the scheme that’s going to see the most widespread use initially. As a comparison, we also include the venerable Ed25519 and RSA-2048 in wide use today, as well as FN-DSA-512 which will be standardised soon and a sample of nine for TLS promising signature schemes from the signatures onramp.</p>
          <figure>
          <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/4NC2lO6hXKEFOgaVgQ7ExO/a0a65ddbb24d11ad96405f19aa344f4b/Screenshot_2025-10-28_at_13.18.54.png" />
          </figure><p><sup>Comparison of various signature schemes at the security level of AES-128. CPU times vary significantly by platform and implementation constraints and should be taken as a rough indication only. ⚠️ FN-DSA signing time when using fast but dangerous floating-point arithmetic — see warning below. ⚠️ SQISign signing is not timing side-channel secure.</sup></p><p>It is immediately clear that none of the post-quantum signature schemes comes even close to being a drop-in replacement for Ed25519 (which is comparable to ECDSA P-256) as most of the signatures are simply much bigger. The exceptions are SQISign, MAYO, SNOVA, and UOV from the onramp, but they’re far from ideal. MAYO, SNOVA, and UOV have large public keys, and SQISign requires a great amount of computation.</p>
    <div>
      <h3>Be careful with FN-DSA</h3>
      <a href="#be-careful-with-fn-dsa">
        
      </a>
    </div>
    <p>Looking ahead a bit: the best of the first competition seems to be FN-DSA-512. FN-DSA-512’s signatures and public key together are <i>only</i> 1,563 bytes, with somewhat reasonable signing time. FN-DSA has an <b>achilles heel</b> though — for acceptable signing performance, it requires fast floating-point arithmetic. Without it, signing is about 20 times slower. But speed is not enough, as the floating-point arithmetic has to run in constant time — without it, the FN-DSA private key can be recovered by timing signature creation. Writing safe FN-DSA implementations has turned out to be quite challenging, which makes FN-DSA dangerous when signatures are generated on the fly, such as in a TLS handshake. It is good to stress that this only affects signing. FN-DSA verification does not require floating-point arithmetic (and during verification there wouldn’t be a private key to leak anyway.)</p>
    <div>
      <h2>There are many signatures on the web</h2>
      <a href="#there-are-many-signatures-on-the-web">
        
      </a>
    </div>
    <p>The biggest pain-point of migrating the Internet to post-quantum signatures, is that there are a lot of signatures even in a single connection. When you visit this very website for the first time, we send <b>five signatures and two public keys</b>.</p>
          <figure>
          <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/6frWEoCLnBEZ5qztV8XoT4/25bd315190d8914f42f282679d6f525a/image9.png" />
          </figure><p>The majority of these are for the <b>certificate chain</b>: the CA signs the intermediate certificate, which signs the leaf certificate, which in turn signs the TLS transcript to prove the authenticity of the server. If you’re keeping count: we’re still two signatures short.</p><p>These are for <b>SCTs</b> required for <a href="https://certificate.transparency.dev/howctworks/"><u>certificate transparency</u></a>. Certificate transparency (CT) is a key, but lesser known, part of the <a href="https://smallstep.com/blog/everything-pki/#web-pki-vs-internal-pki"><u>Web PKI</u></a>, the ecosystem that secures browser connections. Its goal is to publicly log every certificate issued, so that misissuances can be detected after the fact. It’s the system that’s behind <a href="http://crt.sh"><u>crt.sh</u></a> and <a href="https://blog.cloudflare.com/new-regional-internet-traffic-and-certificate-transparency-insights-on-radar/"><u>Cloudflare Radar</u></a>. CT has shown its value once more very recently by surfacing a <a href="https://blog.cloudflare.com/unauthorized-issuance-of-certificates-for-1-1-1-1/"><u>rogue certificate for 1.1.1.1</u></a>.</p><p>Certificate transparency works by having independent parties run <i>CT logs</i>. Before issuing a certificate, a CA must first submit it to at least two different CT logs. An SCT is a signature of a CT log that acts as a proof, a <i>receipt</i>, that the certificate has been logged.</p>
    <div>
      <h3>Tailoring signature schemes</h3>
      <a href="#tailoring-signature-schemes">
        
      </a>
    </div>
    <p>There are two aspects of how a signature can be used that are worthwhile to highlight: whether the <b>public key is included</b> with the signature, and whether the signature is <b>online</b> or <b>offline</b>.</p><p>For the SCTs and the signature of the root on the intermediate, the public key is not transmitted during the handshake. Thus, for those, a signature scheme with smaller signatures but larger public keys, such as MAYO, SNOVA, or UOV, would be particularly well-suited. For the other signatures, the public key is included, and it’s more important to minimize the sizes of the combined public key and signature.</p><p>The handshake signature is the only signature that is created online — all the other signatures are created ahead of time.  The handshake signature is created and verified only once, whereas the other signatures are typically verified many times by different clients. This means that for the handshake signature, it’s advantageous to balance signing and verification time which are both in the <i>hot path</i>, whereas for the other signatures having better verification time at the cost of slower signing is worthwhile. This is one of the advantages RSA still enjoys over elliptic curve signatures today.</p><p>Putting together different signature schemes is a fun puzzle, but it also comes with some drawbacks. Using multiple different schemes increases the attack surface because an algorithmic or implementation vulnerability in one compromises the whole. Also, the whole ecosystem needs to implement and optimize multiple algorithms, which is a significant burden.</p>
    <div>
      <h2>Putting it together</h2>
      <a href="#putting-it-together">
        
      </a>
    </div>
    <p>So, what are some reasonable combinations to try?</p>
    <div>
      <h3>With NIST’s current picks</h3>
      <a href="#with-nists-current-picks">
        
      </a>
    </div>
    <p>With the draft standards available today, we do not have a lot of options.</p><p>If we simply switch to ML-DSA-44 for all signatures, we’re adding 15kB of data that needs to be transmitted from the server to the client during the TLS handshake. Is that a lot? Probably. We will address that later on.</p><p>If we wait a bit and replace all but the handshake signature with FN-DSA-512, we’re looking at adding only 7kB. That’s much better, but I have to repeat that it’s difficult to implement FN-DSA-512 signing safely without timing side channels, and there is a good chance we’ll shoot ourselves in the foot if we’re not careful. Another way to shoot ourselves in the foot <i>today</i> is with stateful hash-based signatures, as we explain <a href="https://blog.cloudflare.com/pq-2024/#stateful-hash-based-signatures"><u>here</u></a>. All in all, FN-DSA-512 and stateful hash-based signatures tempt us with a similar and clear performance benefit over ML-DSA-44, but are difficult to use safely.</p>
    <div>
      <h3>Signatures on the horizon</h3>
      <a href="#signatures-on-the-horizon">
        
      </a>
    </div>
    <p>There are some promising new signature schemes submitted to the NIST onramp.</p><p>Purely looking at sizes, SQISign I is the clear winner, even beating RSA-2048. Unfortunately, the computation required for signing, and crucially verification, are too high. SQISign is in a worse position than FN-DSA with implementation security: it’s very complicated and it’s unclear how to perform signing in <i>constant time</i>. For niche applications, SQISign might be useful, but for general adoption verification times need to improve significantly, even if that requires a larger signature. Over the last few years there has been amazing progress in improving verification time; simplifying the algorithm; and <a href="https://eprint.iacr.org/2025/832"><u>implementation security</u></a> for (variants of) SQISign. They’re not there yet, but the gap has shrunk much more than we’d have expected. If the pace of improvement holds, then a future SQISign could well be viable for TLS.</p><p>One conservative contender is <a href="https://link.springer.com/chapter/10.1007/3-540-48910-X_15"><u>UOV (unbalanced oil and vinegar)</u></a>. It is an old multivariate scheme with a large public key (66.5kB), but small signatures (96 bytes). Over the decades, there have been many attempts to add some structure to UOV public keys, to get a better balance between public key and signature size. Many of these so-called <i>structured multivariate </i>schemes, which includes Rainbow and GeMMS, unfortunately have been broken dramatically <a href="https://eprint.iacr.org/2022/214.pdf"><u>“with a laptop over the weekend”</u></a>. MAYO and SNOVA, which we’ll get to in a bit, are the latest attempts at structured multivariate. UOV itself has remained mostly unscathed. Surprisingly in 2025, Lars Ran found a completely new <a href="https://eprint.iacr.org/2025/1143"><u>“wedges” attack</u></a> on UOV. It doesn’t affect UOV much, although SNOVA and MAYO are hit harder. Why the attack is noteworthy, is that it’s based on a relatively simple idea: it is surprising it wasn’t found before. Now, getting back to performance: if we combine UOV for the root and SCTs with ML-DSA-44 for the others, we’re looking at only 10kB — close to FN-DSA-512.</p><p>Now, let’s turn to the main event:</p>
    <div>
      <h3>The fight between MAYO versus SNOVA</h3>
      <a href="#the-fight-between-mayo-versus-snova">
        
      </a>
    </div>
    <p>Looking at the roster today, MAYO and particularly SNOVA look great from a performance standpoint. Last year, SNOVA and MAYO were closer in performance, but they have diverged quite a bit.</p><p><a href="https://pqmayo.org/"><u>MAYO</u></a> is designed by the cryptographer that broke <a href="https://eprint.iacr.org/2022/214.pdf"><u>Rainbow</u></a>. As a structured multivariate scheme, its security requires careful scrutiny, but its utility (assuming it is not broken) is very appealing. MAYO allows for a fine-grained tradeoff between signature and public key size. For the submission, to keep things simple, the authors proposed two concrete variants: MAYO<sub>one</sub> with balanced signature (454 bytes) and public key (1.4kB) sizes, and MAYO<sub>two</sub> that has signatures of 216 bytes, while keeping the public key manageable at 4.3kB. Verification times are excellent, while signing times are somewhat slower than ECDSA, but far better than RSA. Combining both variants in the obvious way, we’re only looking at 4.3kB. These numbers are a bit higher than last year, as MAYO adjusted its parameters again slightly to account for newly discovered attacks.</p><p>Over the competition, <a href="https://snova.pqclab.org/"><u>SNOVA</u></a> has been hit harder by attacks than MAYO. SNOVA’s response has been more aggressive: instead of just tweaking parameters to adjust, they have also made larger changes to the internals of the scheme, to counter the attacks and to get a performance improvement to boot. Combining SNOVA<sub>(37,17,16,2)</sub> and SNOVA<sub>(24,5,23,4)</sub> in the obvious way, we’re looking at adding just an amazing 2.1kB.</p><p>We see a face-off shaping up between the risky but much smaller SNOVA, and the conservative but slower MAYO. Zooming out, both have very welcome performance, and both are too risky to deploy now. Ran’s new wedges attack is an example that the field of multivariate cryptanalysis still holds surprises, and needs more eyes and time. It’s too soon to pick a winner between SNOVA and MAYO: let them continue to compete. Even if they turn out to be secure, neither is likely to be standardized by 2029, which means we cannot rely on them for the initial migration to post-quantum authentication.</p><p>Stepping back, is the 15kB for ML-DSA-44 actually that bad?</p>
    <div>
      <h2>Do we really care about the extra bytes?</h2>
      <a href="#do-we-really-care-about-the-extra-bytes">
        
      </a>
    </div>
    <p>On average, around 18 million TLS connections are established with Cloudflare per second. Upgrading each to ML-DSA, would take 2.1Tbps, which is 0.5% of our current total network capacity. No problem so far. The question is how these extra bytes affect performance.</p><p>It will take 15kB extra to swap in ML-DSA-44. That’s a lot compared to the typical handshake today, but it’s not a lot compared to the JavaScript and images served on many web pages. The key point is that the change we must make here affects every single TLS connection, whether it’s used for a bloated website, or a time-critical API call. Also, it’s not just about waiting a bit longer. If you have spotty cellular reception, that extra data can make the difference between being able to load a page, and having the connection time out. (As an aside, talking about bloat: many apps perform a <a href="https://thomwiggers.nl/publication/tls-on-android/tls-on-android.pdf"><u>surprisingly high number of TLS handshakes</u></a>).</p><p>Just like with key agreement, performance isn’t our only concern: we also want the connection to succeed in the first place. Back in 2021, <a href="https://blog.cloudflare.com/sizing-up-post-quantum-signatures/"><u>we ran an experiment</u></a> artificially enlarging the certificate chain to simulate larger post-quantum certificates. We summarize the result <a href="https://blog.cloudflare.com/pq-2024/#do-we-really-care-about-the-extra-bytes"><u>here</u></a>. One key take-away is that some clients or middleboxes don’t like certificate chains larger than 10kB. This is problematic for a <a href="https://eprint.iacr.org/2018/063.pdf"><u>single-certificate migration</u></a> strategy. In this approach, the server installs a single traditional certificate that contains a separate post-quantum certificate in a so-called non-critical extension. A client that does not support post-quantum certificates will ignore the extension. In this approach, installing the single certificate will immediately break all clients with compatibility issues, making it a non-starter. On the performance side there is also a steep drop in performance at 10kB because of the initial congestion window.</p><p>
</p><p>Is 9kB too much? 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, 27% 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 259kB. For non-resumptions the median is 8.1kB and average is 583kB. This vast difference between median and average indicates that a small fraction of data-heavy connections skew the average. In fact, only 15.5% 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-44 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>Way forward for post-quantum authentication</h2>
      <a href="#way-forward-for-post-quantum-authentication">
        
      </a>
    </div>
    <p>The path for migrating the Internet to post-quantum authentication is much less clear than with key agreement. Unless we can get performance much closer to today’s authentication, we expect the vast majority to keep post-quantum authentication disabled. Postponing enabling post-quantum authentication until Q-day draws near carries a real risk that we will not see the issues before it’s too late to fix. That’s why it’s essential to make post-quantum authentication performant enough to be turned on by default.</p><p>We’re exploring various ideas to reduce the number of signatures, in increasing order of ambition: leaving out intermediates; KEMTLS; and Merkle Tree Certificates. We covered these in <a href="https://blog.cloudflare.com/pq-2024/#reducing-number-of-signatures"><u>detail last year</u></a>. Most progress has been made on the last one: <a href="https://datatracker.ietf.org/doc/draft-davidben-tls-merkle-tree-certs/"><u>Merkle Tree Certificates</u></a> (MTC). In this proposal, in the common case, all signatures except the handshake signature are replaced by a short &lt;800 byte Merkle tree proof. This could well allow for post-quantum authentication that’s actually faster than using traditional certificates today! Together with Chrome, we’re going to try it out by the end of the year: read about it in <a href="https://blog.cloudflare.com/bootstrap-mtc/"><u>this blog</u></a> post.</p>
    <div>
      <h3>Not just TLS, authentication, and key agreement</h3>
      <a href="#not-just-tls-authentication-and-key-agreement">
        
      </a>
    </div>
    <p>Despite its length, in this blog post, we have only really touched upon migrating TLS. And even TLS we did not cover completely, as we have not discussed <a href="https://blog.cloudflare.com/announcing-encrypted-client-hello"><u>Encrypted ClientHello</u></a> (we didn’t forget about it). Although important, TLS is not the only protocol key to the security of the Internet. We want to briefly mention a few other challenges, but cannot go into detail. One particular challenge is DNSSEC, which is responsible for securing the resolution of domain names.</p><p>Although key agreement and signatures are the most widely used cryptographic primitives, over the last few years we have seen the adoption of more <a href="https://github.com/fancy-cryptography/fancy-cryptography"><u>esoteric cryptography</u></a> to serve more advanced use cases, such as unlinkable tokens with <a href="https://blog.cloudflare.com/privacy-pass-standard"><u>Privacy Pass</u></a> / <a href="https://blog.cloudflare.com/eliminating-captchas-on-iphones-and-macs-using-new-standardhttps://blog.cloudflare.com/eliminating-captchas-on-iphones-and-macs-using-new-standard"><u>PAT</u></a>, anonymous credentials, and <a href="https://blog.cloudflare.com/inside-geo-key-manager-v2"><u>attribute based encryption</u></a> to name a few. For most of these advanced cryptographic schemes, there is no known practical post-quantum alternative yet. Although to our delight there have been great advances in post-quantum anonymous credentials.</p>
    <div>
      <h2>What you can do today to stay safe against quantum attacks</h2>
      <a href="#what-you-can-do-today-to-stay-safe-against-quantum-attacks">
        
      </a>
    </div>
    <p>To summarize, there are two main post-quantum migrations to keep an eye on: key agreement, and certificates.</p><p>We recommend moving to <b>post-quantum key agreement </b>to counter store-now/decrypt-later attacks, which only requires a software update on both sides. That means that with the quick adoption (we’re <a href="https://developers.cloudflare.com/ssl/post-quantum-cryptography/pqc-support/"><u>keeping a list</u></a>) of X25519MLKEM768 across software and services, you might well be secure already against store-now/decrypt-later! On Cloudflare Radar you can <a href="https://radar.cloudflare.com/adoption-and-usage#browser-support"><u>check</u></a> whether your browser supports X25519MLKEM768; if you use Firefox, there is <a href="https://addons.mozilla.org/en-US/firefox/addon/pqspy/"><u>an extension</u></a> to check support of websites while you visit; you can scan whether your website supports it <a href="https://pqscan.io/"><u>here</u></a>; and you can use Wireshark to check for it <a href="https://www.netmeister.org/blog/tls-hybrid-kex.html"><u>on the wire</u></a>.</p><p>Those are just spot checks. For a proper migration, you’ll need to figure out where cryptography is used. That’s a tall order, as most organizations have a hard time tracking all software, services, and external vendors they use in the first place. There will be systems that are difficult to upgrade or have external dependencies, but in many cases it’s simple. In fact, in many cases, you’ll spend a lot of time to find out that they are already done.</p><p>As figuring out <i>what to do</i> is the bulk of the work, it’s perhaps tempting to split that out as a first milestone: create a detailed inventory first; the so-called <a href="https://github.com/IBM/CBOM"><u>cryptographic bill of materials</u></a> (CBOM). Don’t let an inventory become a goal on its own: we need to keep our eyes on the ball. Most cases are easy: if you figured out what to do to migrate in one case, don’t wait and context switch, but just do it. That doesn’t mean it’ll be fast: this is a marathon not a sprint, but you’ll be surprised how much ground can be covered by getting started.</p><p><b>Certificates.</b> At the time of writing this blog in October 2025, the final standards for post-quantum certificates are not set yet. Hopefully that won’t take too long to resolve. But there is much that you can do now to prepare for post-quantum certificates that you won’t regret at all. Keep software up-to-date. Automate certificate issuance. Ensure you can install multiple certificates.</p><p>In case you’re worried about protocol ossification, there is no reason to wait: the final post-quantum standards will not be very different from the draft. You can test with preliminary implementations (or large dummy certificates) today.</p><p>The post-quantum migration is quite unique. Typically, if cryptography is broken, it’s either sudden or gradually making it easy to ignore for a time. In both cases, migrations in the end are rushed. With the quantum threat, we know for sure that we’ll need to replace a lot of cryptography, but we also have time. Instead of just a chore, we invite you to see this as an opportunity: we have to do maintenance now on many systems that rarely get touched. Instead of just hotfixes, now is the opportunity to rethink past choices. </p><p>At least, if you start now. Good luck with your migration, and if you hit any issues, do reach out: ask-research@cloudflare.com</p> ]]></content:encoded>
            <category><![CDATA[Research]]></category>
            <category><![CDATA[Post-Quantum]]></category>
            <guid isPermaLink="false">7nIcJ4ZbXuMXHQ9tPi2P4f</guid>
            <dc:creator>Bas Westerbaan</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[Addressing the unauthorized issuance of multiple TLS certificates for 1.1.1.1]]></title>
            <link>https://blog.cloudflare.com/unauthorized-issuance-of-certificates-for-1-1-1-1/</link>
            <pubDate>Thu, 04 Sep 2025 17:30:00 GMT</pubDate>
            <description><![CDATA[ Unauthorized TLS certificates were issued for 1.1.1.1 by a Certification Authority without permission from Cloudflare. These rogue certificates have now been revoked. ]]></description>
            <content:encoded><![CDATA[ <p></p><p>Over the past few days Cloudflare has been notified through our vulnerability disclosure program and the <a href="https://groups.google.com/g/certificate-transparency/c/we_8SNGqA3w/m/ILXqa0hzAgAJ?utm_medium=email&amp;utm_source=footer"><u>certificate transparency mailing list</u></a> that unauthorized certificates were issued by <a href="https://www.fina.hr/"><u>Fina CA</u></a> for 1.1.1.1, one of the IP addresses used by our <a href="https://one.one.one.one/"><u>public DNS resolver service</u></a>. From February 2024 to August 2025, Fina CA <a href="https://crt.sh/?iPAddress=1.1.1.1&amp;match=="><u>issued</u></a> twelve certificates for 1.1.1.1 without our permission. We did not observe unauthorized issuance for any properties managed by Cloudflare other than 1.1.1.1.</p><p>We have no evidence that bad actors took advantage of this error. To impersonate Cloudflare's public DNS resolver 1.1.1.1, an attacker would not only require an unauthorized certificate and its corresponding private key, but attacked users would also need to trust the Fina CA. Furthermore, traffic between the client and 1.1.1.1 would have to be intercepted.</p><p>While this unauthorized issuance is an unacceptable lapse in security by Fina CA, we should have caught and responded to it earlier. After speaking with Fina CA, it appears that they issued these certificates for the purposes of internal testing. However, no CA should be issuing certificates for domains and IP addresses without checking control. At present all certificates have been <a href="http://rdc.fina.hr/RDC2020/FinaRDCCA2020partc1.crl"><u>revoked</u></a>. We are awaiting a full post-mortem from Fina.</p><p>While we regret this situation, we believe it is a useful opportunity to walk through how trust works on the Internet between networks like ourselves, destinations like 1.1.1.1, CAs like Fina, and devices like the one you are using to read this. To learn more about the mechanics, please keep reading.</p>
    <div>
      <h3>Background</h3>
      <a href="#background">
        
      </a>
    </div>
    <p>Cloudflare operates a <a href="https://one.one.one.one/"><u>public DNS resolver 1.1.1.1 service</u></a> that millions of devices use to resolve domain names from a human-readable format such as example.com to an IP address like 192.0.2.42 or 2001:db8::2a.</p><p>The 1.1.1.1 service is accessible using various methods, across multiple domain names, such as <a href="https://cloudflare-dns.com"><u>cloudflare-dns.com</u></a> and <a href="https://one.one.one.one"><u>one.one.one.one</u></a>, and also using various IP addresses, such as 1.1.1.1, 1.0.0.1, 2606:4700:4700::1111, and 2606:4700:4700::1001. <a href="https://one.one.one.one/family/"><u>1.1.1.1 for Families</u></a> also provides public DNS resolver services and is hosted on different IP addresses — 1.1.1.2, 1.1.1.3, 1.0.0.2, 1.0.0.3, 2606:4700:4700::1112, 2606:4700:4700::1113, 2606:4700:4700::1002, 2606:4700:4700::1003.</p><p>As originally specified in <a href="https://datatracker.ietf.org/doc/html/rfc1034"><u>RFC 1034</u></a> and <a href="https://datatracker.ietf.org/doc/html/rfc1035"><u>RFC 1035</u></a>, the DNS protocol includes no privacy or authenticity protections. DNS queries and responses are exchanged between client and server in plain text over UDP or TCP. These represent around 60% of queries received by the Cloudflare 1.1.1.1 service. The lack of privacy or authenticity protection means that any intermediary can potentially read the DNS query and response and modify them without the client or the server being aware.</p>
          <figure>
          <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/6zbEvgOCwZomZTbgSGFuEo/d638f36eebdbf2577ea0b8172dff843e/image1.png" />
          </figure><p>To address these shortcomings, we have helped develop and deploy multiple solutions at the IETF. The two of interest to this post are DNS over TLS (DoT, <a href="https://datatracker.ietf.org/doc/html/rfc7858"><u>RFC 7878</u></a>) and DNS over HTTPS (DoH, <a href="https://datatracker.ietf.org/doc/html/rfc8484"><u>RFC 8484</u></a>). In both cases the DNS protocol itself is mainly unchanged, and the desirable security properties are implemented in a lower layer, replacing the simple use of plain-text in UDP and TCP in the original specification. Both DoH and DoT use TLS to establish an authenticated, private, and encrypted channel over which DNS messages can be exchanged. To learn more you can read <a href="https://blog.cloudflare.com/dns-encryption-explained/"><u>DNS Encryption Explained</u></a>.</p><p>During the <a href="https://www.cloudflare.com/learning/ssl/transport-layer-security-tls/"><u>TLS handshake</u></a>, the server proves its identity to the client by presenting a certificate. The client validates this certificate by verifying that it is signed by a Certification Authority that it already trusts. Only then does it establish a connection with the server. Once connected, TLS provides encryption and integrity for the DNS messages exchanged between client and server. This protects DoH and DoT against eavesdropping and tampering between the client and server.</p>
          <figure>
          <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/21YeKS2nYIFDI9uC3uClXE/6115e00945458d42627d973aef75076c/image2.png" />
          </figure><p>The TLS certificates used in DoT and DoH are the same kinds of certificates HTTPS websites serve. Most website certificates are issued for domain names like <a href="http://example.com"><u>example.com</u></a>. When a client connects to that website, they resolve the name <a href="http://example.com"><u>example.com</u></a> to an IP like 192.0.2.42, then connect to the domain on that IP address. The server responds with a TLS certificate containing <a href="http://example.com"><u>example.com</u></a>, which the device validates.</p><p>However, DNS server certificates tend to be used slightly differently. Certificates used for DoT and DoH have to contain the service IP addresses, not just domain names. This is due to clients being unable to resolve a domain name in order to contact their resolver, like <a href="https://cloudflare-dns.com"><u>cloudflare-dns.com</u></a>. Instead, devices are first set up by connecting to their resolver via a known IP address, such as 1.1.1.1 in the case of Cloudflare public DNS resolver. When this connection uses DoT or DoH, the resolver responds with a TLS certificate issued for that IP address, which the client validates. If the certificate is valid, the client believes that it is talking to the owner of 1.1.1.1 and starts sending DNS queries.</p><p>You can see that the IP addresses are included in the certificate Cloudflare’s public resolver uses for DoT/DoH:</p>
            <pre><code>Certificate:
  Data:
      Version: 3 (0x2)
      Serial Number:
          02:7d:c8:c5:e1:72:94:ae:c9:ed:3f:67:72:8e:8a:08
      Signature Algorithm: sha256WithRSAEncryption
      Issuer: C=US, O=DigiCert Inc, CN=DigiCert Global G2 TLS RSA SHA256 2020 CA1
      Validity
          Not Before: Jan  2 00:00:00 2025 GMT
          Not After : Jan 21 23:59:59 2026 GMT
      Subject: C=US, ST=California, L=San Francisco, O=Cloudflare, Inc., CN=cloudflare-dns.com
      X509v3 extensions:
          X509v3 Subject Alternative Name:
              DNS:cloudflare-dns.com, DNS:*.cloudflare-dns.com, DNS:one.one.one.one, IP Address:1.0.0.1, IP Address:1.1.1.1, IP Address:162.159.36.1, IP Address:162.159.46.1, IP Address:2606:4700:4700:0:0:0:0:1001, IP Address:2606:4700:4700:0:0:0:0:1111, IP Address:2606:4700:4700:0:0:0:0:64, IP Address:2606:4700:4700:0:0:0:0:6400</code></pre>
            
    <div>
      <h3>Rogue certificate issuance</h3>
      <a href="#rogue-certificate-issuance">
        
      </a>
    </div>
    <p>The section above describes normal, expected use of Cloudflare public DNS resolver 1.1.1.1 service, using certificates managed by Cloudflare. However, Cloudflare has been made aware of other, unauthorized certificates being issued for 1.1.1.1. Since certificate validation is the mechanism by which DoH and DoT clients establish the authenticity of a DNS resolver, this is a concern. Let’s now dive a little further in the security model provided by DoH and DoT.</p><p>Consider a client that is preconfigured to use the 1.1.1.1 resolver service using DoT. The client must establish a TLS session with the configured server before it can send any DNS queries. To be trusted, the server needs to present a certificate issued by a CA that the client trusts. The collection of certificates trusted by the client is also called the root store.</p>
            <pre><code>Certificate:
  Data:
      Version: 3 (0x2)
      Serial Number:
          02:7d:c8:c5:e1:72:94:ae:c9:ed:3f:67:72:8e:8a:08
      Signature Algorithm: sha256WithRSAEncryption
      Issuer: C=US, O=DigiCert Inc, CN=DigiCert Global G2 TLS RSA SHA256 2020 CA1</code></pre>
            <p>A Certification Authority (CA) is an organisation, such as DigiCert in the section above, whose role is to receive requests to sign certificates and verify that the requester has control of the domain. In this incident, Fina CA issued certificates for 1.1.1.1 without Cloudflare's involvement. This means that Fina CA did not properly check whether the requestor had legitimate control over 1.1.1.1. According to Fina CA:</p><blockquote><p>“They were issued for the purpose of internal testing of certificate issuance in the production environment. An error occurred during the issuance of the test certificates when entering the IP addresses and as such they were published on Certificate Transparency log servers.”</p></blockquote><p>Although it’s not clear whether Fina CA sees it as an error, we emphasize that it is not an error to publish test certificates on Certificate Transparency (more about what that is later on). Instead, the error at hand is Fina CA using their production keys to sign a certificate for an IP address without permission of the controller. We have <a href="https://ripe84.ripe.net/archives/video/747/"><u>talked about</u></a> misuse of 1.1.1.1 in documentation, lab, and testing environments at length. Instead of the Cloudflare public DNS resolver 1.1.1.1 IP address, Fina should have used an IP address it controls itself.</p><p>Unauthorized certificates are unfortunately not uncommon, whether due to negligence — such as <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=1930029"><u>IdenTrust</u></a> in November 2024 — or compromise. Famously 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>, and its keys were used to issue hundreds of certificates. This hack was a wake-up call and motivated the introduction of Certificate Transparency (CT), later formalised in <a href="https://datatracker.ietf.org/doc/html/rfc6962"><u>RFC 6962</u></a>. The goal of Certificate Transparency is not to directly prevent misissuance, but to be able to detect any misissuance once it has happened, by making sure every certificate issued by a CA is publicly available for inspection.</p><p>In certificate transparency several independent parties, including <a href="https://blog.cloudflare.com/introducing-certificate-transparency-monitoring/"><u>Cloudflare</u></a>, operate public logs of issued certificates. Many modern browsers do not accept certificates unless they provide proof in the form of signed certificate timestamps (<a href="https://certificate.transparency.dev/howctworks/"><u>SCT</u></a>s) that the certificate has been logged in at least two logs. Domain owners can therefore monitor all public CT logs for any certificate containing domains they care about. If they see a certificate for their domains that they did not authorize, they can raise the alarm. CT is also the data source for public services such as <a href="https://crt.sh"><u>crt.sh</u></a> and Cloudflare Radar’s <a href="https://radar.cloudflare.com/certificate-transparency"><u>certificate transparency page</u></a>.</p><p>Not all clients require proof of inclusion in certificate transparency. Browsers do, but most DNS clients don’t. We were fortunate that Fina CA did submit the unauthorized certificates to the CT logs, which allowed them to be discovered.</p>
    <div>
      <h3>Investigation into potential malicious use</h3>
      <a href="#investigation-into-potential-malicious-use">
        
      </a>
    </div>
    <p>Our immediate concern was that someone had maliciously used the certificates to impersonate the 1.1.1.1 service. Such an attack would require all the following:</p><ol><li><p>An attacker would require a rogue certificate and its corresponding private key.</p></li><li><p>Attacked clients would need to trust the Fina CA.</p></li><li><p>Traffic between the client and 1.1.1.1 would have to be intercepted.</p></li></ol><p>In light of this incident, we have reviewed these requirements one by one:</p><p>1. We know that a certificate was issued without Cloudflare's involvement. We must assume that a corresponding private key exists, which is not under Cloudflare's control. This could be used by an attacker. Fina CA wrote to us that the private keys were exclusively in Fina’s controlled environment and were immediately destroyed even before the certificates were revoked. As we have no way to verify this, we have and continue to take steps to detect malicious use as described in point 3.</p><p>2. Furthermore, some clients trust Fina CA. It is included by default in <a href="https://learn.microsoft.com/en-us/security/trusted-root/participants-list"><u>Microsoft’s root store</u></a> and in an <a href="https://eidas.ec.europa.eu/efda/trust-services/browse/eidas/tls"><u>EU Trust Service provider</u></a>. We can exclude some clients, as the CA certificate is not included by default in the root stores of <a href="https://android.googlesource.com/platform/system/ca-certificates/+/master/files/"><u>Android</u></a>, <a href="https://support.apple.com/en-us/HT209143"><u>Apple</u></a>, <a href="https://wiki.mozilla.org/CA/Included_Certificates"><u>Mozilla</u></a>, or <a href="https://g.co/chrome/root-policy"><u>Chrome</u></a>. These users cannot have been affected with these default settings. For these certificates to be used nefariously, the client’s root store must include the Certification Authority (CA) that issued them. Upon discovering the problem, we immediately reached out to Fina CA, Microsoft, and the <a href="https://eidas.ec.europa.eu/efda/trust-services/browse/eidas/tls/tl/HR"><u>EU Trust Service provider</u></a>. Microsoft responded quickly, and started rolling out an update to their <i>disallowed list</i>, which should cause clients that use it to stop trusting the certificate.</p><p>3. Finally, we have launched an investigation into possible interception between users and 1.1.1.1. The first way this could happen is when the attacker is on-path of the client request. Such man-in-the-middle attacks are likely to be invisible to us. Clients will get responses from their on-path middlebox and we have no reliable way of telling that is happening. On-path interference has been a persistent problem for 1.1.1.1, which we’ve been <a href="https://blog.cloudflare.com/fixing-reachability-to-1-1-1-1-globally/"><u>working on</u></a> ever since we announced 1.1.1.1.</p><p>A second scenario can occur when a malicious actor is off-path, but is able to hijack 1.1.1.1 routing via BGP. These are scenarios we have discussed in a<a href="https://blog.cloudflare.com/bgp-hijack-detection/"> <u>previous blog post</u></a>, and <a href="https://manrs.org/2024/05/rpki-rov-deployment-reaches-major-milestone/"><u>increasing adoption of RPKI route origin validation (ROV)</u></a> makes BGP hijacks with high penetration harder. We looked at the historical BGP announcements involving 1.1.1.1, and have found no evidence that such routing hijacks took place.</p><p>Although we cannot be certain, so far we have seen no evidence that these certificates have been used to impersonate Cloudflare public DNS resolver 1.1.1.1 traffic. In later sections we discuss the steps we have taken to prevent such impersonation in the future, as well as concrete actions you can take to protect your own systems and users.</p>
    <div>
      <h3>A closer look at the unauthorized certificates attributes</h3>
      <a href="#a-closer-look-at-the-unauthorized-certificates-attributes">
        
      </a>
    </div>
    <p>All unauthorized certificates for 1.1.1.1 were valid for exactly one year and included other domain names. Most of these domain names are not registered, which indicates that the certificates were issued without proper domain control validation. This violates sections 3.2.2.4 and 3.2.2.5 of the CA/Browser Forum’s <a href="https://cabforum.org/working-groups/server/baseline-requirements/requirements/#3224-validation-of-domain-authorization-or-control"><u>Baseline Requirements</u></a>, and sections 3.2.2.3 and 3.2.2.4 of the <a href="https://rdc.fina.hr/RDC2015/CPWSA1-12-en.pdf"><u>Fina CA Certificate Policy</u></a>.</p><p>The full list of domain names we identified on the unauthorized certificates are as follows:</p>
            <pre><code>fina.hr
ssltest5
test.fina.hr
test.hr
test1.hr
test11.hr
test12.hr
test5.hr
test6
test6.hr
testssl.fina.hr
testssl.finatest.hr
testssl.hr
testssl1.finatest.hr
testssl2.finatest.hr</code></pre>
            <p>It’s also worth noting that the Subject attribute points to a fictional organisation <b>TEST D.D.</b>, as can be seen on this unauthorized certificate:</p>
            <pre><code>        Serial Number:
            a5:30:a2:9c:c1:a5:da:40:00:00:00:00:56:71:f2:4c
        Signature Algorithm: sha256WithRSAEncryption
        Issuer: C=HR, O=Financijska agencija, CN=Fina RDC 2015
        Validity
            Not Before: Nov  2 23:45:15 2024 GMT
            Not After : Nov  2 23:45:15 2025 GMT
        Subject: C=HR, O=TEST D.D., L=ZAGREB, CN=testssl.finatest.hr, serialNumber=VATHR-32343828408.306
        X509v3 extensions:
            X509v3 Subject Alternative Name:
                DNS:testssl.finatest.hr, DNS:testssl2.finatest.hr, IP Address:1.1.1.1</code></pre>
            
    <div>
      <h3>Incident timeline and impact</h3>
      <a href="#incident-timeline-and-impact">
        
      </a>
    </div>
    <p><i>All timestamps are UTC. All certificates are identified by their date of validity.</i></p><p>The <a href="https://crt.sh/?id=12116084225"><u>first certificate</u></a> was issued to be valid starting February 2024, and revoked 33 min later. 11 certificate issuances with common name 1.1.1.1 followed from February 2024 to August 2025. Public reports have been made on <a href="https://news.ycombinator.com/item?id=45089708"><u>Hacker News</u></a> and on the <a href="https://groups.google.com/g/certificate-transparency/c/we_8SNGqA3w/m/ILXqa0hzAgAJ"><u>certificate-transparency mailing list</u></a> early in September 2025, which Cloudflare responded to.</p><p>While responding to the incident, we identified the full list of misissued certificates, their revocation status, and which clients trust them.</p><p>The full timeline for the incident is as follows.</p><table><tr><td><p><b>Date &amp; Time (UTC)</b></p></td><td><p><b>Event Description</b></p></td></tr><tr><td><p>2024-02-18 11:07:33</p></td><td><p><a href="https://crt.sh/?id=12116084225"><u>First certificate issuance</u></a> revoked on 2024-02-18 11:40:00</p></td></tr><tr><td><p>2024-09-25 08:04:03</p></td><td><p><a href="https://crt.sh/?id=14681939427"><u>Issuance</u></a> revoked on 2024-11-06 07:36:05</p></td></tr><tr><td><p>2024-10-04 07:55:38</p></td><td><p><a href="https://crt.sh/?id=14793030836"><u>Issuance</u></a> revoked on 2024-10-04 07:56:56</p></td></tr><tr><td><p>2024-10-04 08:05:48</p></td><td><p><a href="https://crt.sh/?id=14793121895"><u>Issuance</u></a> revoked on 2024-11-06 07:39:55</p></td></tr><tr><td><p>2024-10-15 06:28:48</p></td><td><p><a href="https://crt.sh/?id=14939369380"><u>Issuance</u></a> revoked on 2024-11-06 07:35:36</p></td></tr><tr><td><p>2024-11-02 23:45:15</p></td><td><p><a href="https://crt.sh/?id=15190039061"><u>Issuance</u></a> revoked on 2024-11-02 23:48:42</p></td></tr><tr><td><p>2025-03-05 09:12:23</p></td><td><p><a href="https://crt.sh/?id=16939550348"><u>Issuance</u></a> revoked on 2025-03-05 09:13:22</p></td></tr><tr><td><p>2025-05-24 22:56:21</p></td><td><p><a href="https://crt.sh/?id=18603461241"><u>Issuance</u></a> revoked on 2025-09-04 06:13:27</p></td></tr><tr><td><p>2025-06-28 23:05:32</p></td><td><p><a href="https://crt.sh/?id=19318694206"><u>Issuance</u></a> revoked on 2025-07-18 07:01:27</p></td></tr><tr><td><p>2025-07-18 07:05:23</p></td><td><p><a href="https://crt.sh/?id=19749594221"><u>Issuance</u></a> revoked on 2025-07-18 07:09:45</p></td></tr><tr><td><p>2025-07-18 07:13:14</p></td><td><p><a href="https://crt.sh/?id=19749721864"><u>Issuance</u></a> revoked on 2025-09-04 06:30:36</p></td></tr><tr><td><p>2025-08-26 07:49:00</p></td><td><p><a href="https://crt.sh/?id=20582951233"><u>Last certificate issuance</u></a> revoked on 2025-09-04 06:33:20</p></td></tr><tr><td><p>2025-09-01 05:23:00</p></td><td><p><a href="https://news.ycombinator.com/item?id=45089708"><u>HackerNews submission</u></a> about a possible unauthorized issuance</p></td></tr><tr><td><p>2025-09-02 04:50:00</p></td><td><p>Report shared with us on HackerOne, but was mistriaged</p></td></tr><tr><td><p>2025-09-03 02:35:00</p></td><td><p>Second report shared with us on HackerOne, but also mistriaged.</p></td></tr><tr><td><p>2025-09-03 10:59:00</p></td><td><p><a href="https://groups.google.com/g/certificate-transparency/c/we_8SNGqA3w/m/ILXqa0hzAgAJ?utm_medium=email&amp;utm_source=footer"><u>Report sent</u></a> on the public <a><u>certificate-transparency@googlegroups.com</u></a> mailing picked up by the team.</p></td></tr><tr><td><p>2025-09-03 11:33:00</p></td><td><p>First response by Cloudflare on the mailing list about starting the investigation</p></td></tr><tr><td><p>2025-09-03 12:08:00</p></td><td><p>Incident declared</p></td></tr><tr><td><p>2025-09-03 12:16:00</p></td><td><p>Notification of an unauthorised issuance sent to Fina CA, Microsoft Root Store, and EU Trust service provider</p></td></tr><tr><td><p>2025-09-03 12:23:00</p></td><td><p>Cloudflare identifies an initial list of nine rogue certificates</p></td></tr><tr><td><p>2025-09-03 12:24:00</p></td><td><p>Outreach to Fina CA to inform them about the unauthorized issuance, requesting revocation</p></td></tr><tr><td><p>2025-09-03 12:26:00</p></td><td><p>Identify the number of requests served on 1.1.1.1 IP address, and associated names/services</p></td></tr><tr><td><p>2025-09-03 12:42:00</p></td><td><p>As a precautionary measure, began investigation to rule out the possibility of a BGP hijack for 1.1.1.1</p></td></tr><tr><td><p>2025-09-03 18:48:00</p></td><td><p>Second notification of the incident to Fina CA</p></td></tr><tr><td><p>2025-09-03 21:27:00</p></td><td><p>Microsoft Root Store notifies us that they are preventing further use of the identified unauthorized certificates by using their quick-revocation mechanism.</p></td></tr><tr><td><p>2025-09-04 06:13:27</p></td><td><p>Fina revoked all certificates.</p></td></tr><tr><td><p>2025-09-04 12:44:00</p></td><td><p>Cloudflare receives a response from Fina indicating “an error occurred during the issuance of the test certificates when entering the IP addresses and as such they were published on Certificate Transparency log servers. [...] Fina will eliminate the possibility of such an error recurring.”</p></td></tr></table>
    <div>
      <h3>Remediation and follow-up steps</h3>
      <a href="#remediation-and-follow-up-steps">
        
      </a>
    </div>
    <p>Cloudflare has invested from the very start in the Certificate Transparency ecosystem. Not only do we operate CT logs ourselves, we also run a CT monitor that we use to <a href="https://developers.cloudflare.com/ssl/edge-certificates/additional-options/certificate-transparency-monitoring/"><u>alert customers when certificates are mis-issued for their domains</u></a>.</p><p>It is therefore disappointing that we failed to properly monitor certificates for our own domain. We failed three times. The first time because 1.1.1.1 is an IP certificate and our system failed to alert on these. The second time because even if we were to receive certificate issuance alerts, as any of our customers can, we did not implement sufficient filtering. With the sheer number of names and issuances we manage it has not been possible for us to keep up with manual reviews. Finally, because of this noisy monitoring, we did not enable alerting for all of our domains. We are addressing all three shortcomings.</p><p>We double-checked all certificates issued for our names, including but not limited to 1.1.1.1, using certificate transparency, and confirmed that as of 3 September, the Fina CA issued certificates are the only unauthorized issuances. We contacted Fina, and the root programs we know that trust them, to ask for revocation and investigation. The certificates have been revoked.</p><p>Despite no indication of usage of these certificates so far, we take this incident extremely seriously. We have identified several steps we can take to address the risk of these sorts of problems occurring in the future, and we plan to start working on them immediately:</p><p><b>Alerting</b>: Cloudflare will improve alerts and escalation for issuance of certificates for missing Cloudflare owned domains including 1.1.1.1 certificates.</p><p><b>Transparency</b>: The issuance of these unauthorised 1.1.1.1 certificates were detected because Fina CA used Certificate Transparency. Transparency inclusion is not enforced by most DNS clients, which implies that this detection was a lucky one. We are working on bringing transparency to non-browser clients, in particular DNS clients that rely on TLS.</p><p><b>Bug Bounty</b>: Our procedure for triaging reports made through our vulnerability disclosure program was the cause for a delayed response. We are working to revise our triaging process to ensure such reports get the right visibility.</p><p><b>Monitoring</b>: During this incident, our team relied on <a href="https://crt.sh"><u>crt.sh</u></a> to provide us a convenient UI to explore CA issued certificates. We’d like to give a shout to the <a href="https://www.sectigo.com/"><u>Sectigo team</u></a> for maintaining this tool. Given Cloudflare is an active CT Monitor, we have started to build a dedicated UI to explore our data <a href="https://radar.cloudflare.com/certificate-transparency"><u>in Radar</u></a>. We are looking to enable exploration of certs with IP addresses as common names to Radar as well.</p>
    <div>
      <h3>What steps should you take?</h3>
      <a href="#what-steps-should-you-take">
        
      </a>
    </div>
    <p>This incident demonstrates the disproportionate impact that the current root store model can have. It is enough for a single certification authority going rogue for everyone to be at risk.</p><p>If you are an IT manager with a fleet of managed devices, you should consider whether you need to take direct action to revoke these unauthorized certificates. We provide the list in the timeline section above. As the certificates have since been revoked, it is possible that no direct intervention should be required; however, system-wide revocation is not instantaneous and automatic and hence we recommend checking.</p><p>If you are tasked to review the policy of a root store that includes Fina CA, you should take immediate actions to review their inclusion in your program. The issue that has been identified through the course of this investigation raises concerns, and requires a clear report and follow-up from the CA. In addition, to make it possible to detect future such incidents, you should consider having a requirement for all CAs in your root store to participate in Certificate Transparency. Without CT logs, problems such as the one we describe here are impossible to address before they result in impact to end users.</p><p>We are not suggesting that you should stop using DoH or DoT. DNS over UDP and TCP are unencrypted, which puts every single query and response at risk of tampering and unauthorised surveillance. However, we believe that DoH and DoT client security could be improved if clients required that server certificates be included in a certificate transparency log.</p>
    <div>
      <h3>Conclusion</h3>
      <a href="#conclusion">
        
      </a>
    </div>
    <p>This event is the first time we have observed a rogue issuance of a certificate used by our public DNS resolver 1.1.1.1 service. While we have no evidence this was malicious, we know that there might be future attempts that are.</p><p>We plan to accelerate how quickly we discover and alert on these types of issues ourselves. We know that we can catch these earlier, and we plan to do so.</p><p>The identification of these kinds of issues rely on an ecosystem of partners working together to support Certificate Transparency. We are grateful for the monitors who noticed and reported this issue.</p> ]]></content:encoded>
            <category><![CDATA[1.1.1.1]]></category>
            <category><![CDATA[DNS]]></category>
            <category><![CDATA[Resolver]]></category>
            <category><![CDATA[DoH]]></category>
            <category><![CDATA[TLS]]></category>
            <category><![CDATA[Certificate Authority]]></category>
            <category><![CDATA[Security]]></category>
            <category><![CDATA[Certificate Transparency]]></category>
            <guid isPermaLink="false">6dgQ2aH6eirkXOANX0QikR</guid>
            <dc:creator>Joe Abley</dc:creator>
            <dc:creator>Thibault Meunier</dc:creator>
            <dc:creator>Vicky Shrestha</dc:creator>
            <dc:creator>Bas Westerbaan</dc:creator>
        </item>
        <item>
            <title><![CDATA[Conventional cryptography is under threat. Upgrade to post-quantum cryptography with Cloudflare Zero Trust]]></title>
            <link>https://blog.cloudflare.com/post-quantum-zero-trust/</link>
            <pubDate>Mon, 17 Mar 2025 13:00:00 GMT</pubDate>
            <description><![CDATA[ We’re thrilled to announce that organizations can now protect their sensitive corporate network traffic against quantum threats by tunneling it through Cloudflare’s Zero Trust platform. ]]></description>
            <content:encoded><![CDATA[ <p>Quantum computers are actively being developed that will eventually have the ability to break the cryptography we rely on for securing modern communications. Recent <a href="https://blog.google/technology/research/google-willow-quantum-chip/"><u>breakthroughs</u></a> in quantum computing have underscored the vulnerability of conventional cryptography to these attacks. Since 2017, Cloudflare has <a href="https://blog.cloudflare.com/tag/post-quantum/"><u>been at the forefront</u></a> of developing, standardizing, and implementing <a href="https://www.cloudflare.com/learning/ssl/quantum/what-is-post-quantum-cryptography/"><u>post-quantum cryptography</u></a> to withstand attacks by quantum computers. </p><p>Our mission is simple: we want every Cloudflare customer to have a clear path to quantum safety. Cloudflare recognizes the urgency, so we’re committed to managing the complex process of upgrading cryptographic algorithms, so that you don’t have to worry about it. We're not just talking about doing it. <a href="https://radar.cloudflare.com/adoption-and-usage#post-quantum-encryption-adoption"><u>Over 35% of the non-bot HTTPS traffic that touches Cloudflare today is post-quantum secure.</u></a> </p><p>The <a href="https://www.nist.gov/"><u>National Institute of Standards and Technology (NIST)</u></a> also recognizes the urgency of this transition. On November 15, 2024, NIST made a landmark <a href="https://nvlpubs.nist.gov/nistpubs/ir/2024/NIST.IR.8547.ipd.pdf"><u>announcement</u></a> by setting a timeline to phase out <a href="https://en.wikipedia.org/wiki/RSA_(cryptosystem)"><u>RSA</u></a> and <a href="https://blog.cloudflare.com/a-relatively-easy-to-understand-primer-on-elliptic-curve-cryptography/"><u>Elliptic Curve Cryptography (ECC)</u></a>, the conventional cryptographic algorithms that underpin nearly every part of the Internet today. According to NIST’s announcement, these algorithms will be deprecated by 2030 and completely disallowed by 2035.</p><p>At Cloudflare, we aren’t waiting until 2035 or even 2030. We believe privacy is a fundamental human right, and advanced cryptography should be <a href="https://blog.cloudflare.com/post-quantum-crypto-should-be-free/"><u>accessible to everyone</u></a> without compromise. No one should be required to pay extra for post-quantum security. That’s why any visitor accessing a <a href="https://blog.cloudflare.com/pq-2024/"><u>website protected by Cloudflare today</u></a> benefits from post-quantum cryptography, when using a major browser like <a href="https://blog.chromium.org/2024/05/advancing-our-amazing-bet-on-asymmetric.html"><u>Chrome, Edge</u></a>, or <a href="https://www.mozilla.org/en-US/firefox/135.0/releasenotes/"><u>Firefox</u></a>. (And, we are excited to see a <a href="https://radar.cloudflare.com/explorer?dataSet=http&amp;groupBy=post_quantum&amp;filters=botClass%253DLikely_Human%252Cos%253DiOS"><u>small percentage of (mobile) Safari traffic</u></a> in our Radar data.) Well over a third of the human traffic passing through Cloudflare today already enjoys this enhanced security, and we expect this share to increase as more browsers and clients are upgraded to support post-quantum cryptography. </p><p>While great strides have been made to protect human web traffic, not every application is a web application. And every organization has internal applications (both web and otherwise) that do not support post-quantum cryptography.  </p><p>How should organizations go about upgrading their sensitive corporate network traffic to support post-quantum cryptography?</p><p>That’s where today’s announcement comes in. We’re thrilled to announce the first phase of end-to-end quantum readiness of our <a href="https://www.cloudflare.com/zero-trust/">Zero Trust platform</a><b>, </b>allowing customers to protect their corporate network traffic with post-quantum cryptography.<b> Organizations can tunnel their corporate network traffic though Cloudflare’s Zero Trust platform, protecting it against quantum adversaries without the hassle of individually upgrading each and every corporate application, system, or network connection.</b> </p><p>More specifically, organizations can use our Zero Trust platform to route communications from end-user devices (via web browser or Cloudflare’s <a href="https://developers.cloudflare.com/cloudflare-one/connections/connect-devices/warp/"><u>WARP device client</u></a>) to secure applications connected with <a href="https://blog.cloudflare.com/post-quantum-tunnel/"><u>Cloudflare Tunnel</u></a>, to gain end-to-end quantum safety, in the following use cases: </p><ul><li><p><b>Cloudflare’s clientless </b><a href="https://developers.cloudflare.com/cloudflare-one/policies/access/"><b><u>Access</u></b></a><b>: </b>Our clientless <a href="https://www.cloudflare.com/learning/access-management/what-is-ztna/">Zero Trust Network Access (ZTNA)</a> solution verifies user identity and device context for every HTTPS request to corporate applications from a web browser. Clientless Access is now protected end-to-end with post-quantum cryptography.</p></li><li><p><b>Cloudflare’s </b><a href="https://developers.cloudflare.com/cloudflare-one/connections/connect-devices/warp/"><b><u>WARP device client</u></b></a><b>:</b> By mid-2025, customers using the WARP device client will have all of their traffic (regardless of protocol) tunneled over a connection protected by post-quantum cryptography. The WARP client secures corporate devices by privately routing their traffic to Cloudflare's global network, where Gateway applies advanced web filtering and Access enforces policies for secure access to applications. </p></li><li><p><b>Cloudflare </b><a href="https://developers.cloudflare.com/cloudflare-one/policies/gateway/http-policies/"><b><u>Gateway</u></b></a>: Our <a href="https://www.cloudflare.com/learning/access-management/what-is-a-secure-web-gateway/">Secure Web Gateway (SWG) </a>— designed to inspect and filter TLS traffic in order to block threats and unauthorized communications — now supports TLS with post-quantum cryptography. </p></li></ul><p>In the remaining sections of this post, we’ll explore the threat that quantum computing poses and the challenges organizations face in transitioning to post-quantum cryptography. We’ll also dive into the technical details of how our Zero Trust platform supports post-quantum cryptography today and share some plans for the future.</p>
    <div>
      <h3>Why transition to post-quantum cryptography and why now? </h3>
      <a href="#why-transition-to-post-quantum-cryptography-and-why-now">
        
      </a>
    </div>
    <p>There are two key reasons to adopt post-quantum cryptography now:</p>
    <div>
      <h4>1. The challenge of deprecating cryptography</h4>
      <a href="#1-the-challenge-of-deprecating-cryptography">
        
      </a>
    </div>
    <p>History shows that updating or removing outdated cryptographic algorithms from live systems is extremely difficult. For example, although the MD5 hash function was <a href="https://iacr.org/archive/eurocrypt2005/34940019/34940019.pdf"><u>deemed insecure in 2004</u></a> and long since deprecated, it was still in use with the RADIUS enterprise authentication protocol as recently as 2024. In July 2024, Cloudflare contributed to research revealing an <a href="https://blog.cloudflare.com/radius-udp-vulnerable-md5-attack/"><u>attack on RADIUS</u></a> that exploited its reliance on MD5. This example underscores the enormous challenge of updating legacy systems — this difficulty in achieving <a href="https://en.wikipedia.org/wiki/Cryptographic_agility"><i><u>crypto-agility</u></i></a> — which will be just as demanding when it’s time to transition to post-quantum cryptography. So it makes sense to start this process now.</p>
    <div>
      <h4>2. The “harvest now, decrypt later” threat</h4>
      <a href="#2-the-harvest-now-decrypt-later-threat">
        
      </a>
    </div>
    <p>Even though quantum computers lack enough qubits to break conventional cryptography today, adversaries can harvest and store encrypted communications or steal datasets with the intent of decrypting them once quantum technology matures. If your encrypted data today could become a liability in 10 to 15 years, planning for a post-quantum future is essential. For this reason, we have already started working with some of the most innovative <a href="https://www.cloudflare.com/banking-and-financial-services/">banks</a>, ISPs, and <a href="https://www.cloudflare.com/public-sector/">governments</a> around the world as they begin their journeys to quantum safety. </p><p>The U.S. government is already addressing these risks. On January 16, 2025, the White House issued <a href="https://www.federalregister.gov/documents/2025/01/17/2025-01470/strengthening-and-promoting-innovation-in-the-nations-cybersecurity"><u>Executive Order 14144</u></a> on Strengthening and Promoting Innovation in the Nation’s Cybersecurity. This order requires government agencies to “<i>regularly update a list of product categories in which products that support post-quantum cryptography (PQC) are widely available…. Within 90 days of a product category being placed on the list … agencies shall take steps to include in any solicitations for products in that category a requirement that products support PQC.</i>”</p><p>At Cloudflare, we’ve been <a href="https://blog.cloudflare.com/the-tls-post-quantum-experiment/"><u>researching</u></a>, <a href="https://blog.cloudflare.com/securing-the-post-quantum-world/"><u>developing</u></a>, and <a href="https://www.ietf.org/archive/id/draft-kwiatkowski-tls-ecdhe-mlkem-02.html"><u>standardizing</u></a> post-quantum cryptography <a href="https://blog.cloudflare.com/tag/post-quantum/"><u>since 2017</u></a>. Our strategy is simple:</p><p><b>Simply tunnel your traffic through Cloudflare’s quantum-safe connections to immediately protect against harvest-now-decrypt-later attacks, without the burden of upgrading every cryptographic library yourself.</b></p><p>Let’s take a closer look at how the migration to post-quantum cryptography is taking shape at Cloudflare.</p>
    <div>
      <h3>A two-phase migration to post-quantum cryptography</h3>
      <a href="#a-two-phase-migration-to-post-quantum-cryptography">
        
      </a>
    </div>
    <p>At Cloudflare, we’ve largely focused on migrating the <a href="https://www.cloudflare.com/learning/ssl/transport-layer-security-tls/"><u>TLS (Transport Layer Security) 1.3</u></a> protocol to post-quantum cryptography.   TLS primarily secures the communications for web applications, but it is also widely used to secure email, messaging, <a href="https://blog.cloudflare.com/zero-trust-warp-with-a-masque/"><u>VPN connections</u></a>, <a href="https://www.cloudflare.com/learning/dns/dns-over-tls/"><u>DNS</u></a>, and many other protocols.  This makes TLS an ideal protocol to focus on when migrating to post-quantum cryptography.</p><p>The migration involves updating two critical components of TLS 1.3: <a href="https://www.cloudflare.com/learning/ssl/what-is-an-ssl-certificate/"><u>digital signatures used in certificates</u></a> and <a href="https://blog.cloudflare.com/post-quantum-key-encapsulation/"><u>key agreement mechanisms</u></a>. We’ve made significant progress on key agreement, but the migration to post-quantum digital signatures is still in its early stages.</p>
    <div>
      <h4>Phase 1: Migrating key agreement</h4>
      <a href="#phase-1-migrating-key-agreement">
        
      </a>
    </div>
    <p>Key agreement protocols enable two parties to securely establish a shared secret key that they can use to secure and encrypt their communications. Today, vendors have largely converged on transitioning TLS 1.3 to support a post-quantum key exchange protocol known as <a href="https://blog.cloudflare.com/nists-first-post-quantum-standards/"><u>ML-KEM</u></a> (Module-lattice based Key-Encapsulation Mechanism Standard). There are two main reasons for prioritizing migration of key agreement:</p><ul><li><p><b>Performance:</b> ML-KEM <a href="https://blog.cloudflare.com/pq-2024/"><u>performs</u></a> well with the <a href="https://www.cloudflare.com/learning/ssl/why-use-tls-1.3/">TLS 1.3 protocol,</a> even for short-lived network connections.</p></li><li><p><b>Security</b>: Conventional cryptography is vulnerable to “harvest now, decrypt later” attacks. In this threat model, an adversary intercepts and stores encrypted communications today and later (in the future) uses a quantum computer to derive the secret key, compromising the communication. As of March 2025, well over a third of the human web traffic reaching the Cloudflare network is protected against these attacks by TLS 1.3 with hybrid ML-KEM key exchange.</p></li></ul>
          <figure>
          <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/1Tgfy0HYHA5MM6JjaNP2Z1/b601d2938be3c52decf1f3cec7313c6e/image6.png" />
          </figure><p><sup><i>Post-quantum encrypted share of human HTTPS request traffic seen by Cloudflare per </i></sup><a href="https://radar.cloudflare.com/adoption-and-usage?dateRange=52w"><sup><i><u>Cloudflare Radar</u></i></sup></a><sup><i> from March 1, 2024 to March 1, 2025. (Captured on March 13, 2025.)</i></sup></p><p>Here’s how to check if your Chrome browser is using ML-KEM for key agreement when visiting a website: First, <a href="https://developer.chrome.com/docs/devtools/inspect-mode#:~:text=Open%20DevTools,The%20element's%20margin%2C%20in%20pixels."><u>Inspect the page</u></a>, then open the <a href="https://developer.chrome.com/docs/devtools/security"><u>Security tab</u></a>, and finally look for <a href="https://www.ietf.org/archive/id/draft-kwiatkowski-tls-ecdhe-mlkem-02.html"><u>X25519MLKEM768</u></a> as shown here:</p>
          <figure>
          <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/6EoD5jFMXJeWFeRtG9w6Uy/85aa13123d64f21ea93313f674d4378f/image1.png" />
          </figure><p>This indicates that your browser is using key-agreement protocol ML-KEM <i>in combination with</i> conventional <a href="https://blog.cloudflare.com/a-relatively-easy-to-understand-primer-on-elliptic-curve-cryptography/"><u>elliptic curve cryptography</u></a> on curve <a href="https://en.wikipedia.org/wiki/Curve25519"><u>X25519</u></a>. This provides the protection of the tried-and-true conventional cryptography (<a href="https://en.wikipedia.org/wiki/Curve25519"><u>X25519</u></a>) alongside the new post-quantum key agreement (<a href="https://blog.cloudflare.com/nists-first-post-quantum-standards/"><u>ML-KEM</u></a>).</p>
    <div>
      <h4>Phase 2: Migrating digital signatures</h4>
      <a href="#phase-2-migrating-digital-signatures">
        
      </a>
    </div>
    <p><a href="https://www.cloudflare.com/learning/ssl/what-is-an-ssl-certificate/"><u>Digital signatures are used in TLS certificates</u></a> to validate the authenticity of connections — allowing the client to be sure that it is really communicating with the server, and not with an adversary that is impersonating the server. </p><p>Post-quantum digital signatures, however, are significantly larger, and thus slower, than their current counterparts. This performance impact has slowed their adoption, particularly because they slow down short-lived TLS connections. </p><p>Fortunately, post-quantum signatures are not needed to prevent harvest-now-decrypt-later attacks. Instead, they primarily protect against attacks by an adversary that is actively using a quantum computer to tamper with a live TLS connection. We still have some time before quantum computers are able to do this, making the migration of digital signatures a lower priority.</p><p>Nevertheless, Cloudflare is actively <a href="https://datatracker.ietf.org/doc/draft-ietf-lamps-dilithium-certificates/07/"><u>involved in standardizing</u></a> post-quantum signatures for TLS certificates. We are also experimenting with their deployment on long-lived TLS connections and exploring <a href="https://datatracker.ietf.org/doc/draft-davidben-tls-merkle-tree-certs/"><u>new approaches</u></a> to achieve post-quantum authentication without sacrificing performance. Our goal is to ensure that post-quantum digital signatures are ready for widespread use when quantum computers are able to actively attack live TLS connections.</p>
    <div>
      <h3>Cloudflare Zero Trust + PQC: future-proofing security</h3>
      <a href="#cloudflare-zero-trust-pqc-future-proofing-security">
        
      </a>
    </div>
    <p>The Cloudflare Zero Trust platform replaces legacy corporate security perimeters with Cloudflare's global network, making access to the Internet and to corporate resources faster and safer for teams around the world. Today, we’re thrilled to announce that Cloudflare's Zero Trust platform protects your data from quantum threats as it travels over the public Internet.  There are three key quantum-safe use cases supported by our Zero Trust platform in this first phase of quantum readiness.</p>
    <div>
      <h4>Quantum-safe clientless Access</h4>
      <a href="#quantum-safe-clientless-access">
        
      </a>
    </div>
    <p><a href="https://developers.cloudflare.com/cloudflare-one/connections/connect-devices/agentless/"><u>Clientless</u></a> <a href="https://developers.cloudflare.com/cloudflare-one/applications/configure-apps/self-hosted-public-app/"><u>Cloudflare Access</u></a> now protects an organization’s Internet traffic to internal web applications against quantum threats, even if the applications themselves have not yet migrated to post-quantum cryptography. ("Clientless access" is a method of accessing network resources without installing a dedicated client application on the user's device. Instead, users connect and access information through a web browser.)</p>
          <figure>
          <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/5mKiboLMsIEuNt1MaXlWsy/dad0956066e97db69401757b18e8ce5f/image4.png" />
          </figure><p>Here’s how it works today:</p><ul><li><p><b>PQ connection via browser: </b>(Labeled (1) in the figure.)
As long as the user's web browser supports post-quantum key agreement, the connection from the device to Cloudflare's network is secured via TLS 1.3 with post-quantum key agreement.</p></li><li><p><b>PQ within Cloudflare’s global network: </b>(Labeled (2) in the figure) 
If the user and origin server are geographically distant, then the user’s traffic will enter Cloudflare’s global network in one geographic location (e.g. Frankfurt), and exit at another (e.g. San Francisco).  As this traffic moves from one datacenter to another inside Cloudflare’s global network, these hops through the network are secured via TLS 1.3 with post-quantum key agreement.<b> </b></p></li><li><p><b>PQ Cloudflare Tunnel: </b>(Labeled (3) in the figure)
Customers establish a Cloudflare Tunnel from their datacenter or public cloud — where their corporate web application is hosted — to Cloudflare's network. This tunnel is secured using TLS 1.3 with post-quantum key agreement, safeguarding it from harvest-now-decrypt-later attacks.</p></li></ul><p>Putting it together, clientless Access provides <b>end-to-end</b> quantum safety for accessing corporate HTTPS applications, without requiring customers to upgrade the security of corporate web applications.</p>
    <div>
      <h4>Quantum-safe Zero Trust with Cloudflare’s WARP Client-to-Tunnel configuration (as a VPN replacement)</h4>
      <a href="#quantum-safe-zero-trust-with-cloudflares-warp-client-to-tunnel-configuration-as-a-vpn-replacement">
        
      </a>
    </div>
    <p>By mid-2025, organizations will be able to protect <b>any protocol</b>, not just HTTPS, by tunneling it through Cloudflare's Zero Trust platform with post quantum cryptography, thus providing quantum safety as traffic travels across the Internet from the end-user’s device to the corporate office/data center/cloud environment.</p><p>Cloudflare’s Zero Trust platform is ideal for replacing traditional VPNs, and enabling <a href="https://www.cloudflare.com/learning/security/glossary/what-is-zero-trust/"><u>Zero Trust architectures</u></a> with modern authentication and authorization polices.  Cloudflare’s WARP client-to-tunnel is a popular network configuration for our Zero Trust platform: organizations deploy Cloudflare’s <a href="https://developers.cloudflare.com/cloudflare-one/connections/connect-devices/warp/"><u>WARP device client</u></a> on their end users’ devices, and then use <a href="https://developers.cloudflare.com/cloudflare-one/connections/connect-networks/"><u>Cloudflare Tunnel</u></a> to connect to their corporate office, cloud, or data center environments.   </p>
          <figure>
          <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/5xovIIyVOO32xrXBs0ZFcf/110928926b86f12777f16518b1313875/image3.png" />
          </figure><p> Here are the details:  </p><ul><li><p><b>PQ connection via WARP client (coming in mid-2025): </b>(Labeled (1) in the figure)
The WARP client uses the <a href="https://blog.cloudflare.com/zero-trust-warp-with-a-masque/"><u>MASQUE protocol</u></a> to connect from the device to Cloudflare’s global network. We are working to add support for establishing this MASQUE connection with TLS 1.3 with post-quantum key agreement, with a target completion date of mid-2025.  </p></li><li><p><b>PQ within Cloudflare’s global network:  </b>(Labeled (2) in the figure) 
As traffic moves from one datacenter to another inside Cloudflare’s global network, each hop it takes through Cloudflare’s network is already secured with TLS 1.3 with post-quantum key agreement.</p></li><li><p><b>PQ Cloudflare Tunnel: </b>(Labeled (3) in the figure)
As mentioned above, <a href="https://developers.cloudflare.com/cloudflare-one/connections/connect-networks/"><u>Cloudflare Tunnel</u></a> already supports post-quantum key agreement. </p></li></ul><p>Once the upcoming post-quantum enhancements to the WARP device client are complete, customers can encapsulate their traffic in quantum-safe tunnels, effectively mitigating the risk of harvest-now-decrypt-later attacks without any heavy lifting to individually upgrade their networks or applications.  And this provides comprehensive protection for any protocol that can be sent through these tunnels, not just for HTTPS!</p>
    <div>
      <h4>Quantum-safe SWG (end-to-end PQC for access to third-party web applications)</h4>
      <a href="#quantum-safe-swg-end-to-end-pqc-for-access-to-third-party-web-applications">
        
      </a>
    </div>
    <p>A <a href="https://developers.cloudflare.com/cloudflare-one/policies/gateway/http-policies/"><u>Secure Web Gateway</u></a> (SWG) is used to secure access to third-party websites on the public Internet by intercepting and inspecting TLS traffic. </p><p>Cloudflare Gateway is now a quantum-safe SWG for HTTPS traffic. As long as the third-party website that is being inspected supports post-quantum key agreement, then Cloudflare’s SWG also supports post-quantum key agreement. This holds regardless of the onramp that the customer uses to get to Cloudflare's network (i.e. <a href="https://developers.cloudflare.com/cloudflare-one/connections/connect-devices/agentless/"><u>web browser</u></a>, <a href="https://developers.cloudflare.com/cloudflare-one/connections/connect-devices/warp/"><u>WARP device client</u></a>, <a href="https://developers.cloudflare.com/cloudflare-one/connections/connect-networks/private-net/warp-connector/"><u>WARP Connector</u></a>, <a href="https://developers.cloudflare.com/magic-wan/"><u>Magic WAN</u></a>), and only requires the use of a browser that supports post-quantum key agreement.</p>
          <figure>
          <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/6vnkEFkvKbhSAxp33GmRk7/c58d00a14767a03b2422af1c48a53ba9/image5.png" />
          </figure><p>Cloudflare Gateway's HTTPS SWG feature involves two post-quantum TLS connections, as follows:</p><ul><li><p><b>PQ connection via browser: </b>(Labeled (1) in the figure)  
A TLS connection is initiated from the user's browser to a data center in Cloudflare's network that performs the TLS inspection. As long as the user's web browser supports post-quantum key agreement, this connection is secured by TLS 1.3 with post-quantum key agreement.  </p></li><li><p><b>PQ connection to the origin server: </b>(Labeled (2) in the figure)  
A TLS connection is initiated from a datacenter in Cloudflare's network to the origin server, which is typically controlled by a third party. The connection from Cloudflare’s SWG currently supports post-quantum key agreement, as long as the third party’s origin server also already supports post-quantum key agreement.  You can test this out today by using <a href="https://pq.cloudflareresearch.com/"><u>https://pq.cloudflareresearch.com/</u></a> as your third-party origin server. </p></li></ul><p>Put together, Cloudflare’s SWG is quantum-ready to support secure access to any third-party website that is quantum ready today or in the future. And this is true regardless of the onramp used to get end users' traffic into Cloudflare's global network!</p>
    <div>
      <h3>The post-quantum future: Cloudflare’s Zero Trust platform leads the way</h3>
      <a href="#the-post-quantum-future-cloudflares-zero-trust-platform-leads-the-way">
        
      </a>
    </div>
    <p>Protecting our customers from emerging quantum threats isn't just a priority — it's our responsibility. Since 2017, Cloudflare has been pioneering post-quantum cryptography through research, standardization, and strategic implementation across our product ecosystem.</p><p><b>Today marks a milestone: </b>We're launching the first phase of quantum-safe protection for our Zero Trust platform. Quantum-safe clientless Access and Secure Web Gateway are available immediately, with WARP client-to-tunnel network configurations coming by mid-2025. As we continue to advance the state of the art in post-quantum cryptography, our commitment to continuous innovation ensures that your organization stays ahead of tomorrow's threats.  Let us worry about crypto-agility so that you don’t have to.</p><p>To learn more about how Cloudflare’s built-in crypto-agility can future-proof your business, visit our <a href="http://cloudflare.com/pqc"><u>Post-Quantum Cryptography</u></a> webpage.</p>
    <div>
      <h3>Watch on Cloudflare TV</h3>
      <a href="#watch-on-cloudflare-tv">
        
      </a>
    </div>
    <div>
  
</div><p></p> ]]></content:encoded>
            <category><![CDATA[Security Week]]></category>
            <category><![CDATA[Post-Quantum]]></category>
            <category><![CDATA[Zero Trust]]></category>
            <category><![CDATA[Cloudflare Gateway]]></category>
            <category><![CDATA[Cloudflare Access]]></category>
            <category><![CDATA[Clientless]]></category>
            <category><![CDATA[Cloudflare Tunnel]]></category>
            <category><![CDATA[Cryptography]]></category>
            <category><![CDATA[Research]]></category>
            <guid isPermaLink="false">18HFPrh07hn9Zqp8kaonRp</guid>
            <dc:creator>Sharon Goldberg</dc:creator>
            <dc:creator>Wesley Evans</dc:creator>
            <dc:creator>Bas Westerbaan</dc:creator>
            <dc:creator>John Engates</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[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[The state of the post-quantum Internet]]></title>
            <link>https://blog.cloudflare.com/pq-2024/</link>
            <pubDate>Tue, 05 Mar 2024 14:00:24 GMT</pubDate>
            <description><![CDATA[ Nearly 2% of all TLS 1.3 connections established with Cloudflare are secured with post-quantum cryptography. What once was the topic of futuristic tech demos will soon be the new security baseline. ]]></description>
            <content:encoded><![CDATA[ <p></p><p>Today, nearly <b>two percent</b> of all TLS 1.3 connections established with Cloudflare are secured with <a href="https://www.cloudflare.com/learning/ssl/quantum/what-is-post-quantum-cryptography/"><b>post-quantum cryptography</b></a><b>.</b> We expect to see double-digit adoption by the end of 2024. Apple <a href="https://security.apple.com/blog/imessage-pq3/">announced</a> in February 2024 that it will secure iMessage with post-quantum cryptography before the end of the year, and <a href="https://signal.org/">Signal</a> chats are <a href="https://signal.org/blog/pqxdh/">already secured</a>. What once was the topic of futuristic tech demos will soon be the new security baseline for the Internet.</p><p>A lot has been happening in the field over the last few years, from mundane name changes (ML-KEM is the new name for Kyber), to new proposed algorithms in the <a href="https://csrc.nist.gov/projects/pqc-dig-sig">signatures onramp</a>, to the catastrophic <a href="https://eprint.iacr.org/2022/975.pdf">attack on SIKE</a>. Plenty that has been written merely three years ago now feels quite out of date. Thus, it is high time for an update: in this blog post we’ll take measure of where we are now in early 2024, what to expect for the coming years, and what you can do today.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/rJBlfZsFpgggNh7HoiSC7/9016d555b9e30dfe492db6cba85d31b3/graph.png" />
            
            </figure><p>Fraction of TLS 1.3 connections established with Cloudflare that are secured with post-quantum cryptography.</p>
    <div>
      <h2>The quantum threat</h2>
      <a href="#the-quantum-threat">
        
      </a>
    </div>
    <p>First things first: why are we migrating our cryptography? It’s because of <b>quantum computers</b>. <a href="https://www.cloudflare.com/learning/ssl/quantum/what-is-quantum-computing/">These marvelous devices</a>, instead of restricting themselves to zeroes and ones, compute using more of what nature actually affords us: quantum superposition, interference, and entanglement. This allows quantum computers to excel at certain very specific computations, notably simulating nature itself, which will be very helpful in developing new materials.</p><p>Quantum computers are not going to replace regular computers, though: they’re actually much worse than regular computers at most tasks. Think of them as graphic cards — specialized devices for specific computations.</p><p>Unfortunately, quantum computers also <a href="/the-quantum-menace">excel</a> at breaking key cryptography that’s in common use today. Thus, we will have to move to <b>post-quantum cryptography</b>: cryptography designed to be resistant against quantum attack. We’ll discuss the exact impact on the different types of cryptography later on. For now quantum computers are rather anemic: they’re simply not good enough today to crack any real-world cryptographic keys.</p><p>That doesn’t mean we shouldn’t worry yet: encrypted traffic can be <a href="https://en.wikipedia.org/wiki/Harvest_now,_decrypt_later">harvested today</a>, and decrypted with a quantum computer in the future.</p>
    <div>
      <h3>Quantum numerology</h3>
      <a href="#quantum-numerology">
        
      </a>
    </div>
    <p>When will they be good enough? Like clockwork, every year there are news stories of new quantum computers with record-breaking number of qubits. This focus on counting qubits is quite misleading. To start, quantum computers are analogue machines, and there is always some noise interfering with the computation.</p><p>There are big differences between the different types of technology used to build quantum computers: silicon-based quantum computers seem to scale well, are quick to execute instructions, but have very noisy qubits. This does not mean they’re useless: with <a href="https://en.wikipedia.org/wiki/Quantum_error_correction">quantum error correcting codes</a> one can effectively turn tens of millions of noisy silicon qubits into a few thousand high-fidelity ones, which could be enough to <a href="https://quantum-journal.org/papers/q-2021-04-15-433/">break RSA</a>. Trapped-ion quantum computers, on the other hand, have much less noise, but have been harder to scale. Only a few hundred-thousand trapped-ion qubits could potentially draw the curtain on RSA.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/2O3l7xYEj4myLC4C9NLuDC/4e49bc0d454bc5ffb8d3a4a5e4aa3300/Screenshot-2024-03-05-at-11.53.49.png" />
            
            </figure><p>State-of-art in quantum computing measured by qubit count and noise in <a href="https://sam-jaques.appspot.com/quantum_landscape">2021</a>, <a href="https://sam-jaques.appspot.com/quantum_landscape_2022">2022</a>, and <a href="https://sam-jaques.appspot.com/quantum_landscape_2023">2023</a>. Once the shaded gray area hits the left-most red line, we’re in trouble. Red line is expected to move to the left. Compiled by <a href="https://sam-jaques.appspot.com/">Samuel Jaques</a> of the University of Waterloo.</p><p>We’re only scratching the surface with the number of qubits and noise. For instance, a quirk of many quantum computers is that only adjacent qubits can interact — something that most estimates do not take into account. On the other hand, for a specific quantum computer, a tailored algorithm can perform much better than a generic one. We can only guess what a future quantum computer will look like, and today’s estimates are most likely off by at least an order of magnitude.</p>
    <div>
      <h3>When will quantum computers break real-world cryptography?</h3>
      <a href="#when-will-quantum-computers-break-real-world-cryptography">
        
      </a>
    </div>
    <p>So, when do we expect the demise of RSA-2048 which is in common use today? In a 2022 <a href="https://globalriskinstitute.org/publication/2022-quantum-threat-timeline-report/">survey</a>, over half the interviewed experts thought it’d be more probable than not that by 2037 such a <i>cryptographically relevant</i> quantum computer would’ve been built.</p><p>We can also look at the US government’s timeline for the migration to post-quantum cryptography. The National Security Agency (NSA) aims to finish its migration before <a href="https://media.defense.gov/2022/Sep/07/2003071834/-1/-1/0/CSA_CNSA_2.0_ALGORITHMS_.PDF">2033</a>, and will start to prefer post-quantum ready vendors for many products in 2025. The US government has a similarly ambitious timeline for the country as a whole: the aim is to be done <a href="https://www.whitehouse.gov/briefing-room/statements-releases/2022/05/04/national-security-memorandum-on-promoting-united-states-leadership-in-quantum-computing-while-mitigating-risks-to-vulnerable-cryptographic-systems/">by 2035</a>.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/50GUlzarTvWmpbkxZtourY/add63399c2f3804a98dc184f0fd8e9db/image7.png" />
            
            </figure><p><a href="https://media.defense.gov/2022/Sep/07/2003071834/-1/-1/0/CSA_CNSA_2.0_ALGORITHMS_.PDF">NSA timeline</a> for migrating third-party software to post-quantum cryptography.</p><p>More anecdotally, at industry conferences on the post-quantum migration, I see particularly high participation of the automotive branch. Not that surprising, considering that the median age of a car on the road is 14 years, a lot of money is on the line, and not all cryptography used in cars can be upgraded easily once on the road.</p><p>So when will it arrive? Whether it’s 2034 or 2050, it will be <b>too soon</b>. The immense success of cryptography means it’s all around us now, from dishwasher, to pacemaker, to satellite. Most upgrades will be easy, and fit naturally in the product’s lifecycle, but there will be a long tail of difficult and costly upgrades.</p>
    <div>
      <h3>Two migrations</h3>
      <a href="#two-migrations">
        
      </a>
    </div>
    <p>To help prioritize, it is important to understand that there is a big difference in the difficulty, impact, and urgency of the post-quantum migration for the different kinds of cryptography required to create secure connections. In fact, for most organizations there will be two post-quantum migrations: <b>key agreement</b> and <b>signatures / certificates</b>.</p><p><b>Already post-quantum secure: symmetric cryptography</b></p><p>Let’s explain this for the case of creating a secure connection when visiting a website in a browser. The workhorse is a <b>symmetric cipher</b> such as AES-GCM. It’s what you would think of when thinking of cryptography: both parties, in this case the browser and server, have a shared key, and they encrypt / decrypt their messages with the same key. Unless you have that key, you can’t read anything, or modify anything.</p><p>The good news is that symmetric ciphers, such as <a href="/go-crypto-bridging-the-performance-gap/">AES-GCM</a>, are already post-quantum secure. There is a common misconception that <a href="https://en.wikipedia.org/wiki/Grover%27s_algorithm">Grover’s quantum algorithm</a> requires us to double the length of symmetric keys. On closer inspection of the algorithm, it’s clear that it is <a href="/nist-post-quantum-surprise#grover-s-algorithm">not practical</a>. The way <a href="https://www.nist.gov/">NIST</a>, the US National Institute for Standards and Technology (who have been spearheading the standardization of post-quantum cryptography) defines their post-quantum security levels is very telling. They define a specific security level by saying the scheme should be as hard to crack using either a classical or quantum computer as an existing symmetric cipher as follows:</p>
<table>
<thead>
  <tr>
    <th><span>Level</span></th>
    <th><span>Definition,</span><span> as least as hard to break as … </span></th>
    <th><span>Example</span></th>
  </tr>
</thead>
<tbody>
  <tr>
    <td><span>1</span></td>
    <td><span>To recover the key of </span><span>AES-128</span><span> by exhaustive search</span></td>
    <td><span>ML-KEM-512, SLH-DSA-128s</span></td>
  </tr>
  <tr>
    <td><span>2</span></td>
    <td><span>To find a collision in </span><span>SHA256</span><span> by exhaustive search</span></td>
    <td><span>ML-DSA-44</span></td>
  </tr>
  <tr>
    <td><span>3</span></td>
    <td><span>To recover the key of </span><span>AES-192</span><span> by exhaustive search</span></td>
    <td><span>ML-KEM-768</span></td>
  </tr>
  <tr>
    <td><span>4</span></td>
    <td><span>To find a collision in </span><span>SHA384</span><span> by exhaustive search</span></td>
    <td></td>
  </tr>
  <tr>
    <td><span>5</span></td>
    <td><span>To recover the key of </span><span>AES-256</span><span> by exhaustive search</span></td>
    <td><span>ML-KEM-1024, SLH-DSA-256s</span></td>
  </tr>
</tbody>
</table><p>NIST PQC security levels, higher is harder to break (“more secure”). The examples ML-DSA, SLH-DSA and ML-KEM are covered below.</p><p>There are good intentions behind suggesting doubling the key lengths of symmetric cryptography. In many use cases, the extra cost is not that high, and it mitigates any theoretical risk completely. Scaling symmetric cryptography is cheap: double the bits is typically far less than half the cost. So on the surface, it is simple advice.</p><p>But if we insist on AES-256, it seems only logical to insist on NIST PQC level 5 for the public key cryptography as well. The problem is that public key cryptography does not scale very well. Depending on the scheme, going from level 1 to level 5 typically more than doubles data usage and CPU cost. As we’ll see, deploying post-quantum signatures at level 1 is already painful, and deploying them at level 5 is problematic.</p><p>A second reason is that upgrading symmetric cryptography isn’t always easy. If it requires replacing hardware, it can be costly indeed. An organization that cannot migrate all its cryptography in time simply can’t afford to waste its time doubling symmetric key lengths.</p><p><b>First migration: key agreement</b></p><p>Symmetric ciphers are not enough on their own: how do I know which key to use when visiting a website for the first time? The browser can’t just send a random key, as everyone listening in would see that key as well. You’d think it’s impossible, but there is some clever math to solve this, so that the browser and server can agree on a shared key. Such a scheme is called a <b>key agreement</b> mechanism, and is performed in the TLS <a href="https://www.cloudflare.com/learning/ssl/what-happens-in-a-tls-handshake/">handshake</a>. Today almost all traffic is secured with <a href="https://en.wikipedia.org/wiki/Curve25519">X25519</a>, a Diffie–Hellman-style key agreement, but its security is completely broken by <a href="https://en.wikipedia.org/wiki/Shor%27s_algorithm">Shor’s algorithm</a> on a quantum computer. Thus, any communication secured today with Diffie–Hellman, when stored, can be decrypted in the future by a quantum computer.</p><p>This makes it <b>urgent</b> to upgrade key agreement today. As we will see, luckily, post-quantum key agreement is relatively straight-forward to deploy.</p><p><b>Second migration: signatures / certificates</b></p><p>The key agreement allows secure agreement on a key, but there is a big gap: we do not know <i>with whom</i> we agreed on the key. If we only do key agreement, an attacker in the middle can do separate key agreements with the browser and server, and re-encrypt any exchanged messages. To prevent this we need one final ingredient: authentication.</p><p>This is achieved using <b>signatures</b>. When visiting a website, say <a href="https://cloudflare.com">cloudflare.com</a>, the web server presents a <b>certificate</b> signed by a <a href="https://en.wikipedia.org/wiki/Certificate_authority">certification authority</a> (CA) that vouches that the public key in that certificate is controlled by <a href="https://cloudflare.com">cloudflare.com</a>. In turn, the web server signs the handshake and shared key using the private key corresponding to the public key in the certificate. This allows the client to be sure that they’ve done a key agreement with <a href="https://cloudflare.com">cloudflare.com</a>.</p><p>RSA and <a href="https://www.cloudflare.com/learning/dns/dnssec/ecdsa-and-dnssec/">ECDSA</a> are commonly used traditional signature schemes. Again, Shor’s algorithm makes short work of them, allowing a quantum attacker to forge any signature. That means that a <a href="https://en.wikipedia.org/wiki/Man-in-the-middle_attack">MitM</a> (man-in-the-middle) can break into any connection that uses a signature scheme that is not post-quantum secure. This is of course an active attack: if the attacker isn’t in the middle as the handshake happens, the connection is not affected.</p><p>This makes upgrading signature schemes for TLS on the face of it less urgent, as we only need to have everyone migrated by the time the cryptographically-relevant quantum computer arrives. Unfortunately, we will see that migration to post-quantum signatures is much <b>more difficult</b>, and will require more time.</p>
    <div>
      <h2>Timeline</h2>
      <a href="#timeline">
        
      </a>
    </div>
    <p>Before we dive into the technical challenges of migrating the Internet to post-quantum cryptography, let’s have a look at how we got here, and what to expect in the coming years. Let’s start with how post-quantum cryptography came to be.</p>
    <div>
      <h3>Origin of post-quantum cryptography</h3>
      <a href="#origin-of-post-quantum-cryptography">
        
      </a>
    </div>
    <p>Physicists Feynman and Manin independently proposed quantum computers <a href="https://plato.stanford.edu/entries/qt-quantcomp/">around 1980</a>. It took another 14 years before Shor published <a href="https://ieeexplore.ieee.org/abstract/document/365700">his algorithm</a> attacking public key cryptography. Most post-quantum cryptography predates Shor’s famous algorithm.</p><p>There are various branches of post-quantum cryptography, of which the most prominent are lattice-based, hash-based, multivariate, code-based, and isogeny-based. Except for isogeny-based cryptography, none of these were initially conceived as post-quantum cryptography. In fact, early code-based and hash-based schemes are contemporaries of RSA, being proposed in the 1970s, and comfortably predate the publication of Shor’s algorithm in 1994. Also, the first multivariate scheme from 1988 is comfortably older than Shor’s algorithm. It is a nice coincidence that the most successful branch, lattice-based cryptography, is Shor’s closest contemporary, being proposed <a href="https://dl.acm.org/doi/pdf/10.1145/237814.237838">in 1996</a>. For comparison, elliptic curve cryptography, which is widely used today, was first proposed in 1985.</p><p>In the years after the publication of Shor’s algorithm, cryptographers took measure of the existing cryptography: what’s clearly broken, and what could be post-quantum secure? In 2006, the first annual <a href="https://postquantum.cr.yp.to/">International Workshop on Post-Quantum Cryptography</a> took place. From that conference, an introductory text <a href="https://www.researchgate.net/profile/Nicolas-Sendrier-2/publication/226115302_Code-Based_Cryptography/links/540d62d50cf2df04e7549388/Code-Based-Cryptography.pdf">was prepared</a>, which holds up rather well as an introduction to the field. A notable caveat is the <a href="https://eprint.iacr.org/2022/214.pdf">demise</a> of the <a href="https://www.pqcrainbow.org/">Rainbow</a> signature scheme. In that same year, the elliptic-curve key-agreement X25519 <a href="https://cr.yp.to/ecdh/curve25519-20060209.pdf">was proposed</a>, which now secures the vast majority of all Internet connections.</p>
    <div>
      <h3>NIST PQC competition</h3>
      <a href="#nist-pqc-competition">
        
      </a>
    </div>
    <p>Ten years later, in 2016, <a href="https://nist.gov">NIST</a>, the US National Institute of Standards and Technology, <a href="https://csrc.nist.gov/CSRC/media/Projects/Post-Quantum-Cryptography/documents/call-for-proposals-final-dec-2016.pdf">launched a public competition</a> to standardize post-quantum cryptography. They’re using a similar open format as was used to standardize <a href="https://en.wikipedia.org/wiki/Advanced_Encryption_Standard">AES</a> in 2001, and <a href="https://en.wikipedia.org/wiki/NIST_hash_function_competition">SHA3</a> in 2012. Anyone can participate by submitting schemes and evaluating the proposals. Cryptographers from all over the world submitted algorithms. To focus attention, the list of submissions were whittled down over three rounds. From the original 82, based on public feedback, eight made it into the final round. From those eight, in 2022, NIST chose to <a href="/nist-post-quantum-surprise">pick four to standardize first</a>: one <b>KEM</b> (for key agreement) and three signature schemes.</p>
<table>
<thead>
  <tr>
    <th><span>Old name</span></th>
    <th><span>New name</span></th>
    <th><span>Branch</span></th>
  </tr>
</thead>
<tbody>
  <tr>
    <td><span>Kyber</span></td>
    <td><span>ML-KEM</span><span> (FIPS 203)<br />Module-lattice based Key-Encapsulation Mechanism Standard</span></td>
    <td><span>Lattice-based</span></td>
  </tr>
  <tr>
    <td><span>Dilithium</span></td>
    <td><span>ML-DSA </span><span>(FIPS 204)<br /></span><span>Module-lattice based Digital Signature Standard</span></td>
    <td><span>Lattice-based</span></td>
  </tr>
  <tr>
    <td><span>SPHINCS</span><sup>+</sup></td>
    <td><span>SLH-DSA</span><span> (FIPS 205)<br /></span><span>Stateless Hash-Based Digital Signature Standard</span></td>
    <td><span>Hash-based</span></td>
  </tr>
  <tr>
    <td><span>Falcon</span></td>
    <td><span>FN-DSA<br /></span><span>FFT over NTRU lattices Digital Signature Standard</span></td>
    <td><span>Lattice-based</span></td>
  </tr>
</tbody>
</table><p>First four selected post-quantum algorithms from NIST competition.</p><p>ML-KEM is the only post-quantum key agreement close to standardization now, and despite some occasional difficulty with its larger key sizes, in many cases it allows for a drop-in upgrade.</p><p>The situation is rather different with the signatures: it’s quite telling that NIST chose to standardize three already. And there are even more signatures set to be standardized in the future. The reason is that none of the proposed signatures are close to ideal. In short, they all have much larger keys and signatures than we’re used to. From a security standpoint SLH-DSA is the most conservative choice, but also the worst performer. For public key and signature sizes, FN-DSA is the best of the worst, but is difficult to implement safely because of floating-point arithmetic. This leaves ML-DSA as the default pick. More in depth comparisons are included below.</p><p><b>Name changes</b></p><p>Undoubtedly Kyber is the most familiar name, as it’s a preliminary version of Kyber that has already been deployed by <a href="https://blog.chromium.org/2023/08/protecting-chrome-traffic-with-hybrid.html">Chrome</a> and <a href="/post-quantum-for-all">Cloudflare</a> among others to counter store-now/decrypt-later. We will have to adjust, though. Just like Rijndael is most well-known as AES, and Keccak is SHA3 to most, ML-KEM is set to become the catchy new moniker for Kyber going forward.</p><p><b>Final standards</b></p><p>Although we know NIST will standardize these four, we’re not quite there yet. In August 2023, NIST released <a href="https://csrc.nist.gov/News/2023/three-draft-fips-for-post-quantum-cryptography">three draft standards</a> for the first three with minor changes, and solicited public feedback. FN-DSA is delayed for now, as it’s more difficult to standardize and deploy securely.</p><p>For timely adopters, it’s important to be aware that based on the feedback on the first three drafts, there might be a few small tweaks before the final standards are released. These changes will be minor, but the final versions could well be incompatible on the wire with the current draft standards. These changes are mostly immaterial, only requiring a small update, and do not meaningfully affect the brunt of work required for the migration, including organizational engagement, inventory, and testing. Before shipping, there can be good reasons to wait for the final standards: support for preliminary versions is not widespread, and it might be costly to support both the draft and final standards. Still, many organizations have not started work on the post-quantum migration at all, citing the lack of standards — a situation that has been called <a href="https://www.youtube.com/watch?v=RbwwxZSBjyo&amp;t=1468s">crypto procrastination</a>.</p><p>So, when can we expect the final standards? There is no set timeline, but we expect the first three standards to be out around <b>mid-2024</b>.</p><p><b>Predicting protocol and software support</b></p><p>Having NIST’s final standards is not enough. The next step is to standardize the way the new algorithms are used in higher level protocols. In many cases, such as key agreement in TLS, this is as simple as assigning an identifier to the new algorithms. In other cases, such as <a href="https://www.cloudflare.com/dns/dnssec/how-dnssec-works/">DNSSEC</a>, it requires a bit more thought. Many working groups at the <a href="https://www.ietf.org/">IETF</a> have been preparing for years for the arrival of NIST’s final standards, and I expect that many protocol integrations will be available before the end of 2024. For the moment, let’s focus on <a href="https://www.cloudflare.com/learning/ssl/transport-layer-security-tls/">TLS</a>.</p><p>The next step is software support. Not all ecosystems can move at the same speed, but we have seen a lot of preparation already. We expect several major open ecosystems to have post-quantum cryptography and TLS support available early 2025, if not earlier.</p><p>Again, for TLS there is a big difference again between key agreement and signatures. For key agreement, the server and client can add and enable support for post-quantum key agreement independently. Once enabled on both sides, TLS negotiation will use post-quantum key agreement. We go into detail on <a href="/post-quantum-for-all">TLS negotiation</a> in this blog post. If your product just uses TLS, your store-now/decrypt-now problem could be solved by a simple software update of the TLS library.</p><p>Post-quantum <a href="https://www.cloudflare.com/application-services/products/ssl/">TLS certificates</a> are more of a hassle. Unless you control both ends, you’ll need to install two certificates: one post-quantum certificate for the new clients, and a traditional one for the old clients. If you aren’t using <a href="https://www.cloudflare.com/application-services/solutions/certificate-lifecycle-management/">automated issuance of certificates</a> yet, this might be a good reason to <a href="https://letsencrypt.org/docs/client-options/">check that out</a>. TLS allows the client to signal which signature schemes it supports so that the server can choose to serve a post-quantum certificate only to those clients that support it. Unfortunately, although almost all TLS libraries support setting up multiple certificates, not all servers expose that configuration. If they do, it will still require a configuration change in most cases. (Although undoubtedly <a href="https://caddyserver.com/">caddy</a> will do it for you.)</p><p>Talking about post-quantum certificates: it will take some time before Certification Authorities (CAs) can issue them. Their <a href="https://csrc.nist.gov/glossary/term/hardware_security_module_hsm">HSMs</a> will first need (hardware) support, which then will need to be audited. Also, the <a href="https://cabforum.org/">CA/Browser forum</a> needs to approve the use of the new algorithms. Of these, the audits are likely to be the bottleneck, as there will be a lot of submissions after the publication of the NIST standards. It’s unlikely we will see a post-quantum certificate issued by a CA before 2026.</p><p>This means that it is not unlikely that come 2026, we are in an interesting in-between time, where almost all Internet traffic is protected by post-quantum key agreement, but not a single public post-quantum certificate is used.</p>
    <div>
      <h3>More post-quantum standards</h3>
      <a href="#more-post-quantum-standards">
        
      </a>
    </div>
    <p>NIST is not quite done standardizing post-quantum cryptography. There are two more post-quantum competitions running: <b>round 4</b> and the <b>signatures onramp</b>.</p><p><b>Round 4</b></p><p>From the post-quantum competition, NIST is still considering standardizing one or more of the code-based key agreements <a href="https://bikesuite.org/">BIKE</a>, <a href="https://pqc-hqc.org/">HQC</a>, <a href="https://classic.mceliece.org/">Classic McEliece</a> in a fourth round. The performance of BIKE and HQC, both in key sizes and computational efficiency, is much worse than ML-KEM. NIST is considering standardizing one as a <b>backup KEM</b>, in case there is a cryptanalytic breakthrough against lattice-based cryptography, such as ML-KEM.</p><p>Classic McEliece does not compete with ML-KEM directly as a general purpose KEM. Instead, it’s a specialist: Classic McEliece public keys are very large (268kB), but it has (for a post-quantum KEM) very small ciphertexts (128 bytes). This makes Classic McEliece very attractive for use cases where the public key can be distributed in advance, such as to secure a software update mechanism.</p><p><b>Signatures onramp</b></p><p>In late 2022, after announcing the first four picks, NIST also called a new competition, dubbed the <i>signatures onramp</i>, to find <a href="https://csrc.nist.gov/projects/pqc-dig-sig">additional signature schemes</a>. The competition has two goals. The first is hedging against cryptanalytic breakthroughs against lattice-based cryptography. NIST would like to standardize a signature that performs better than SLH-DSA, but is not based on lattices. Secondly, they’re looking for a signature scheme that might do well in use cases where the current roster doesn’t do well: we will discuss those at length later on in this post.</p><p>In July 2023, NIST posted the <a href="https://csrc.nist.gov/news/2023/additional-pqc-digital-signature-candidates">40 submissions</a> they received for a first round of public review. The cryptographic community got to work, and as is quite normal for a first round, at the time of writing (February 2024) have managed to break 10 submissions completely, and weaken a couple of others drastically. Thom Wiggers maintains a useful <a href="https://pqshield.github.io/nist-sigs-zoo/">website comparing the submissions</a>.</p><p>There are some very promising submissions. We will touch briefly upon them later on. It is worth mentioning that just like the main post-quantum competition, the selection process will take many years. It is unlikely that any of these onramp signature schemes will be standardized before 2027 — if they’re not broken in the first place.</p><p>Before we dive into the nitty-gritty of migrating the Internet to post-quantum cryptography, it’s instructive to look back at some past migrations.</p>
    <div>
      <h2>Looking back: migrating to TLS 1.3</h2>
      <a href="#looking-back-migrating-to-tls-1-3">
        
      </a>
    </div>
    <p>One of the big recent migrations on the Internet was <a href="https://www.cloudflare.com/learning/ssl/why-use-tls-1.3/">the switch from TLS 1.2 to TLS 1.3</a>. Work on the new protocol started around 2014. The goal was ambitious: to start anew, cut a lot of cruft, and have a performant clean transport protocol of the future. After a few years of hard work, the protocol was ready for field tests. In good spirits, in September 2016, we announced <a href="/introducing-tls-1-3">that we support TLS 1.3</a>.</p><p>The followup blog in December 2017 had a rather different tone: “<a href="/why-tls-1-3-isnt-in-browsers-yet">Why TLS 1.3 isn’t in browsers yet</a>”.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/15iyL3KO6ap7JYKFyNcyeP/9ea326e694601026cebcbbe889485683/image3-7.png" />
            
            </figure><p>Adoption of TLS 1.3 in December 2017: less than 0.06%.</p><p>It turned out that <a href="https://datatracker.ietf.org/doc/html/draft-ietf-tls-tls13-11">revision 11</a> of TLS 1.3 was completely undeployable in practice, breaking a few percent of all users. The reason? <a href="https://en.wikipedia.org/wiki/Protocol_ossification">Protocol ossification</a>. TLS was designed with flexibility in mind: the client sends a list of TLS versions it supports, so that the connection can be smoothly upgraded to the newest crypto. That’s the theory, but if you never move the joint, it rusts: for one, it turned out that a lot of server software and middleware simply crashed on just seeing an unknown version. Others would ignore the version number completely, and try to parse the messages as if it was TLS 1.2 anyway. In practice, the version negotiation turned out to be completely broken. So how was this fixed?</p><p>In <a href="https://datatracker.ietf.org/doc/html/draft-ietf-tls-tls13-22">revision 22</a> of the TLS 1.3 draft, changes were made to make TLS 1.3 look like TLS 1.2 on the wire: in particular TLS 1.3 advertises itself as TLS 1.2 with the normal version negotiation. Also, a lot of unnecessary fields are included in the TLS 1.3 ClientHello just to appease any broken middleboxes that might be peeking in.  A server that doesn’t understand TLS 1.3 wouldn’t even see that an attempt was made to negotiate TLS 1.3. Using a sneaky new extension, a second version negotiation mechanism was added. For the details, check out the December 2017 blog post linked above.</p><p>Today TLS 1.3 is a huge success, and is used by more than 93% of the connections.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/6hsRBAdJf6bdmg1w0i9JXh/3d7fb9047b740eb5697b746c74143a28/image4-8.png" />
            
            </figure><p>TLS 1.3 adoption in February 2024. QUIC uses TLS 1.3 under the hood.</p><p>To help prevent ossification in the future, new protocols such as TLS 1.3 and QUIC use <a href="https://datatracker.ietf.org/doc/rfc8701/">GREASE</a>, where clients send unknown identifiers on purpose, including cryptographic algorithm identifiers, to help catch similar bugs, and keep the flexibility.</p>
    <div>
      <h2>Migrating the Internet to post-quantum key agreement</h2>
      <a href="#migrating-the-internet-to-post-quantum-key-agreement">
        
      </a>
    </div>
    <p>Now that we understand what we’re dealing with on a high level, let’s dive into upgrading key agreement on the Internet. First, let’s have a closer look at NIST’s first and so far only post-quantum key agreement: ML-KEM.</p><p>ML-KEM was submitted under the name <a href="https://pq-crystals.org/kyber/index.shtml">CRYTALS-Kyber</a>. Even though it will be a US standard, its designers work in industry and academia across France, Switzerland, the Netherlands, Belgium, Germany, Canada, and the United States. Let’s have a look at its performance.</p>
    <div>
      <h3>ML-KEM versus X25519</h3>
      <a href="#ml-kem-versus-x25519">
        
      </a>
    </div>
    <p>Today the vast majority of clients use the traditional key agreement X25519. Let’s compare that to ML-KEM.</p>
<table>
<thead>
  <tr>
    <th></th>
    <th></th>
    <th><span>Keyshares size(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><span>Client</span></td>
    <td><span>Server</span></td>
    <td><span>Client</span></td>
    <td><span>Server</span></td>
  </tr>
  <tr>
    <td><span>ML-KEM-512</span></td>
    <td><span>✅</span></td>
    <td><span>800</span></td>
    <td><span>768</span></td>
    <td><span>45,000</span></td>
    <td><span>70,000</span></td>
  </tr>
  <tr>
    <td><span>ML-KEM-768</span></td>
    <td><span>✅</span></td>
    <td><span>1,184</span></td>
    <td><span>1,088</span></td>
    <td><span>29,000</span></td>
    <td><span>45,000</span></td>
  </tr>
  <tr>
    <td><span>ML-KEM-1024</span></td>
    <td><span>✅</span></td>
    <td><span>1,568</span></td>
    <td><span>1,568</span></td>
    <td><span>20,000</span></td>
    <td><span>30,000</span></td>
  </tr>
  <tr>
    <td><span>X25519</span></td>
    <td><span>❌</span></td>
    <td><span>32</span></td>
    <td><span>32</span></td>
    <td><span>19,000</span></td>
    <td><span>19,000</span></td>
  </tr>
</tbody>
</table><p>Size and CPU compared between X25519 and ML-KEM. Performance varies considerably by hardware platform and implementation constraints, and should be taken as a rough indication only.</p><p>ML-KEM-512, -768 and -1024 aim to be as resistant to (quantum) attack as AES-128, -192 and -256 respectively. Even at the AES-128 level, ML-KEM is much bigger than X25519, requiring 1,568 bytes over the wire, whereas X25519 requires a mere 64 bytes.</p><p>On the other hand, even ML-KEM-1024 is typically significantly faster than X25519, although this can vary quite a bit depending on your platform.</p>
    <div>
      <h3>ML-KEM-768 and X25519</h3>
      <a href="#ml-kem-768-and-x25519">
        
      </a>
    </div>
    <p>At Cloudflare, we are not taking advantage of that speed boost just yet. Like many other early adopters, we like to play it safe and deploy a <b>hybrid</b> key-agreement <a href="https://datatracker.ietf.org/doc/draft-tls-westerbaan-xyber768d00/">combining</a> X25519 and (a preliminary version of) ML-KEM-768. This combination might surprise you for two reasons.</p><ol><li><p>Why combine X25519 (“128 bits of security”) with ML-KEM-768 (“192 bits of security”)?</p></li><li><p>Why bother with the non post-quantum X25519?</p></li></ol><p>The apparent security level mismatch is a hedge against improvements in cryptanalysis in lattice-based cryptography. There is a lot of trust in the (non post-quantum) security of X25519: matching AES-128 is more than enough. Although we are comfortable in the security of ML-KEM-512 today, over the coming decades cryptanalysis could improve. Thus, we’d like to keep a margin for now.</p><p>The inclusion of X25519 has two reasons. First, there is always a remote chance that a breakthrough renders all variants of ML-KEM insecure. In that case, X25519 still provides non post-quantum security, and our post-quantum migration didn’t make things worse.</p><p>More important is that we do not only worry about attacks on the algorithm, but also on the implementation. A noteworthy example where we dodged a bullet is that of <a href="https://kyberslash.cr.yp.to/">KyberSlash</a>, a timing attack that affected many implementations of Kyber (an earlier version of ML-KEM), including <a href="https://github.com/cloudflare/circl/security/advisories/GHSA-9763-4f94-gfch">our own</a>. Luckily KyberSlash does not affect Kyber as it is used in TLS. A similar implementation mistake that would actually affect TLS, is likely to require an active attacker. In that case, the likely aim of the attacker wouldn’t be to decrypt data decades down the line, but steal a cookie or other token, or inject a payload. Including X25519 prevents such an attack.</p><p>So how well do ML-KEM-768 and X25519 together perform in practice?</p>
    <div>
      <h2>Performance and protocol ossification</h2>
      <a href="#performance-and-protocol-ossification">
        
      </a>
    </div>
    
    <div>
      <h3>Browser experiments</h3>
      <a href="#browser-experiments">
        
      </a>
    </div>
    <p>Being well aware of potential compatibility and performance issues, Google started <a href="https://security.googleblog.com/2016/07/experimenting-with-post-quantum.html">a first experiment</a> with post-quantum cryptography back in 2016, the same year NIST started their competition. This was followed up by a second larger joint experiment by <a href="/towards-post-quantum-cryptography-in-tls/">Cloudflare</a> and <a href="https://www.imperialviolet.org/2018/12/12/cecpq2.html">Google</a> in 2018. We tested two different hybrid post-quantum key agreements: CECPQ2, which is a combination of the lattice-based NTRU-HRSS and X25519, and CECPQ2b, a combination of the isogeny-based SIKE and again X25519. NTRU-HRSS is very similar to ML-KEM in size, but is computationally somewhat more taxing on the client-side. SIKE on the other hand, has very small keys, is computationally very expensive, and was <a href="https://eprint.iacr.org/2022/975.pdf">completely broken</a> in 2022. With respect to TLS handshake times, X25519+NTRU-HRSS performed very well, being hard to distinguish by eye from the control connections.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/5WPFvf7wEyiXYx1xYTBCAj/c207f16128331f55043551c6738b9dd4/image5-2.png" />
            
            </figure><p>Handshake times compared between X25519 (blue), X25519+SIKE (green) and X25519+NTRU-HRSS (orange). </p><p>Unfortunately, a small but significant fraction of clients experienced broken connections with NTRU-HRSS. The reason: the size of the NTRU-HRSS keyshares. In the past, when creating a TLS connection, the first message sent by the client, the so-called <i>ClientHello</i>, almost always fit within a single network packet. The TLS specification allows for a larger <i>ClientHello</i>, however no one really made use of that. Thus, protocol ossification strikes again as there are some middleboxes, load-balancers, and other software that tacitly assume the <i>ClientHello</i> always fits in a single packet.</p><p>Over the subsequent years, Chrome kept running their PQ experiment at a very low rate, and did a great job reaching out to vendors whose products were incompatible. If it were not for these compatibility issues, we would’ve likely seen Chrome ramp up post-quantum key agreement five years earlier.</p><p>Today the situation looks better. At the time of writing, Chrome has enabled post-quantum key-agreement for 10% of all users. That accounts for about 1.8% of all our TLS 1.3 connections, as shown in the figure below. That’s a lot, but we’re not out of the woods yet. There could well be performance and compatibility issues that prevent a further rollout.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/1fnypmfnBMi2AR0lvSq4Zb/3e5660bfb014452e84a3d3e26f1f733b/graph--1-.png" />
            
            </figure><p>Fraction of TLS 1.3 connections established with Cloudflare that are secured with post-quantum cryptography. At the moment, it’s more than 99% from Chrome. </p><p>Nonetheless, we feel it’s more probable than not that we will see Chrome enable post-quantum key agreement for more users this year.</p>
    <div>
      <h3>Other browsers</h3>
      <a href="#other-browsers">
        
      </a>
    </div>
    <p>In January 2024, Firefox landed the code to support post-quantum key agreement in <a href="https://www.mozilla.org/en-US/firefox/channel/desktop/">nightly</a>, and it’s likely it will land in Firefox proper later in 2024. For Chrome-derived browsers, such as Edge and Brave, it’s easy to piggyback on the work of Chrome, and we could well see them follow suit when Chrome turns on post-quantum key-agreement by default.</p><p>However, browser to server connections aren’t the only connections important to the Internet.</p>
    <div>
      <h3>Testing connections to customer origins</h3>
      <a href="#testing-connections-to-customer-origins">
        
      </a>
    </div>
    <p>In <a href="/post-quantum-to-origins">September 2023,</a> we added support for our customers to enable post-quantum key agreement on connections from Cloudflare to their origins. That’s connection (3) in the following diagram. This can be done in two ways: the fast way, and the slow but safer way. In both cases, if the origin does not support it, we fall back to traditional key-agreement. We explain the details of these in the blog post on <a href="/post-quantum-to-origins">post-quantum cryptography</a>, but in short, in the fast way we send the post-quantum keyshare immediately, and in the slow but safe way we let the origin ask for post-quantum using a <i>HelloRetryRequest</i> message. Chrome, by the way, is deploying post-quantum key agreement the fast way.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/THODVUtVIIyGgACaPDZa5/7ca19e62617a241d44dda67ec6200a58/image11.png" />
            
            </figure><p>Typical connection flow when a visitor requests an uncached page.</p><p>At the same time, we started regularly testing our customer origins to see if they would support us offering post-quantum key agreement. We found all origins supported the safe but slow method. The fast method didn’t fare as well, as we found that 0.34% of connections would break. That’s higher than the failure rates seen by browsers.</p><p>Unsurprisingly, many failures seem to be caused by the large ClientHello. Interestingly, the majority are caused by servers not correctly implementing <i>HelloRetryRequest</i>. To investigate the cause, we have reached out to customers to ascertain the cause. We’re very grateful to those that have responded, and we’re currently working through the data.</p>
    <div>
      <h3>Outlook</h3>
      <a href="#outlook">
        
      </a>
    </div>
    <p>As we’ve seen, post-quantum key agreement, despite protocol ossification, is relatively straightforward to deploy. We’re also on a great trajectory, as we might well see double-digit client support for post-quantum key agreement later this year.</p><p>Let’s turn to the second, more difficult migration.</p>
    <div>
      <h2>Migrating the Internet to post-quantum signatures</h2>
      <a href="#migrating-the-internet-to-post-quantum-signatures">
        
      </a>
    </div>
    <p>Now, we’ll turn our attention to upgrading the signatures used on the Internet.</p>
    <div>
      <h3>The zoo of post-quantum signatures</h3>
      <a href="#the-zoo-of-post-quantum-signatures">
        
      </a>
    </div>
    <p>Let’s start by sizing up the post-quantum signatures we have available today at the AES-128 security level: ML-DSA-44, FN-DSA-512, and the two variants of SLH-DSA. As a comparison, we also include the venerable Ed25519 and RSA-2048 in wide use today, as well as a sample of five promising signature schemes from the signatures onramp.</p>
<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></td>
    <td></td>
    <td><span>PQ</span></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>Standardized</span></td>
    <td><span>Ed25519</span></td>
    <td><span>❌</span></td>
    <td><span>32</span></td>
    <td><span>64</span></td>
    <td><span>1 (baseline)</span></td>
    <td><span>1 (baseline)</span></td>
  </tr>
  <tr>
    <td><span>RSA-2048</span></td>
    <td><span>❌</span></td>
    <td><span>256</span></td>
    <td><span>256</span></td>
    <td><span>70</span></td>
    <td><span>0.3</span></td>
  </tr>
  <tr>
    <td><span>NIST drafts</span></td>
    <td><span>ML-DSA-44</span></td>
    <td><span>✅</span></td>
    <td><span>1,312</span></td>
    <td><span>2,420</span></td>
    <td><span>4.8</span></td>
    <td><span>0.5</span></td>
  </tr>
  <tr>
    <td><span>FN-DSA-512</span></td>
    <td><span>✅</span></td>
    <td><span>897</span></td>
    <td><span>666</span></td>
    <td><span>8 ⚠️</span></td>
    <td><span>0.5</span></td>
  </tr>
  <tr>
    <td><span>SLH-DSA-128s</span></td>
    <td><span>✅</span></td>
    <td><span>32</span></td>
    <td><span>7,856</span></td>
    <td><span>8,000</span></td>
    <td><span>2.8</span></td>
  </tr>
  <tr>
    <td><span>SLH-DSA-128f</span></td>
    <td><span>✅</span></td>
    <td><span>32</span></td>
    <td><span>17,088</span></td>
    <td><span>550</span></td>
    <td><span>7</span></td>
  </tr>
  <tr>
    <td><span>Sample from signatures onramp</span></td>
    <td><span>MAYO</span><sub>one</sub></td>
    <td><span>✅</span></td>
    <td><span>1,168</span></td>
    <td><span>321</span></td>
    <td><span>4.7</span></td>
    <td><span>0.3</span></td>
  </tr>
  <tr>
    <td><span>MAYO</span><sub>two</sub></td>
    <td><span>✅</span></td>
    <td><span>5,488</span></td>
    <td><span>180</span></td>
    <td><span>5</span></td>
    <td><span>0.2</span></td>
  </tr>
  <tr>
    <td><span>SQISign I</span></td>
    <td><span>✅</span></td>
    <td><span>64</span></td>
    <td><span>177</span></td>
    <td><span>60,000</span></td>
    <td><span>500</span></td>
  </tr>
  <tr>
    <td><span>UOV Is-pkc</span></td>
    <td><span>✅</span></td>
    <td><span>66,576</span></td>
    <td><span>96</span></td>
    <td><span>2.5</span></td>
    <td><span>2</span></td>
  </tr>
  <tr>
    <td><span>HAWK512</span></td>
    <td><span>✅</span></td>
    <td><span>1,024</span></td>
    <td><span>555</span></td>
    <td><span>2</span></td>
    <td><span>1</span></td>
  </tr>
</tbody>
</table><p>Comparison of various signature schemes at the security level of AES-128. CPU times vary significantly by platform and implementation constraints and should be taken as a rough indication only. ⚠️FN-DSA signing time when using fast but dangerous floating-point arithmetic — see warning below.</p><p>It is immediately clear that none of the post-quantum signature schemes comes even close to being a drop-in replacement for Ed25519 (which is comparable to ECDSA P-256) as most of the signatures are simply much bigger. The exceptions are SQISign, MAYO, and UOV from the onramp, but they’re far from ideal. MAYO and UOV have large public keys, and SQISign requires an immense amount of computation.</p>
    <div>
      <h3>When to use SLH-DSA</h3>
      <a href="#when-to-use-slh-dsa">
        
      </a>
    </div>
    <p>As mentioned before, today we only have drafts for SLH-DSA and ML-DSA. In every relevant performance metric, ML-DSA beats SLH-DSA handily. (Even the small public keys of SLH-DSA are not any advantage. If you include the ML-DSA public key with its signature, it’s still smaller than an SLH-DSA signature, and in that case you can use the short hash of the ML-DSA public key as a short public key.)</p><p>The advantage of SLH-DSA is that there is a lot of trust in its security. To forge an SLH-DSA signature you need to break the underlying hash function quite badly. It is not enough to break the collision resistance of the hash, as has been done with SHA-1 and MD5. In fact, as of February 2024, an SHA-1 based SLH-DSA would still be considered secure. Of course, SLH-DSA does not use SHA-1, and instead uses SHA2 and SHA3, against which not a single practical attack is known.</p><p>If you can shoulder the cost, SLH-DSA has the best security guarantee, which might be crucial when dealing with long-lasting signatures, or deployments where upgrades are impossible.</p>
    <div>
      <h3>Be careful with FN-DSA</h3>
      <a href="#be-careful-with-fn-dsa">
        
      </a>
    </div>
    <p>Looking ahead a bit: the best of the worst seems to be FN-DSA-512. FN-DSA-512’s signatures and public key together are <i>only</i> 1,563 bytes, with somewhat reasonable signing time. FN-DSA has an <b>achilles heel</b> though — for acceptable signing performance, it requires fast floating-point arithmetic. Without it, signing is about 20 times slower. But speed is not enough, as the floating-point arithmetic has to run in constant time — without it, the FN-DSA private key can be recovered by timing signature creation. Writing safe FN-DSA implementations has turned out to be quite challenging, which makes FN-DSA dangerous when signatures are generated on the fly, such as in a TLS handshake. It is good to stress that this only affects signing. FN-DSA verification does not require floating-point arithmetic (and during verification there wouldn’t be a private key to leak anyway.)</p>
    <div>
      <h2>There are many signatures on the web</h2>
      <a href="#there-are-many-signatures-on-the-web">
        
      </a>
    </div>
    <p>The biggest pain-point of migrating the Internet to post-quantum signatures, is that there are a lot of signatures even in a single connection. When you visit this very website for the first time, we send <b>six signatures and two public keys</b>.</p><p>The majority of these are for the <b>certificate chain</b>: the CA signs the intermediate certificate, which signs the leaf certificate, which in turn signs the TLS transcript to prove the authenticity of the server. If you’re keeping count: we’re still three signatures short.</p><p>Two of these are for <b>SCTs</b> required for <a href="https://certificate.transparency.dev/howctworks/">certificate transparency</a>. Certificate transparency is a key, but lesser known, part of the <a href="https://smallstep.com/blog/everything-pki/#web-pki-vs-internal-pki">Web PKI</a>, the ecosystem that secures browser connections. Its goal is to publicly log every certificate issued, so that misissuances can be detected after the fact. It works by having independent parties run <i>CT logs</i>. Before issuing a certificate, a CA must first submit it to at least two different CT logs. An SCT is a signature of a CT log that acts as a proof, a <i>receipt</i>, that the certificate has been logged.</p><p>The final signature is an <a href="/high-reliability-ocsp-stapling">OCSP staple</a>, which proves that the leaf certificate hasn’t been revoked in the last few days.</p>
    <div>
      <h3>Tailoring signature schemes</h3>
      <a href="#tailoring-signature-schemes">
        
      </a>
    </div>
    <p>There are two aspects of how a signature can be used that are worthwhile to highlight: whether the <b>public key is included</b> with the signature, and whether the signature is <b>online</b> or <b>offline</b>.</p><p>For the SCTs and the signature of the root on the intermediate, the public key is not transmitted during the handshake. Thus, for those, a signature scheme with smaller signatures but larger public keys, such as MAYO or UOV, would be particularly well-suited. For the other signatures, the public key is included, and it’s more important to minimize the sizes of the combined public key and signature.</p><p>The handshake signature is the only signature that is created online — all the other signatures are created ahead of time.  The handshake signature is created and verified only once, whereas the other signatures are typically verified many times by different clients. This means that for the handshake signature, it’s advantageous to balance signing and verification time which are both in the <i>hot path</i>, whereas for the other signatures having better verification time at the cost of slower signing is worthwhile. This is one of the advantages RSA still enjoys over elliptic curve signatures today.</p><p>Putting together different signature schemes is a fun puzzle, but it also comes with some drawbacks. Using multiple different schemes increases the attack surface because an algorithmic or implementation vulnerability in one compromises the whole. Also, the whole ecosystem needs to implement and optimize multiple algorithms, which is a significant burden.</p>
    <div>
      <h2>Putting it together</h2>
      <a href="#putting-it-together">
        
      </a>
    </div>
    <p>So, what are some reasonable combinations to try?</p>
    <div>
      <h3>With NIST’s current picks</h3>
      <a href="#with-nists-current-picks">
        
      </a>
    </div>
    <p>With the draft standards available today, we do not have a lot of options.</p><p>If we simply switch to ML-DSA-44 for all signatures, we’re adding 17kB of data that needs to be transmitted from the server to the client during the TLS handshake. Is that a lot? Probably. We will address that later on.</p><p>If we wait a bit and replace all but the handshake signature with FN-DSA-512, we’re looking at adding only 8kB. That’s much better, but I have to repeat that it’s difficult to implement FN-DSA-512 signing safely without timing side channels, and there is a good chance we’ll shoot ourselves in the foot if we’re not careful.</p><p>Another way to shoot ourselves in the foot <i>today</i> is with stateful hash-based signatures.</p>
    <div>
      <h3>Stateful hash-based signatures</h3>
      <a href="#stateful-hash-based-signatures">
        
      </a>
    </div>
    <p>Apart from symmetric cryptography, there are already post-quantum signature schemes standardized today: LMS / HRSS and XMSS(MT). Just like SLH-DSA, these are hash-based signature schemes, and thus, algorithmically they’re very conservative.</p><p>But they come with a major drawback: you need to <i>remember the state</i>. What is this state? When generating a keypair, you prepare a fixed number of one-time-use slots, and you need to remember which one you’ve used. If you use the same prepared slot <a href="https://eprint.iacr.org/2016/1042">twice</a>, then anyone can create a forgery with those two. Managing this state is not impossible, but quite tricky. What if the server was restored from a backup? The state can be distributed over multiple servers, but that changes the usual signature flow quite a bit, and it’s unclear whether regulators will allow this approach, as the state is typically considered part of the private key.</p><p>So, how do they perform? It’s hard to give a definite answer. These hash-based signature schemes have a lot of knobs to turn and can be fine-tuned to their use case. You can see for yourself, and play around with the parameters on this <a href="https://westerbaan.name/~bas/hashcalc/">website</a>. With standardized variants (with security parameter n=24) for the offline signatures, we can beat ML-DSA-44 in data on the wire, but can’t outperform FN-DSA-512. With security parameter n=16, which has not been standardized, stateful hash-based signatures are competitive with FN-DSA-512, and can even beat it on size. However, n=16 comes with yet another footgun: it allows the signer to create a single signature that validates two different messages — there is no <i>non-repudiation</i>.</p><p>All in all, FN-DSA-512 and stateful hash-based signatures tempt us with a similar and clear performance benefit over ML-DSA-44, but are difficult to use safely.</p>
    <div>
      <h3>Signatures on the horizon</h3>
      <a href="#signatures-on-the-horizon">
        
      </a>
    </div>
    <p>There are some very promising new signature schemes submitted to the NIST onramp.</p><p><a href="https://link.springer.com/chapter/10.1007/3-540-48910-X_15">UOV (unbalanced oil and vinegar)</a> is an old multivariate scheme with a large public key (66.5kB), but small signatures (96 bytes). If we combine UOV for the root and SCTs with ML-DSA-44 for the others, we’re looking at only 10kB — close to FN-DSA-512.</p><p>Over the decades, there have been many attempts to add some structure to UOV public keys, to get a better balance between public key and signature size. Many of these so-called <i>structured multivariate</i> schemes, which includes Rainbow and GeMMS, unfortunately have been broken.</p><p><a href="https://pqmayo.org/">MAYO</a> is the latest proposal for a structured multivariate scheme, designed by the cryptographer that broke <a href="https://eprint.iacr.org/2022/214.pdf">Rainbow</a>. As a structured multivariate scheme, its security requires careful scrutiny, but its utility (given it is not broken) is very appealing.</p><p>MAYO allows for a fine-grained tradeoff between signature and public key size. For the submission, to keep things simple, the authors proposed two concrete variants: MAYO<sub>one </sub>with balanced signature (321 bytes) and public key (1.1kB) sizes, and MAYO<sub>two</sub> that has signatures of 180 bytes, while keeping the public key manageable at 5.4kB. Verification times are excellent, while signing times are somewhat slower than ECDSA, but far better than RSA. Combining both variants in the obvious way, we’re only looking at 3.3kB.</p><p>Purely looking at sizes, SQISign I is the clear winner, even beating RSA-2048. Unfortunately, the computation required for signing, and crucially verification, are way too high. For niche applications, SQISign might be useful, but for general adoption verification times need to improve significantly, even if that requires a larger signature.</p><p>Finally, I would like to mention HAWK512. HAWK is a lattice-based scheme similar to FN-DSA-512, but does not require floating-point arithmetic. This makes HAWK an appealing alternative to FN-DSA. NIST has repeatedly stated that the main purpose of the onramp is to standardize a signature scheme that is not based on lattices — a description HAWK does not fit. We might see <a href="https://groups.google.com/a/list.nist.gov/g/pqc-forum/c/bjVkrZmI9VM/m/Tj9goDJCAAAJ">some innovations</a> of HAWK be included in the final version of FN-DSA, but it is unclear whether that will solve all of FN-DSA implementation concerns.</p><p>There are more promising submissions in the onramp, but those discussed are a fairly representative sample of those interesting to TLS. For instance, <a href="https://snova.pqclab.org/">SNOVA</a> is similar to MAYO, and <a href="https://www.tuovsig.org/">TUOV</a> is similar to UOV. Explore the submissions for yourself on Thom’s <a href="https://github.com/PQShield/nist-sigs-zoo">webpage</a>.</p>
    <div>
      <h2>Do we really care about the extra bytes?</h2>
      <a href="#do-we-really-care-about-the-extra-bytes">
        
      </a>
    </div>
    <p>It will take 17kB extra to swap in ML-DSA-44. That’s a lot compared to the typical handshake today, but it’s not a lot compared to the JavaScript and images served on many web pages. The key point is that the change we must make here affects every single TLS connection, whether it’s used for a bloated website, or a time-critical API call. Also, it’s not just about waiting a bit longer. If you have spotty cellular reception, that extra data can make the difference between being able to load a page, and having the connection time out. (As an aside, talking about bloat: many apps perform a <a href="https://thomwiggers.nl/publication/tls-on-android/tls-on-android.pdf">surprisingly high number of TLS handshakes</a>.)</p><p>Just like with key agreement, performance isn’t our only concern: we also want the connection to succeed in the first place. Back in 2021, <a href="/sizing-up-post-quantum-signatures/">we ran an experiment</a> artificially enlarging the certificate chain to simulate larger post-quantum certificates. We give a short summary of the key result below, but for the details, check out the full <a href="/sizing-up-post-quantum-signatures/">blog post</a>.</p><p>Initially, we wanted to run the experiment on a small sample of regular traffic, in order to get unbiased data. Unfortunately, we found that large certificate chains broke some connections. Thus, to avoid breaking customer connections, we set up the experiment to use background connections launched from our challenge pages. For each participant, we launched two background connections: one with a larger certificate chain (live) and one with a normal chain(control). The graph on the right shows the number of control connections that are missing a corresponding live connection. There are jumps around 10kB and 30kB, suggesting that there are clients or middleboxes  that break when certificate chains grow by more than 10kB or 30kB.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/2sU1gCujSAuhaRfScGhoS1/18569ea438ffb0c029f8bcd2b1a53650/image9.png" />
            
            </figure><p>Missing requests when artificially inflating certificate chain size to simulate post-quantum certificates.</p><p>This does not mean that the ML-DSA-44-only route is necessarily unviable. Just like with key agreement, browsers can slowly turn on support for post-quantum certificates. As we hit issues with middleboxes, we can work with vendors to fix what is broken. It is crucial here that servers are configured to be able to serve either a small traditional chain, or a larger post-quantum chain.</p><p>These issues <i>are</i> problematic for a <a href="https://eprint.iacr.org/2018/063.pdf">single-certificate migration</a> strategy. In this approach, the server installs a single traditional certificate that contains a separate post-quantum certificate in a so-called non-critical extension. A client that does not support post-quantum certificates will ignore the extension. In this approach, installing the single certificate will immediately break all clients with compatibility issues, making it a non-starter.</p><p>What about performance? We saw the following impact on TLS handshake time.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/66AlqTNxx8h6oKMZSBqqsD/53e71fcf675af6818fc63eb7ab40a339/image13.png" />
            
            </figure><p>Performance when artificially inflating certificate chain size to simulate post-quantum certificates.</p><p>The jump at around 40kB is caused by an extra round-trip due to a full congestion window. In the 2021 blog post <a href="/sizing-up-post-quantum-signatures/#intermezzo-tcp-s-congestion-window">we go into detail</a> on what that is all about. There is an important caveat: at Cloudflare, because we’re close to the client, we use a larger congestion window. With a typical congestion window, the jump would move to around 10kB. Also, the jump would be larger as typical round-trip times are higher.</p><p>Thus, when adding 9KB, we're looking at a slowdown of about 15%. Crossing the 10kB boundary, we are likely to incur an extra roundtrip, which could well lead to a slowdown of more than 60%. That completely negates the much touted performance benefit that TLS 1.3 has over TLS 1.2, and it’s too high to be enabled by default.</p><p>Is 9kB too much? Enabling post-quantum key agreement wasn’t free either, but enabling post-quantum key agreement was cheaper and actually gets us a tangible security benefit today. However, this thinking is dangerous. If we wait too long before enabling post-quantum certificates by default, we might find ourselves out of time when the quantum computer arrives.</p>
    <div>
      <h2>Way forward</h2>
      <a href="#way-forward">
        
      </a>
    </div>
    <p>Over the coming years, we’ll be working with browsers to test the viability and performance impact of post-quantum authentication in TLS. We expect to add support for post-quantum certificates as soon as they arrive (probably around 2026), but not enable them by default.</p><p>At the same time, we’re exploring various ideas to reduce the number of signatures.</p>
    <div>
      <h2>Reducing number of signatures</h2>
      <a href="#reducing-number-of-signatures">
        
      </a>
    </div>
    <p>Over the last few years, there have been several proposals to reduce the number of signatures used.</p>
    <div>
      <h3>Leaving out intermediate certificates</h3>
      <a href="#leaving-out-intermediate-certificates">
        
      </a>
    </div>
    <p>CAs report the intermediate certificates they use in the <a href="https://www.ccadb.org/cas/intermediates">CCADB</a>. Most browsers ship with the list of intermediates (of CAs they trust). Using that list, a browser is able to establish a connection with a server that forgot to install the intermediate. If a server can leave out the intermediate, then why bother with it?</p><p>There are three competing proposals to leave out the intermediate certificate. The original 2019 proposal is by Martin Thomson, who <a href="https://datatracker.ietf.org/doc/html/draft-kampanakis-tls-scas-latest">suggests simply</a> having the browser send a single bit to indicate that it has an up-to-date list of all intermediates. In that case, the server will leave out the intermediates. This will work well in the majority of cases, but could lead to some hard-to-debug issues in corner cases. For one, not all intermediates are listed in the CCADB, and these missing intermediates aren’t even from custom CAs. Another reason is that the browser could be mistaken about whether it’s up-to-date. A more esoteric issue is that the browser could reconstruct a different chain of certificates than the server had in mind.</p><p>To address these issues, in 2023, Dennis Jackson put forward a more <a href="https://datatracker.ietf.org/doc/draft-jackson-tls-cert-abridge/">robust proposal</a>. In this proposal, every year a fixed list of intermediates is compiled from the CCADB. Instead of a single flag, the browser will send the named lists of intermediates it has. The server will not simply leave out matching intermediates, but rather replace them by the sequence number at which they appear in the list. He also did a survey of the most popular websites, and found that just by leaving out the intermediates today, we can save <a href="https://www.ietf.org/archive/id/draft-jackson-tls-cert-abridge-00.html#name-preliminary-evaluation">more than 2kB</a> compared to certificate compression for half of them. That’s with today’s certificates: yes, X509 certificates are somewhat bloated.</p><p>Finally, there is the more general <a href="https://datatracker.ietf.org/doc/draft-davidben-tls-trust-expr/">TLS trust expressions</a> proposal that allows a browser to signal more in a more fine-grained manner which CAs and intermediates it trusts.</p><p>It’s likely some form of intermediate suppression will be adopted in the coming years. This will push the cost of a ML-DSA-44-only deployment down to less than 13kB.</p>
    <div>
      <h3>KEMTLS</h3>
      <a href="#kemtls">
        
      </a>
    </div>
    <p>Another approach is to change TLS more rigorously by replacing the signature algorithm in the leaf certificate by a KEM. This is called <a href="/kemtls-post-quantum-tls-without-signatures">KEMTLS</a> (or <a href="https://datatracker.ietf.org/doc/draft-celi-wiggers-tls-authkem/">AuthKEM</a> at the IETF). The server proves it controls the leaf certificate, by being able to decrypt a challenge sent by the client. This is not an outlandishly new idea, as older versions of TLS would encrypt a shared key to an RSA certificate.</p><p>KEMTLS does add quite a bit of complexity to TLS 1.3, which was purposely designed to simplify TLS 1.2. Adding complexity adds security concerns, but we <a href="/post-quantum-formal-analysis">soften that</a> by extending TLS 1.3 machine-checked security proof to KEMTLS. Nonetheless, adopting KEMTLS will be a significant engineering effort, and its gains should be worthwhile.</p><p>If we replace an ML-DSA-44 handshake signature of 2,420 bytes by KEMTLS using ML-KEM-512, we save 852 bytes in the total bytes transmitted by client and server. Looking just at the server, we save 1,620 bytes. If that’s 1.6kB saved on 17kB, it’s not very impressive. Also, KEMTLS is of little benefit if small post-quantum signatures such as MAYO<sub>one</sub> are available for the handshake.</p><p>KEMTLS shines in the case that 1.6kB savings pushes the server within the congestion window, such as when UOV is used for all but the handshake and leaf signature. Another advantage of KEMTLS, especially for embedded devices, is that it could reduce the number of algorithms that need to be implemented: you need a KEM for the key agreement anyway, and that could replace the signature scheme you would’ve only used for the handshake signature.</p><p>At the moment, deploying KEMTLS isn’t the lowest hanging fruit, but it could well come into its own, depending on which signature schemes are standardized, and which other protocol changes are made.</p>
    <div>
      <h3>Merkle tree certificates</h3>
      <a href="#merkle-tree-certificates">
        
      </a>
    </div>
    <p>An even more ambitious and involved proposal is <a href="https://datatracker.ietf.org/doc/draft-davidben-tls-merkle-tree-certs/">Merkle tree certificates</a> (MTC). In this proposal, all signatures except the handshake signature are replaced by a short &lt;800 byte Merkle tree certificate. This sounds too good to be true, and there is indeed a catch. MTC doesn’t work in all situations, and for those you will need to fall back to old-fashioned X509 certificates and certificate transparency. So, what’s assumed?</p><ul><li><p>No direct certificate issuance. You can’t get a Merkle tree certificate immediately: you will have to ask for one, and then wait for at least a day before you can use it.</p></li><li><p>Clients (in MTC parlance <i>relying parties</i>) can only check a Merkle tree certificate if they stay up to date with a <i>transparency service</i>. Browsers have an update-mechanism that can be used for this, but a browser that hasn’t been used in a while might be stale.</p></li></ul><p>MTC should be seen as an optimisation for the vast majority of cases.</p>
    <div>
      <h3>Summary</h3>
      <a href="#summary">
        
      </a>
    </div>
    <p>So, how does it actually work? I’ll try to give a short summary — for a longer introduction check out <a href="https://youtu.be/u_sFyz4F7dc?si=inG4bgBwKLzrBuvY&amp;t=2566">David Benjamin’s IETF presentation</a>, or get your hands dirty by <a href="https://github.com/bwesterb/mtc">setting up your own MTC CA</a>.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/2pAmfsKWArXUPEZtgXezao/f40906c5f85ec7a141920b3d49fba0af/image1-9.png" />
            
            </figure><p>An overview of a Merkle Tree certificate deployment</p><p>In MTC, CAs issues <i>assertions</i> in a batch in a fixed rhythm. Say once every hour. An example of an assertion is “you can trust P-256 public key ab....23 when connecting to example.com”. Basically an assertion is a certificate without the signature. If a subscriber wants to get a certificate, it sends the assertion to the CA, which vets it, and then queues it for issuance.</p><p>On this <i>batch</i> of assertions, the CA computes a <a href="https://en.wikipedia.org/wiki/Merkle_tree">Merkle tree</a>. We have an <a href="/introducing-certificate-transparency-and-nimbus#buildingaverifiablegloballyconsistentlog">explainer of Merkle trees</a> in our blog post introducing certificate transparency. The short of it is that you can summarize a batch into a single hash by creating a tree hashing pairwise. The root is the summary. The nice thing about Merkle trees is that you can prove that something was in the batch to someone who only has the root, by revealing just a few hashes up the tree, which is called the <i>Merkle tree certificate</i>.</p><p>Each assertion is valid for a fixed number of batches — say 336 batches for a validity of two weeks. This is called the <i>validity window</i>. When issuing a batch, the CA not only publishes the assertions, but also a signature on the roots of all batches that are currently valid, called the <i>signed validity window</i>.</p><p>After the MTC CA has issued the new batch, the <i>subscriber</i> that asked for the certificate to be issued can pull the Merkle tree certificate from the CA. The subscriber can then install it, next to its X509 certificate, but will have to wait a bit before it’s useful.</p><p>Every hour, the <i>transparency services</i>, including those run by browser vendors, pull the new assertions and signed validity window from the CAs they trust. They check whether everything is consistent, including whether the new signed validity window matches with the old one. When satisfied, they republish the batches and signed validity window themselves.</p><p>Every hour, browsers download the latest roots from their trusted <i>transparency service</i>. Now, when connecting to a server, the client will essentially advertise which CAs it trusts, and the sequence number of the latest batch for which it has the roots. The server can then send either a new MTC, an older MTC (if the client is a bit stale), or fall back to a X509 certificate.</p>
    <div>
      <h2>Outlook</h2>
      <a href="#outlook">
        
      </a>
    </div>
    <p>The path for migrating the Internet to post-quantum authentication is much less clear than with key agreement. In the short term, we expect early adoption of post-quantum authentication across the Internet around 2026, but few will turn it on by default. Unless we can get performance much closer to today’s authentication, we expect the vast majority to keep post-quantum authentication disabled, unless motivated by regulation.</p>
    <div>
      <h3>Not just TLS, authentication, and key agreement</h3>
      <a href="#not-just-tls-authentication-and-key-agreement">
        
      </a>
    </div>
    <p>Despite its length, in this blog post, we have only really touched upon migrating TLS. And even TLS we did not cover completely, as we have not discussed <a href="/announcing-encrypted-client-hello">Encrypted ClientHello</a> (we didn’t forget about it). Although important, TLS is not the only protocol key to the security of the Internet. We want to briefly mention a few other challenges, but cannot go into detail. One particular challenge is DNSSEC, which is responsible for securing the resolution of domain names.</p><p>Although key agreement and signatures are the most widely used cryptographic primitives, over the last few years we have seen the adoption of more esoteric cryptography to serve more advanced use cases, such as unlinkable tokens with <a href="/privacy-pass-standard">Privacy Pass</a> / <a href="/eliminating-captchas-on-iphones-and-macs-using-new-standard">PAT</a>, anonymous credentials, and <a href="/inside-geo-key-manager-v2">attribute based encryption</a> to name a few. For most of these advanced cryptographic schemes, there is no known practical post-quantum alternative yet.</p>
    <div>
      <h2>What you can do today</h2>
      <a href="#what-you-can-do-today">
        
      </a>
    </div>
    <p>To finish, let’s review what you can do today. For most organizations the brunt of the work is in the preparation. Where is cryptography used in the first place? What software libraries / what hardware? What are the timelines of your vendors? Do you need to hire expertise? What’s at risk, and how should it be prioritized? Even before you can answer all those, create engagement within the organization. All this work can be started before NIST finishes their standards or software starts shipping with post-quantum cryptography.</p><p>You can also start testing right now since the performance characteristics of the final standards will not be meaningfully different from the preliminary ones available today. If it works with the preliminary ones today in your test environment, the final standards will most likely work just fine in production. We’ve collected a list of software and forks that already support preliminary post-quantum key agreement <a href="https://pq.cloudflareresearch.com/">here</a>.</p><p>Also on <a href="https://pq.cloudflareresearch.com/">that page</a>, we collected instructions on how to turn on post-quantum key agreement in your browser today. (For Chrome it’s <code>enable-tls13-kyber</code> in <code>chrome://flags</code>.)</p><p>If you’re a Cloudflare customer, you can check out how to <a href="/post-quantum-to-origins/">enable post-quantum key agreement to your origin</a>, and <a href="/post-quantum-cryptography-ga">our products</a> that are secured against store-now/decrypt-later today.</p><p>Good luck with your migration, and if you hit any issues, do reach out: <a>ask-research@cloudflare.com</a></p> ]]></content:encoded>
            <category><![CDATA[Security Week]]></category>
            <category><![CDATA[Post-Quantum]]></category>
            <category><![CDATA[Research]]></category>
            <guid isPermaLink="false">2Qs8QVZDDBbXeE8CoXklQr</guid>
            <dc:creator>Bas Westerbaan</dc:creator>
        </item>
        <item>
            <title><![CDATA[Post-quantum cryptography goes GA]]></title>
            <link>https://blog.cloudflare.com/post-quantum-cryptography-ga/</link>
            <pubDate>Fri, 29 Sep 2023 13:05:00 GMT</pubDate>
            <description><![CDATA[ Cloudflare announces Post-Quantum Cryptography as a Generally Available system ]]></description>
            <content:encoded><![CDATA[ <p></p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/CftKQnuBYwGI69XmAFsVq/d0577dd4455257096f07d478ddaf5bdd/image2-28.png" />
            
            </figure><p>Over the last twelve months, we have been talking about the new baseline of encryption on the Internet: <a href="https://www.cloudflare.com/learning/ssl/quantum/what-is-post-quantum-cryptography/">post-quantum cryptography</a>. During Birthday Week last year we announced that our <a href="/post-quantum-for-all/">beta of Kyber was available for testing,</a> and that <a href="/post-quantum-tunnel/">Cloudflare Tunnel</a> could be enabled with post-quantum cryptography. Earlier this year, we made our stance clear that this foundational technology should be available to <a href="/post-quantum-crypto-should-be-free/">everyone for free, forever</a>.</p><p>Today, we have hit a milestone after six years and <a href="/searchresults/#q=post%20quantum%20crypto&amp;sort=relevancy&amp;f:@customer_facing_source=%5BBlog%5D&amp;f:@language=%5BEnglish%5D">31 blog posts</a> in the making: we’re starting to roll out <a href="/post-quantum-to-origins/">General Availability</a><sup>1</sup> of post-quantum cryptography support to our customers, services, and internal systems as described more fully below. This includes products like <a href="/post-quantum-to-origins/">Pingora</a> for origin connectivity, 1.1.1.1, <a href="https://www.cloudflare.com/developer-platform/r2/">R2</a>, Argo Smart Routing, Snippets, and so many more.</p><p>This is a milestone for the Internet. We don't yet know when quantum computers will have enough scale to break today's cryptography, but the benefits of upgrading to post-quantum cryptography now are clear. <a href="/the-tls-post-quantum-experiment/">Fast connections and future-proofed</a> security are all possible today because of the advances made by Cloudflare, Google, Mozilla, the National Institutes of Standards and Technology in the United States, the Internet Engineering Task Force, and numerous academic institutions</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/6oRJ1q0ib6rCSfgBJPJyuU/8e2847b56b058eb6267d1b9303a74883/image1-40.png" />
            
            </figure><p>What does General Availability mean? 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. Starting 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 user’s request is routed through Cloudflare’s network (2). We have upgraded 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 inbound and outbound connections</b> <b>as Generally Available</b> for use including <i>origin servers</i> and <a href="https://workers.cloudflare.com/">Cloudflare Workers</a> <code>fetch()</code>es.</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>Aiming for 100% by the end of year.</span></td>
  </tr>
  <tr>
    <td><span>Enterprise</span></td>
    <td><span>Roll-out begins February 2024. 100% by March 2024.</span></td>
  </tr>
</tbody>
</table><p>For our Enterprise customers, we will be sending out additional information regularly over the course of the next six months to help prepare you for the roll-out. Pro, Business, and Enterprise customers can skip the roll-out and opt-in within your zone today, or opt-out ahead of time using an API described in our companion blog post on <a href="/post-quantum-to-origins/">post-quantum cryptography</a>. Before rolling out for Enterprise in February 2024, we will add a toggle on the dashboard to opt out.</p><p>If you're excited to get started now, <a href="/post-quantum-to-origins/">check out our blog with the technical details and flip on post-quantum cryptography support via the API</a>!</p>
    <div>
      <h3>What’s included and what is next?</h3>
      <a href="#whats-included-and-what-is-next">
        
      </a>
    </div>
    <p>With an upgrade of this magnitude, we wanted to focus on our most used products first and then expand outward to cover our edge cases. This process has led us to include the following products and systems in this roll out:</p><table>
<thead>
  <tr>
    <td>1.1.1.1</td>
  </tr>
</thead>
<tbody>
  <tr>
    <td>AMP</td>
  </tr>
  <tr>
    <td>API Gateway</td>
  </tr>
  <tr>
    <td>Argo Smart Routing</td>
  </tr>
  <tr>
    <td>Auto Minify</td>
  </tr>
  <tr>
    <td>Automatic Platform Optimization</td>
  </tr>
  <tr>
    <td>Automatic Signed Exchange</td>
  </tr>
  <tr>
    <td>Cloudflare Egress</td>
  </tr>
  <tr>
    <td>Cloudflare Images</td>
  </tr>
  <tr>
    <td>Cloudflare Rulesets</td>
  </tr>
  <tr>
    <td>Cloudflare Snippets</td>
  </tr>
  <tr>
    <td>Cloudflare Tunnel</td>
  </tr>
  <tr>
    <td>Custom Error Pages</td>
  </tr>
  <tr>
    <td>Flow Based Monitoring</td>
  </tr>
  <tr>
    <td>Health checks</td>
  </tr>
  <tr>
    <td>Hermes</td>
  </tr>
  <tr>
    <td>Host Head Checker</td>
  </tr>
  <tr>
    <td>Magic Firewall</td>
  </tr>
  <tr>
    <td>Magic Network Monitoring</td>
  </tr>
  <tr>
    <td>Network Error Logging</td>
  </tr>
  <tr>
    <td>Project Flame</td>
  </tr>
  <tr>
    <td>Quicksilver</td>
  </tr>
  <tr>
    <td>R2 Storage</td>
  </tr>
  <tr>
    <td>Request Tracer</td>
  </tr>
  <tr>
    <td>Rocket Loader</td>
  </tr>
  <tr>
    <td>Speed on Cloudflare Dash</td>
  </tr>
  <tr>
    <td>SSL/TLS</td>
  </tr>
  <tr>
    <td>Traffic Manager</td>
  </tr>
  <tr>
    <td>WAF, Managed Rules</td>
  </tr>
  <tr>
    <td>Waiting Room</td>
  </tr>
  <tr>
    <td>Web Analytics</td>
  </tr>
</tbody>
</table><p>If a product or service you use is not listed here, we have not started rolling out post-quantum cryptography to it yet. We are actively working on rolling out post-quantum cryptography to all products and services including our Zero Trust products. Until we have achieved post-quantum cryptography support in all of our systems, we will publish an update blog in every Innovation Week that covers which products we have rolled out post-quantum cryptography to, the products that will be getting it next, and what is still on the horizon.</p><p>Products we are working on bringing post-quantum cryptography support to soon:</p><table>
<thead>
  <tr>
    <td>Cloudflare Gateway</td>
  </tr>
</thead>
<tbody>
  <tr>
    <td>Cloudflare DNS</td>
  </tr>
  <tr>
    <td>Cloudflare Load Balancer</td>
  </tr>
  <tr>
    <td>Cloudflare Access</td>
  </tr>
  <tr>
    <td>Always Online</td>
  </tr>
  <tr>
    <td>Zaraz</td>
  </tr>
  <tr>
    <td>Logging</td>
  </tr>
  <tr>
    <td>D1</td>
  </tr>
  <tr>
    <td>Cloudflare Workers</td>
  </tr>
  <tr>
    <td>Cloudflare WARP</td>
  </tr>
  <tr>
    <td>Bot Management</td>
  </tr>
</tbody>
</table>
    <div>
      <h3>Why now?</h3>
      <a href="#why-now">
        
      </a>
    </div>
    <p>As we announced earlier this year, post-quantum cryptography will be included for free in all Cloudflare products and services that can support it. The best encryption technology should be accessible to everyone - free of charge - to help support privacy and human rights globally.</p><p>As we <a href="/post-quantum-crypto-should-be-free/">mentioned</a> in March:</p><p><i>“What was once an experimental frontier has turned into the underlying fabric of modern society. It runs in our most critical infrastructure like power systems, hospitals, airports, and banks. We trust it with our most precious memories. We trust it with our secrets. That’s why the Internet needs to be private by default. It needs to be secure by default.”</i></p><p>Our work on post-quantum cryptography is driven by the thesis that quantum computers that can break conventional cryptography create a similar problem to the Year 2000 bug. We know there is going to be a problem in the future that could have catastrophic consequences for users, businesses, and even nation states. The difference this time is we don’t know how the date and time that this break in the computational paradigm will occur. Worse, any traffic captured today could be decrypted in the future. We need to prepare today to be ready for this threat.</p><p>We are excited for everyone to adopt post-quantum cryptography into their systems. To follow the latest developments of our deployment of post-quantum cryptography and third-party client/server support, check out <a href="https://pq.cloudflareresearch.com/">pq.cloudflareresearch.com</a> and keep an eye on this blog.</p><p>***</p><p><sup>1</sup>We are using a <a href="https://datatracker.ietf.org/doc/draft-tls-westerbaan-xyber768d00/">preliminary version</a> of Kyber, NIST’s pick for post-quantum key agreement. Kyber has not been finalized. We expect a final standard to be published in 2024 under the name ML-KEM, which we will then adopt promptly while deprecating support for X25519Kyber768Draft00.</p> ]]></content:encoded>
            <category><![CDATA[Birthday Week]]></category>
            <category><![CDATA[General Availability]]></category>
            <category><![CDATA[Product News]]></category>
            <category><![CDATA[Research]]></category>
            <category><![CDATA[Post-Quantum]]></category>
            <guid isPermaLink="false">6BFLGzTX8jguAgFnyAFCib</guid>
            <dc:creator>Wesley Evans</dc:creator>
            <dc:creator>Bas Westerbaan</dc:creator>
            <dc:creator>Christopher Patton</dc:creator>
            <dc:creator>Peter Wu</dc:creator>
            <dc:creator>Vânia Gonçalves</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[Post-quantum crypto should be free, so we’re including it for free, forever]]></title>
            <link>https://blog.cloudflare.com/post-quantum-crypto-should-be-free/</link>
            <pubDate>Thu, 16 Mar 2023 13:00:00 GMT</pubDate>
            <description><![CDATA[ Cloudflare makes the most advanced cryptography free for everyone, and it’s in beta today ]]></description>
            <content:encoded><![CDATA[ <p></p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/2hf3qqJJpxyJXlzymfKi9Y/5131867168fc9c607b435eb5d5dc0eb3/image1-31.png" />
            
            </figure><p>At Cloudflare, helping to build a better Internet is not just a catchy saying. We are committed to the long-term process of standards development. We love the work of pushing the fundamental technology of the Internet forward in ways that are accessible to everyone. Today we are adding even more substance to that commitment. One of our core beliefs is that privacy is a human right. We believe that to achieve that right the most advanced cryptography needs to be available to everyone, free of charge, forever. Today, we are announcing that our implementations of <a href="https://www.cloudflare.com/learning/ssl/quantum/what-is-post-quantum-cryptography/">post-quantum cryptography</a> will meet that standard: available to everyone, and included free of charge, forever.</p><p>We have a proud history of taking paid encryption products and launching it to the Internet at scale for Free. Even at the cost of short and long-term revenue because it’s the right thing to do. <a href="/introducing-universal-ssl/">In 2014, we made SSL free for every Cloudflare customer with Universal SSL</a>. As we make our implementations of post-quantum cryptography free forever today, we do it in the spirit of that first major announcement:</p><blockquote><p><i>“Having cutting-edge encryption may not seem important to a small blog, but it is critical to advancing the encrypted-by-default future of the Internet. Every byte, however seemingly mundane, that flows encrypted across the Internet makes it more difficult for those who wish to intercept, throttle, or censor the web. In other words, ensuring your personal blog is available over HTTPS makes it more likely that a human rights organization or social media service or independent journalist will be accessible around the world. Together we can do great things.”</i></p></blockquote><p>We hope that others will follow us in making their implementations of <a href="https://www.cloudflare.com/learning/ssl/quantum/what-is-post-quantum-cryptography/">PQC</a> free as well so that we can create a secure and private Internet without a “quantum” up-charge.</p><p>The Internet has matured since the 1990’s and the launch of SSL. What was once an experimental frontier has turned into the underlying fabric of modern society. It runs in our most critical infrastructure like power systems, hospitals, airports, and banks. We trust it with our most precious memories. We trust it with our secrets. That’s why the Internet needs to be private by default. It needs to be secure by default. It’s why we’re committed to ensuring that anyone and everyone can achieve post quantum security for free as well as start deploying it at scale today.</p><p>Our work on post-quantum crypto is driven by the thesis that quantum computers that can break conventional cryptography create a similar problem to the Year 2000 bug. We know there is going to be a problem in the future that could have catastrophic consequences for users, businesses, and even nation states. The difference this time is we don’t know the date and time that this break in the paradigm of how computers operate will occur. We need to prepare today to be ready for this threat.</p><p>To that end we have been preparing for this transition since 2018. At that time we were concerned about the implementation problems other large protocol transitions, like the move to TLS 1.3, had caused our customers and wanted to get ahead of it. Cloudflare Research over the last few years has become a leader and champion of the idea that PQC security wasn’t an afterthought for tomorrow but a real problem that needed to be solved today. We have collaborated with industry partners like <a href="/the-tls-post-quantum-experiment/">Google</a> and Mozilla, contributed to development through participation in the IETF, and even launched an <a href="https://github.com/cloudflare/circl">open source experimental cryptography suite</a> to help move the needle. We have tried hard to work with everyone that wanted to be a part of the process and show our work along the way.</p><p>As we have worked with our partners in both industry and academia to help prepare us and the Internet for a post-quantum future, we have become dismayed by an emerging trend. There are a growing number of vendors out there that want to cash in on the legitimate fear that nervous executives, privacy advocates, and government leaders have about quantum computing breaking traditional encryption. These vendors offer vague solutions based on unproven technologies like “Quantum Key Distribution” or “Post Quantum Security” libraries that package non-standard algorithms that haven’t been through public review with exorbitant price tags like RSA did in the 1990s. They often love to throw around phrases like “AI” and “Post Quantum” without really showing their work on how any of their systems actually function. Security and privacy are table stakes in the modern Internet, and no one should be charged just to get the baseline protection needed in our contemporary world.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/7Bs4exeLNWYuSKvgC9FoAl/91a3a5284a5cf93c79649a2440e0b473/image3-24.png" />
            
            </figure>
    <div>
      <h3>Launch your PQC transition today</h3>
      <a href="#launch-your-pqc-transition-today">
        
      </a>
    </div>
    <p>Testing and adopting post-quantum cryptography in modern networks doesn’t have to be hard! In fact, Cloudflare customers can test PQC in their systems today, as we describe later in this post.</p><p>Currently, we support <a href="https://pq-crystals.org/kyber/index.shtml">Kyber</a> for key agreement on any traffic that uses TLS 1.3 including <a href="https://www.cloudflare.com/learning/performance/what-is-http3/">HTTP/3</a>. (<a href="/post-quantum-for-all/">If you want a deep dive on our implementation check out our blog from last fall announcing the beta.</a>) To help you test your traffic to Cloudflare domains with these new key agreement methods we have open-sourced forks for <a href="https://github.com/cloudflare/boringssl-pq">BoringSSL</a>, <a href="https://github.com/cloudflare/go">Go</a> and <a href="https://github.com/cloudflare/qtls-pq">quic-go</a>. For BoringSSL and Go, check out <a href="/experiment-with-pq/#boringssl">the sample code here</a>.</p><p>If you use <a href="/post-quantum-tunnel/">Tunnels with cloudflared then upgrading to PQC is super simple</a>. Make sure you’re on at least version <a href="https://developers.cloudflare.com/cloudflare-one/connections/connect-apps/install-and-setup/tunnel-guide/local/">2022.9.1</a> and simply run <code>cloudflared --post-quantum</code>.</p><p>After testing out how Cloudflare can help you implement PQC in your networks, it’s time to start to prepare yourself for the transition to PQC in all of your systems. This first step of inventorying and identifying is critical to a smooth rollout. We know first hand since we have undertaken an extensive evaluation of all of our systems to earn our <a href="https://www.cloudflare.com/learning/privacy/what-is-fedramp/">FedRAMP Authorization</a> certifications, and we are doing a similar evaluation again to transition all of our internal systems to PQC.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/7nudyLXlDPKH38ajGe8gcz/b72ea0c5f415840fe9d7246dee00da0d/image2-16.png" />
            
            </figure>
    <div>
      <h3>How we are setting ourselves up for the future of quantum computing</h3>
      <a href="#how-we-are-setting-ourselves-up-for-the-future-of-quantum-computing">
        
      </a>
    </div>
    <p>Here’s a sneak preview of the path that we are developing right now to fully secure Cloudflare itself against the cryptographic threat of quantum computers. We can break that path down into three parts: internal systems, <a href="https://www.cloudflare.com/learning/security/glossary/what-is-zero-trust/">zero trust</a>, and open source contributions.</p><p>The first part of our path to full PQC adoption at Cloudflare is around all of our connections. The connection between yourself and Cloudflare is just one part of the larger path of the connection. Inside our internal systems we are implementing two significant upgrades in 2023 to ensure that they are PQC secure as well.</p><p>The first is that we use BoringSSL for a substantial amount of connections. We currently use our fork and we are excited that upstream support for Kyber is underway. Any additional internal connections that use a different cryptographic system are being upgraded as well. The second major upgrade we are making is to shift the remaining internal connections that use TLS 1.2 to TLS 1.3. This combination of Kyber and TLS 1.3 will make our internal connections faster and more secure, even though we use a hybrid of classical and post-quantum secure cryptography. It’s a speed and security win-win. <a href="/the-tls-post-quantum-experiment/">And we proved this power house combination would provide that speed and security over three and half years ago thanks to the groundbreaking work of Cloudflare Research and Google.</a></p><p>The next part of that path is all about using PQC and zero trust as allies together. As we think about the security posture of tomorrow being based around post-quantum cryptography, we have to look at the other critical security paradigm being implemented today: zero trust. Today, the zero trust vendor landscape is littered with products that fail to support common protocols like IPv6 and TLS 1.2, let alone the next generation of protocols like TLS 1.3 and QUIC that enable PQC. So many middleboxes struggle under the load of today’s modern protocols. They artificially <a href="/monsters-in-the-middleboxes/">downgrade connections and break end user security</a> all in the name of inspecting traffic because they don’t have a better solution. Organizations big and small struggled to support customers that wanted the highest possible performance and security, while also keeping their businesses safe, because of the resistance of these vendors to adapt to modern standards. We do not want to repeat the mistakes of the past. We are planning and evaluating the needed upgrades to all of our zero trust products to support PQC out of the box. We believe that zero trust and post-quantum cryptography are not at odds with one another, but rather together are the future standard of security.</p><p>Finally, it’s not enough for us to do this for ourselves and for our customers. The Internet is only as strong as its weakest links in the connection chains that network us all together. Every connection on the Internet needs the strongest possible encryption so that businesses can be secure, and everyday users can be ensured of their privacy. We believe that this core technology should be vendor agnostic and open to everyone. To help make that happen our final part of the path is all about contributing to open source projects. We have already been focused on releases to CIRCL. <a href="https://github.com/cloudflare/circl">CIRCL</a> (Cloudflare Interoperable, Reusable Cryptographic Library) is a collection of cryptographic primitives written in Go. The goal of this library is to be used as a tool for experimental deployment of cryptographic algorithms targeting post quantum.</p><p>Later on this year we will be publishing as open source a set of easy to adopt, vendor-neutral roadmaps to help you upgrade your own systems to be secure against the future today. We want the security and privacy created by post quantum crypto to be accessible and free for everyone. We will also keep writing extensively about our post quantum journey. To learn more about how you can turn on PQC today, and how we have been building post-quantum cryptography at Cloudflare, please check out these resources:</p><ul><li><p><a href="/post-quantum-for-all/">Defending against future threats: Cloudflare goes post-quantum</a></p></li><li><p><a href="/post-quantum-tunnel/">Introducing post-quantum Cloudflare Tunnel</a></p></li><li><p><a href="/nist-post-quantum-surprise/">NIST’s pleasant post-quantum surprise</a></p></li><li><p><a href="/post-quantumify-cloudflare/">Post-quantumify internal services: Logfwrdr, Tunnel, and gokeyless</a></p></li><li><p><a href="/post-quantum-taxonomy/">The post-quantum state: a taxonomy of challenges</a></p></li><li><p><a href="/the-tls-post-quantum-experiment/">The TLS Post-Quantum Experiment</a></p></li></ul><p></p> ]]></content:encoded>
            <category><![CDATA[Security Week]]></category>
            <category><![CDATA[Post-Quantum]]></category>
            <category><![CDATA[Research]]></category>
            <guid isPermaLink="false">07cQYHrLiDpSMFd2bEEzf</guid>
            <dc:creator>Wesley Evans</dc:creator>
            <dc:creator>Bas Westerbaan</dc:creator>
        </item>
        <item>
            <title><![CDATA[No, AI did not break post-quantum cryptography]]></title>
            <link>https://blog.cloudflare.com/kyber-isnt-broken/</link>
            <pubDate>Thu, 16 Mar 2023 13:00:00 GMT</pubDate>
            <description><![CDATA[ The recent news reports of AI cracking post-quantum cryptography are greatly exaggerated. In this blog, we take a deep dive into the world of side-channel attacks and how AI has been used for more than a decade already to aid it ]]></description>
            <content:encoded><![CDATA[ <p></p><p><a href="https://www.securityweek.com/ai-helps-crack-a-nist-recommended-post-quantum-encryption-algorithm/">News coverage</a> of a recent paper caused a bit of a stir with this headline: “<a href="https://www.securityweek.com/ai-helps-crack-a-nist-recommended-post-quantum-encryption-algorithm/">AI Helps Crack NIST-Recommended Post-Quantum Encryption Algorithm</a>”. The news article claimed that <a href="https://pq-crystals.org/kyber/index.shtml">Kyber</a>, the encryption algorithm in question, <a href="/post-quantum-for-all/">which we have deployed world-wide</a>, had been “broken.” Even more dramatically, the news article claimed that “the revolutionary aspect of the research was to apply deep learning analysis to side-channel differential analysis”, which seems aimed to scare the reader into wondering what will <a href="https://www.cloudflare.com/learning/ai/what-is-artificial-intelligence/">Artificial Intelligence (AI)</a> break next?</p><p>Reporting on the paper has been wildly inaccurate: <b>Kyber is not broken</b> and AI has been used for more than a decade now to aid side-channel attacks. To be crystal clear: our concern is with the news reporting around the paper, not the quality of the paper itself. In this blog post, we will explain how AI is actually helpful in cryptanalysis and dive into the <a href="https://eprint.iacr.org/2022/1713">paper</a> by Dubrova, Ngo, and Gärtner (DNG), that has been misrepresented by the news coverage. We’re honored to have Prof. Dr. <a href="https://www.cs.ru.nl/~lejla/">Lejla Batina</a> and Dr. <a href="https://www.ru.nl/en/people/picek-s">Stjepan Picek</a>, world-renowned experts in the field of applying AI to side-channel attacks, join us on this blog.</p><p>We start with some background, first on side-channel attacks and then on Kyber, before we dive into the paper.</p>
    <div>
      <h2>Breaking cryptography</h2>
      <a href="#breaking-cryptography">
        
      </a>
    </div>
    <p>When one thinks of breaking cryptography, one imagines a room full of mathematicians puzzling over minute patterns in intercepted messages, aided by giant computers, until they figure out the key. Famously in World War II, the Nazis’ Enigma cipher machine code was completely broken in this way, allowing the Allied forces to read along with their communications.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/oJxQ8srTTh2HafYmNbKaP/c07d942fdda653c963fd047756e8b6f4/image7-5.png" />
            
            </figure><p>It’s exceedingly rare for modern established cryptography to get broken head-on in this way. The last catastrophically broken cipher was RC4, designed in 1987, while AES, designed in 1998, stands proud with barely a scratch. The last big break of a cryptographic hash was on SHA-1, designed in 1995, while SHA-2, published in 2001, remains untouched in practice.</p><p>So what to do if you can’t break the cryptography head-on? Well, you get clever.</p>
    <div>
      <h2>Side-channel attacks</h2>
      <a href="#side-channel-attacks">
        
      </a>
    </div>
    <p>Can you guess the pin code for this gate?</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/1UhJuQgQaoWjZ4JHSAHff6/0bebc7553f411c4246a750e39b1f627f/image4-1.jpg" />
            
            </figure><p>You can clearly see that some of the keys are more worn than the others, suggesting heavy use. This observation gives us some insight into the correct pin, namely the digits. But the correct order is not immediately clear. It might be 1580, 8510, or even 115085, but it’s a lot easier than trying every possible pin code. This is an example of a <i>side-channel attack</i>. Using the security feature (entering the PIN) had some unintended consequences (abrading the paint), which leaks information.</p><p>There are many different types of side channels, and which one you should worry about depends on the context. For instance, the sounds your keyboard makes as you type <a href="https://dl.acm.org/doi/abs/10.1145/1609956.1609959">leaks what you write</a>, but you should not worry about that if no one is listening in.</p>
    <div>
      <h3>Remote timing side channel</h3>
      <a href="#remote-timing-side-channel">
        
      </a>
    </div>
    <p>When writing cryptography in software, one of the best known side channels is the time it takes for an algorithm to run. For example, let’s take the classic example of creating an RSA signature. Grossly simplified, to sign a message <i>m</i> with private key <i>d</i>, we compute the signature <i>s</i> as m<sup>d</sup> (mod n). Computing the exponent of a big number is hard, but luckily, because we’re doing modular arithmetic, there is the <a href="https://youtu.be/cbGB__V8MNk">square-and-multiply</a> trick. Here is a naive implementation in pseudocode:</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/4ugGnB4EmViLt8e9E97YyJ/d204b867a50f5470d0ae680f4eea47fd/Screenshot-2023-03-16-at-12.35.40.png" />
            
            </figure><p>The algorithm loops over the bits of the secret key, and does a <i>multiply</i> step if the current bit is a 1. Clearly, the runtime depends on the secret key. Not great, but if the attacker can only time the full run, then they only learn the number of 1s in the secret key. The typical catastrophic timing attack against RSA instead is hidden behind the “<b>mod</b> n”. In a naive implementation this modular reduction is slower if the number being reduced is larger or equal <i>n</i>. This <a href="https://www.cs.sjsu.edu/faculty/stamp/students/article.html#:~:text=Timing%20attacks%20are%20a%20form,performed%20or%20the%20media%20used.">allows</a> an attacker to send specially crafted messages to tease out the secret key bit-by-bit and similar attacks are <a href="https://crypto.stanford.edu/~dabo/papers/ssl-timing.pdf">surprisingly practical</a>.</p><p>Because of this, the mantra is: cryptography should run in “constant time”. This means that the runtime does not depend on any secret information. In our example, to remove the first timing issue, one would replace the if-statement with something equivalent to:</p>
            <pre><code>	s = ((s * powerOfM) mod n) * bit(s, i) + s * (1 - bit(s, i))</code></pre>
            <p>This ensures that the multiplication is always done. Similar countermeasures prevent practically all remote timing attacks.</p>
    <div>
      <h3>Power side-channel</h3>
      <a href="#power-side-channel">
        
      </a>
    </div>
    <p>The story is quite different for power side-channel attacks. Again, the classic example is RSA signatures. If we hook up an oscilloscope to a smartcard that uses the naive algorithm from before, and measure the power usage while it signs, we can read off the private key by eye:</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/5BgQG934ghuxV9D6JoSF0H/14c882de669ff23990f96a1281304e3f/image1-33.png" />
            
            </figure><p>Even if we use a constant-time implementation, there are still minute changes in power usage that can be detected. The underlying issue is that hardware gates that switch use more power than those that don’t. For instance, computing 127 + 64 takes more energy than 64 + 64.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/3U58Xc7isXGpdg2bHxhTRA/c8b3ea9d01d38f9af644a2cd51079caf/image3-25.png" />
            
            </figure><p><i>127+64 and 64+64 in binary. There are more switched bits in the first.</i></p><p><b>Masking</b>A common countermeasure against power side-channel leakage is <i>masking</i>. This means that before using the secret information, it is split randomly into <i>shares</i>. Then, the brunt of the computation is done on the shares, which are finally recombined.</p><p>In the case of RSA, before creating a new signature, one can generate a random <i>r</i> and compute m<sup>d+r</sup> (mod n) and m<sup>r</sup> (mod n) separately. From these, the final signature m<sup>d</sup> (mod n) can be computed with some extra care.</p><p>Masking is not a perfect defense. The parts where shares are created or recombined into the final value are especially vulnerable. It does make it harder for the attacker: they will need to collect more power traces to cut through the noise. In our example we used two shares, but we could bump that up even higher. There is a trade-off between power side-channel resistance and implementation cost.</p><p>One of the challenging parts in the field is to estimate how much secret information is actually leaked through the traces, and how to extract it. Here machine learning enters the picture.</p>
    <div>
      <h3>Machine learning: extracting the key from the traces</h3>
      <a href="#machine-learning-extracting-the-key-from-the-traces">
        
      </a>
    </div>
    <p><a href="https://www.cloudflare.com/learning/ai/what-is-machine-learning/">Machine learning</a>, of which deep learning is a part, represents the capability of a system to acquire its knowledge by extracting patterns from data —  in this case, the secrets from the power traces. Machine learning algorithms can be divided into several categories based on their learning style. The most popular machine learning algorithms in side-channel attacks follow the supervised learning approach. In supervised learning, there are two phases: 1) training, where a machine learning model is trained based on known labeled examples (e.g., side-channel measurements where we know the key) and 2) testing, where, based on the trained model and additional side-channel measurements (now, with an unknown key), the attacker guesses the secret key. A common depiction of such attacks is given in the figure below.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/4V2bcSsbSJtCmorq8HaUzc/1545a94c79aef5d72b6acd8573cf5f07/image5-3.png" />
            
            </figure><p>While the threat model may sound counterintuitive, it is actually not difficult to imagine that the attacker will have access (and control) of a device similar to the one being attacked.</p><p>In side-channel analysis, the attacks following those two phases (training and testing) are called profiling attacks.</p><p>Profiling attacks are not new. The first such attack, called the <a href="https://link.springer.com/chapter/10.1007/3-540-36400-5_3">template attack</a>, appeared in 2002. Diverse <a href="https://link.springer.com/article/10.1007/s13389-011-0023-x">machine learning techniques</a> have been used since around 2010, all reporting good results and the ability to break various targets. The big breakthrough came in 2016, when the side-channel community started using <a href="https://www.cloudflare.com/learning/ai/what-is-deep-learning/">deep learning</a>. It greatly increased the effectiveness of power side-channel attacks both against symmetric-key and public-key cryptography, even if the targets were protected with, for instance, masking or some other countermeasures. To be clear: it doesn’t magically figure out the key, but it gets much better at extracting the leaked bits from a smaller number of power traces.</p><p>While machine learning-based side-channel attacks are powerful, they have limitations. Carefully implemented countermeasures make the attacks more difficult to conduct. Finding a good machine learning model that can break a target can be far from trivial: this phase, commonly called tuning, can last weeks on powerful clusters.</p><p>What will the future bring for machine learning/AI in side-channel analysis? Counter intuitively, we would like to see more powerful and easy to use attacks. You’d think that would make us worse off, but to the contrary it will allow us to better estimate how much actual information is leaked by a device. We also hope that we will be able to better understand why certain attacks work (or not), so that more cost-effective countermeasures can be developed. As such, the future for AI in side-channel analysis is bright especially for security evaluators, but we are still far from being able to break most of the targets in real-world applications.</p>
    <div>
      <h2>Kyber</h2>
      <a href="#kyber">
        
      </a>
    </div>
    <p>Kyber is a <a href="/the-quantum-menace/">post-quantum</a> (PQ) key encapsulation method (KEM). After a six-year worldwide competition, the <a href="https://www.nist.gov/">National Institute of Standards and Technology</a> (NIST) <a href="/nist-post-quantum-surprise/">selected</a> Kyber as the post-quantum key agreement they will standardize. The goal of a key agreement is for two parties that haven’t talked to each other before to agree securely on a <i>shared key</i> they can use for symmetric encryption (such as <a href="/it-takes-two-to-chacha-poly/">Chacha20Poly1305</a>). As a KEM, it works slightly different with different terminology than a traditional <a href="https://developers.cloudflare.com/internet/protocols/tls#ephemeral-diffie-hellman-handshake">Diffie–Hellman</a> key agreement (such as X25519):</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/Dbor76rFhzvg1PhuCI0xT/9bbd95bd542a065a679b5b27e2c188cb/image9-3.png" />
            
            </figure><p>When connecting to a website the client first generates a new <i>ephemeral</i> keypair that consists of a <i>private</i> and <i>public key</i>. It sends the public key to the server. The server then <i>encapsulates</i>  a shared key with that public key, which gives it a random <i>shared key</i>, which it keeps, and a ciphertext (in which the shared key is hidden), which the server returns to the client. The client can then use its private key to <i>decapsulate</i> the shared key from the ciphertext. Now the server and client can communicate with each other using the shared key.</p><p>Key agreement is particularly important to make secure against attacks of quantum computers. The reason is that an attacker can store traffic today, and crack the key agreement in the future, revealing the shared key and all communication encrypted with it afterwards. That is why we have already <a href="/post-quantum-for-all/">deployed support</a> for Kyber across our network.</p>
    <div>
      <h2>The DNG paper</h2>
      <a href="#the-dng-paper">
        
      </a>
    </div>
    <p>With all the background under our belt, we’re ready to take a look at the <a href="https://eprint.iacr.org/2022/1713.pdf">DNG paper</a>. The authors perform a power side-channel attack on their own masked implementation of Kyber with six shares.</p>
    <div>
      <h3>Point of attack</h3>
      <a href="#point-of-attack">
        
      </a>
    </div>
    <p>They attack the <i>decapsulation</i> step. In the decapsulation step, after the shared key is extracted, it’s encapsulated again, and compared against the original ciphertext to detect tampering. For this <i>re-encryption</i> step, the precursor of the shared key—let’s call it the secret—is encoded bit-by-bit into a polynomial. To be precise, the 256-bit <i>secret</i> needs to be converted to a polynomial with 256 coefficients <i>modulo</i> q=3329, where the i<sup>th</sup> coefficient is (q+1)/2 if the ith b<sup>th</sup> is 1 and zero otherwise.</p><p>This function sounds simple enough, but creating a masked version is tricky. The rub is that the natural way to create shares of the <i>secret</i> is to have shares that <i>xor</i> together to be the secret, and that the natural way to share polynomials is to have shares that <i>add</i> together to get to the intended polynomial.</p><p>This is the two-shares implementation of the conversion that the DNG paper attacks:</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/7GjnFQyhXsLRqHJqgypOpx/c93d159488b4ba8ef043e1049eb21649/image8.png" />
            
            </figure><p>The code loops over the bits of the two shares. For each bit, it creates a mask, that’s <code>0xffff</code> if the bit was 1 and 0 otherwise. Then this mask is used to add (q+1)/2 to the polynomial share if appropriate. Processing a 1 will use a bit more power. It doesn’t take an AI to figure out that this will be a leaky function. In fact, this pattern was pointed out to be weak <a href="https://eprint.iacr.org/2016/923">back in 2016</a>, and explicitly mentioned to be a risk for masked Kyber <a href="https://eprint.iacr.org/2016/923">in 2020</a>. Apropos, one way to mitigate this, is to process multiple bits at once — for the state of the art, tune into <a href="https://csrc.nist.gov/Projects/post-quantum-cryptography/workshops-and-timeline/pqc-seminars">April 2023’s NIST PQC seminar</a>. For the moment, let’s allow the paper its weak target.</p><p>The authors do not claim any fundamentally new attack here. Instead, they improve the effectiveness of the attack in two ways: the way they train the <a href="https://www.cloudflare.com/learning/ai/what-is-neural-network/">neural network</a>, and how to use multiple traces more effectively by changing the ciphertext sent. So, what did they achieve?</p>
    <div>
      <h3>Effectiveness</h3>
      <a href="#effectiveness">
        
      </a>
    </div>
    
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/1nVauArEr9f940eJstkDu5/8c793320acb617a3ae0436908196e546/image6-7.png" />
            
            </figure><p>To test the attack, they use a <a href="https://www.newae.com/products/NAE-CW1173#:~:text=The%20ChipWhisperer%2DLite%20integrates%20hardware,all%20into%20a%20single%20board.">Chipwhisperer-lite</a> board, which has a Cortex M4 CPU, which they downclock to 24Mhz. Power usage is sampled at 24Mhz, with high 10-bit precision.</p><p>To train the neural networks, 150,000 power traces are collected for decapsulation of different ciphertexts (with known shared key) for the same KEM keypair. This is already a somewhat unusual situation for a real-world attack: for key agreement KEM keypairs are ephemeral; generated and used only once. Still, there are certainly legitimate use cases for long-term KEM keypairs, such as <a href="/kemtls-post-quantum-tls-without-signatures/">for authentication</a>, <a href="/hybrid-public-key-encryption/">HPKE</a>, and in particular <a href="/encrypted-client-hello/">ECH</a>.</p><p>The training is a key step: different devices even from the same manufacturer can have wildly different power traces running the same code. Even if two devices are of the same model, their power traces might still differ significantly.</p><p>The main contribution highlighted by the authors is that they train their neural networks to attack an implementation with 6 shares, by starting with a neural network trained to attack an implementation with 5 shares. That one can be trained from a model to attack 4 shares, and so on. Thus to apply their method, of these 150,000 power traces, one-fifth must be from an implementation with 6 shares, another one-fifth from one with 5 shares, et cetera. It seems unlikely that anyone will deploy a device where an attacker can switch between the number of shares used in the masking on demand.</p><p>Given these affordances, the attack proper can commence. The authors report that, from a single power trace of a two-share decapsulation, they could recover the shared key under these ideal circumstances with probability… 0.12%. They do not report the numbers for single trace attacks on more than two shares.</p><p>When we’re allowed multiple traces of the same decapsulation, side-channel attacks become much more effective. The second trick is a clever twist on this: instead of creating a trace of decapsulation of exactly the same message, the authors <i>rotate</i> the ciphertext to move bits of the shared key in more favorable positions. With 4 traces that are rotations of the same message, the success probability against the two-shares implementation goes up to 78%. The six-share implementation stands firm at 0.5%. When allowing 20 traces from the six-share implementation, the shared key can be recovered with an 87% chance.</p>
    <div>
      <h3>In practice</h3>
      <a href="#in-practice">
        
      </a>
    </div>
    <p>The hardware used in the demonstration might be somewhat comparable to a smart card, but it is very different from high-end devices such as smartphones, desktop computers and servers. Simple power analysis side-channel attacks on even just embedded 1GHz processors are much more challenging, requiring <a href="https://eprint.iacr.org/2015/727.pdf">tens of thousands of traces</a> using a high-end oscilloscope connected close to the processor. There are much better avenues for attack with this kind of physical access to a server: just connect the oscilloscope to the memory bus.</p><p>Except for especially vulnerable applications, such as smart cards and HSMs, power-side channel attacks are widely considered infeasible. Although sometimes, when the planets align,  an especially potent power side-channel attack can be turned into a remote timing attack due to throttling, as demonstrated by <a href="/hertzbleed-explained/">Hertzbleed</a>. To be clear: the present attack does not even come close.</p><p>And even for these vulnerable applications, such as smart cards, this attack is not particularly potent or surprising. In the field, it is not a question of whether a masked implementation leaks its secrets, because it always does. It’s a question of how hard it is to actually pull off. Papers such as the DNG paper contribute by helping manufacturers estimate how many countermeasures to put in place, to make attacks too costly. It is not the first paper studying power side-channel attacks on Kyber and it will not be the last.</p>
    <div>
      <h2>Wrapping up</h2>
      <a href="#wrapping-up">
        
      </a>
    </div>
    <p>AI did not completely undermine a new wave of cryptography, but instead is a helpful tool to deal with noisy data and discover the vulnerabilities within it. There is a big difference between a direct break of cryptography and a power side-channel attack. Kyber is not broken, and the presented power side-channel attack is not cause for alarm.</p> ]]></content:encoded>
            <category><![CDATA[Security Week]]></category>
            <category><![CDATA[Post-Quantum]]></category>
            <category><![CDATA[Cryptography]]></category>
            <category><![CDATA[Research]]></category>
            <category><![CDATA[Guest Post]]></category>
            <guid isPermaLink="false">5nkxnUeSeZlhciKkqTAbah</guid>
            <dc:creator>Lejla Batina (Guest Author)</dc:creator>
            <dc:creator>Stjepan Picek (Guest Author)</dc:creator>
            <dc:creator>Bas Westerbaan</dc:creator>
        </item>
        <item>
            <title><![CDATA[Defending against future threats: Cloudflare goes post-quantum]]></title>
            <link>https://blog.cloudflare.com/post-quantum-for-all/</link>
            <pubDate>Mon, 03 Oct 2022 13:01:00 GMT</pubDate>
            <description><![CDATA[ The future of a private and secure Internet is at stake; that is why today we have enabled post-quantum cryptography support for all our customers ]]></description>
            <content:encoded><![CDATA[ <p>There is an expiration date on the cryptography we use every day. It’s not easy to read, but somewhere <a href="https://globalriskinstitute.org/download/quantum-threat-timeline-report-2021-full-report/">between 15 or 40 years</a>, a sufficiently powerful quantum computer is expected to be built that will be <a href="https://en.wikipedia.org/wiki/Shor%27s_algorithm">able to decrypt</a> essentially any encrypted data on the Internet today.</p><p>Luckily, there is a solution: <a href="https://www.cloudflare.com/learning/ssl/quantum/what-is-post-quantum-cryptography/">post-quantum (PQ) cryptography</a> has been designed to be secure against the threat of quantum computers. Just three months ago, in July 2022, after a six-year worldwide competition, the US National Institute of Standards and Technology (NIST), known for AES and SHA2, <a href="/nist-post-quantum-surprise/">announced</a> which post-quantum cryptography they will standardize. NIST plans to publish the final standards in 2024, but we want to help drive early adoption of post-quantum cryptography.</p><p>Starting today, as a beta service, <b>all</b> websites and APIs served through Cloudflare support post-quantum hybrid key agreement. This is on by default<sup>1</sup>; no need for an opt-in. This means that if your browser/app supports it, the connection to our network is also secure against any future quantum computer.</p><p>We offer this post-quantum cryptography free of charge: we believe that post-quantum security should be the new baseline for the Internet.</p><p>Deploying post-quantum cryptography seems like a no-brainer with quantum computers on the horizon, but it’s not without risks. To start, this is new cryptography: even with years of scrutiny, it is not inconceivable that a catastrophic attack might still be discovered. That is why we are deploying <i>hybrids</i>: a combination of a tried and tested key agreement together with a new one that adds post-quantum security.</p><p>We are primarily worried about what might seem mere practicalities. Even though the protocols used to secure the Internet are designed to allow smooth transitions like this, in reality there is a lot of buggy code out there: trying to create a post-quantum secure connection might fail for many reasons — for example a middlebox being confused about the larger post-quantum keys and other reasons we have yet to observe because these post-quantum key agreements are brand new. It’s because of these issues that we feel it is important to deploy post-quantum cryptography early, so that together with browsers and other clients we can find and work around these issues.</p><p>In this blog post we will explain how TLS, the protocol used to secure the Internet, is designed to allow a smooth and secure migration of the cryptography it uses. Then we will discuss the technical details of the post-quantum cryptography we have deployed, and how, in practice, this migration might not be that smooth at all. We finish this blog post by explaining how you can build a better, post-quantum secure, Internet by helping us test this new generation of cryptography.</p>
    <div>
      <h2>TLS: Transport Layer Security</h2>
      <a href="#tls-transport-layer-security">
        
      </a>
    </div>
    <p>When you’re browsing a website using a <i>secure connection</i>, whether that’s using HTTP/1.1 or <a href="/quic-version-1-is-live-on-cloudflare/">QUIC</a>, you are using the Transport Layer Security (<b>TLS</b>) protocol under the hood. There are two major versions of TLS <a href="https://radar.cloudflare.com/adoption-and-usage">in common use today</a>: the new <a href="/rfc-8446-aka-tls-1-3/">TLS 1.3</a> (~90%) and the older TLS 1.2 (~10%), which is on the decline.</p><p>TLS 1.3 is a <a href="/rfc-8446-aka-tls-1-3/">huge improvement</a> over TLS 1.2: it’s faster, more secure, simpler and more flexible in just the right places. This makes it easier to add post-quantum security to TLS 1.3 compared to 1.2. For the moment, we will leave it at that: we’ve only added post-quantum support to TLS 1.3.</p><p>So, what is TLS all about? The goal is to set up a connection between a browser and website such that</p><ul><li><p><b>Confidentiality and integrity</b>, no one can read along or tamper with the data undetected.</p></li><li><p><b>Authenticity</b> you know you’re connected to the right website; not an imposter.</p></li></ul>
    <div>
      <h3>Building blocks: AEAD, key agreement and signatures</h3>
      <a href="#building-blocks-aead-key-agreement-and-signatures">
        
      </a>
    </div>
    <p>Three different types of cryptography are used in TLS to reach this goal.</p><ul><li><p><b>Symmetric encryption</b>, or more precisely <i>Authenticated Encryption With Associated Data</i> (AEAD), is the workhorse of cryptography: it’s used to ensure confidentiality and integrity. This is a straight-forward kind of encryption: there is a <i>single key</i> that is used to encrypt and decrypt the data. Without the right key you cannot decrypt the data and any tampering with the encrypted data results in an error while decrypting.</p></li></ul><p>In TLS 1.3, <a href="/do-the-chacha-better-mobile-performance-with-cryptography/">ChaCha20-Poly1305</a> and AES128-GCM are in common use today. What about quantum attacks? At first glance, it looks like we need to switch to 256-bit symmetric keys to defend against <a href="https://en.wikipedia.org/wiki/Grover%27s_algorithm">Grover’s algorithm</a>. In practice, however, Grover’s algorithm <a href="/nist-post-quantum-surprise/#post-quantum-security-levels">doesn’t parallelize well</a>, so the currently deployed AEADs will serve just fine.</p><p>So if we can agree on a shared key to use with symmetric encryption, we’re golden. But how to get to a shared key? You can’t just pick a key and send it to the server: anyone listening in would know the key as well. One might think it’s an impossible task, but this is where the magic of asymmetric cryptography helps out:</p><ul><li><p>A <b>key agreement</b>, also called <i>key exchange</i> or <i>key distribution</i>, is a cryptographic protocol with which two parties can agree on a shared key without an eavesdropper being able to learn anything. Today the <a href="https://cr.yp.to/ecdh.html">X25519</a> Elliptic Curve <a href="https://developers.cloudflare.com/internet/protocols/tls#ephemeral-diffie-hellman-handshake">Diffie–Hellman</a> protocol (ECDH) is the de facto standard key agreement used in TLS 1.3. The security of X25519 is based on the <a href="https://en.wikipedia.org/wiki/Discrete_logarithm">discrete logarithm problem</a> for elliptic curves, which is vulnerable to quantum attacks, as it is easily solved by a cryptographically relevant quantum computer using <a href="https://en.wikipedia.org/wiki/Shor%27s_algorithm">Shor’s algorithm</a>. The solution is to use a post-quantum key agreement, such as <a href="https://pq-crystals.org/kyber/index.shtml">Kyber</a>.</p></li></ul><p>A key agreement only protects against a passive attacker. An active attacker, that can intercept and modify messages (<a href="https://en.wikipedia.org/wiki/Man-in-the-middle_attack">MitM</a>), can establish separate shared keys with both the server and the browser, re-encrypting all data passing through. To solve this problem, we need the final piece of cryptography.</p><ul><li><p>With a <b>digital</b> <b>signature</b> algorithm, such as <a href="https://en.wikipedia.org/wiki/RSA_(cryptosystem)">RSA</a> or <a href="https://www.cloudflare.com/learning/dns/dnssec/ecdsa-and-dnssec/">ECDSA</a>, there are two keys: a <i>public</i> and a <i>private key</i>. Only with the private key, one can create a <i>signature</i> for a message. Anyone with the corresponding public key can check whether a signature is indeed valid for a given message. These digital signatures are at the heart of <a href="https://www.cloudflare.com/application-services/products/ssl/"><i>TLS certificates</i></a> that are used to authenticate websites. Both RSA and ECDSA are vulnerable to quantum attacks. We haven’t replaced those with post-quantum signatures, yet. The reason is that authentication is less urgent: we only need to have them replaced by the time a sufficiently large quantum computer is built, whereas any data secured by a vulnerable key agreement today can be stored and decrypted in the future. Even though we have more time, deploying post-quantum authentication will be <a href="/sizing-up-post-quantum-signatures/">quite challenging</a>.</p></li></ul><p>So, how do these building blocks come together to create TLS?</p><h2>High-level overview of TLS 1.3</h2><p>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 a list of the AEADs, signature algorithms, and key agreement methods it supports. To remove a roundtrip, 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).</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/4jeNtG1jP4LRmICiNeBUIG/87c30c89aeef2ce319bb25c0c5cddc2d/image4.png" />
            
            </figure><p>Protocol flow for server-authenticated TLS 1.3 with a supported client keyshare on the left and a HelloRetryRequest on the right.</p>
    <div>
      <h4><b>Key agreement</b></h4>
      <a href="#key-agreement">
        
      </a>
    </div>
    <p>Before we explain the rest of this interaction, let’s dig into the key agreement: what is a keyshare? The way the key agreement for Kyber and X25519 work <a href="/nist-post-quantum-surprise/#kem-versus-diffie-hellman">is different</a>: the first is a Key Encapsulation Mechanism (KEM), while the latter is a Diffie–Hellman (DH) style agreement. The latter is more flexible, but for TLS it doesn’t make a difference.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/25zN3n7EymPx0ZLTOKBEO6/71928fb621191c1de4883f77b1e9cae5/image3.png" />
            
            </figure><p>The shape of a KEM and Diffie–Hellman key agreement in TLS-compatible handshake is the same.</p><p>In both cases the client sends a <i>client keyshare</i> to the server. From this <i>client keyshare</i> 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.</p><p>Going back to the TLS 1.3 flow: when the server receives the <i>ClientHello</i> message it picks an AEAD (cipher), signature algorithm and client keyshare that it supports. It replies with a <i>ServerHello</i> message that contains the chosen AEAD and the <i>server keyshare</i> for the selected key agreement. With the AEAD and shared key locked in, the server starts encrypting data (shown with blue boxes).</p>
    <div>
      <h4><b>Authentication</b></h4>
      <a href="#authentication">
        
      </a>
    </div>
    <p>Together with the AEAD and server keyshare, the server sends a signature, the <i>handshake signature</i>, on the transcript of the communication so far together with a <a href="https://www.cloudflare.com/learning/ssl/what-is-an-ssl-certificate/"><i>certificate</i></a><i> (chain)</i> for the public key that it used to create the signature. This allows the client to authenticate the server: it checks whether it trusts the <i>certificate authority</i> (e.g. <a href="https://letsencrypt.org/">Let’s Encrypt</a>) that certified the public key and whether the signature verifies for the messages it sent and received so far. This not only authenticates the server, but it also protects against downgrade attacks.</p>
    <div>
      <h4><b>Downgrade protection</b></h4>
      <a href="#downgrade-protection">
        
      </a>
    </div>
    <p>We cannot upgrade all clients and servers to post-quantum cryptography at once. Instead, there will be a transition period where only some clients and some servers support post-quantum cryptography. The key agreement negotiation in TLS 1.3 allows this: during the transition servers and clients will still support non post-quantum key agreements, and can fall back to it if necessary.</p><p>This flexibility is great, but also scary: if both client and server support post-quantum key agreement, we want to be sure that they also negotiate the post-quantum key agreement. This is the case in TLS 1.3, but it is not obvious: the keyshares, the chosen keyshare and the list of supported key agreements are all sent in plain text. Isn’t it possible for an attacker in the middle to remove the post-quantum key agreements? This is called a <i>downgrade attack</i>.</p><p>This is where the transcript comes in: the handshake signature is taken over all messages received and sent by the server so far. This includes the supported key agreements and the key agreement that was picked. If an attacker changes the list of supported key agreements that the client sends, then the server will not notice. However, the client checks the server’s handshake signature against the list of supported key agreements it has actually sent and thus will detect the mischief.</p><p>The downgrade attack problems are <a href="https://eprint.iacr.org/2018/298">much</a> <a href="https://eprint.iacr.org/2016/072.pdf">more</a> <a href="https://www.rfc-editor.org/rfc/rfc7627">complicated</a> for TLS 1.2, which is one of the reasons we’re hesitant to retrofit post-quantum security in TLS 1.2.</p>
    <div>
      <h4><b>Wrapping up the handshake</b></h4>
      <a href="#wrapping-up-the-handshake">
        
      </a>
    </div>
    <p>The last part of the server’s response is <i>“server finished”,</i> a <i>message authentication code</i> (MAC) on the whole transcript so far. Most of the work has been done by the handshake signature, but in other operating modes of TLS without handshake signature, such as session resumption, it’s important.</p><p>With the chosen AEAD and server keyshare, the client can compute the shared key and decrypt and verify the certificate chain, handshake signature and handshake MAC. We did not mention it before, but the shared key is not used directly for encryption. Instead, for good measure, <a href="https://www.rfc-editor.org/rfc/rfc8446.html#page-93">it’s mixed together</a> with communication transcripts, to derive several specific keys for use during the handshake and the main connection afterwards.</p><p>To wrap up the handshake, the client sends its own handshake MAC, and can then proceed to send application-specific data encrypted with the keys derived during the handshake.</p>
    <div>
      <h4><b>Hello! Retry Request?</b></h4>
      <a href="#hello-retry-request">
        
      </a>
    </div>
    <p>What we just sketched is the desirable flow where the client sends a keyshare that is supported by the server. That might not be the case. If the server doesn’t accept any key agreements advertised by the client, then it will tell the client and abort the connection.</p>If there is a key agreement that both support, but for which the client did not send a keyshare, then the server will respond with a HelloRetryRequest (HRR) message requesting a keyshare of a specific key agreement that the client supports as shown <a href="#tls-anchor">on the diagram on the right</a>. In turn, the client responds with a new ClientHello with the selected keyshare.
<p></p><p>This is not the whole story: a server is also allowed to send a <i>HelloRetryRequest</i> to request a different key agreement that it prefers over those for which the client sent shares. For instance, a server can send a <i>HelloRetryRequest</i> to a post-quantum key agreement if the client supports it, but didn’t send a keyshare for it.</p><p>_HelloRetryRequest_s are rare today. Almost every server supports the X25519 key-agreement and almost every client (98% today) sends a X25519 keyshare. Earlier P-256 was the de facto standard and for a long time many browsers would send both a P-256 and X25519 keyshare to prevent a HelloRetryRequest. As we will discuss later, we might not have the luxury to send two post-quantum keyshares.</p>
    <div>
      <h4><b>That’s the theory</b></h4>
      <a href="#thats-the-theory">
        
      </a>
    </div>
    <p>TLS 1.3 is designed to be flexible in the cryptography it uses without sacrificing security or performance, which is convenient for our migration to post-quantum cryptography. That is the theory, but there are some serious issues in practice — we’ll go into detail later on. But first, let’s check out the post-quantum key agreements we’ve deployed.</p>
    <div>
      <h3>What we deployed</h3>
      <a href="#what-we-deployed">
        
      </a>
    </div>
    <p>Today we have enabled support for the <b>X25519Kyber512Draft00</b> and <b>X25519Kyber768Draft00</b> key agreements using TLS identifiers 0xfe30 and 0xfe31 respectively. These are exactly the same key agreements <a href="/experiment-with-pq/">we enabled</a> on a limited number of zones this July.</p><p>These two key agreements are a combination, a <a href="https://datatracker.ietf.org/doc/draft-stebila-tls-hybrid-design/"><b>hybrid</b></a>, of the classical <a href="https://www.rfc-editor.org/rfc/rfc8410">X25519</a> and the new post-quantum Kyber512 and Kyber768 respectively and in that order. That means that even if Kyber turns out to be insecure, the connection remains as secure as X25519.</p><p><a href="https://pq-crystals.org/kyber/index.shtml">Kyber</a>, for now, is the only key agreement that NIST <a href="/nist-post-quantum-surprise/">has selected</a> for standardization. Kyber is very light on the CPU: it is faster than X25519 which is already known for its speed. On the other hand, its keyshares are much bigger:</p>
<table>
<thead>
  <tr>
    <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><span>Client</span></td>
    <td><span>Server</span></td>
    <td><span>Client</span></td>
    <td><span>Server</span></td>
  </tr>
  <tr>
    <td><span>Kyber512</span></td>
    <td><span>✅</span></td>
    <td><span>800</span></td>
    <td><span>768</span></td>
    <td><span>50,000</span></td>
    <td><span>100,000</span></td>
  </tr>
  <tr>
    <td><span>Kyber768</span></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><span>X25519</span></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>
</tbody>
</table><p><i>Size and CPU performance compared between X25519 and Kyber. Performance varies considerably by hardware platform and implementation constraints and should be taken as a rough indication only.</i></p><p>Kyber is expected to change in minor, but backwards incompatible ways, before final standardization by NIST in 2024. Also, the integration with TLS, including the choice and details of the hybrid key agreement, are not yet finalized by the TLS working group. Once they are, we will adopt them promptly.</p><p>Because of this, we will not support the preliminary key agreements announced today for the long term; they’re provided as a beta service. We will post updates on our deployment on <a href="http://pq.cloudflareresearch.com">pq.cloudflareresearch.com</a> and announce it on the <a href="https://mailman3.ietf.org/mailman3/lists/pqc.ietf.org/">IETF PQC mailing list</a>.</p><p>Now that we know how TLS negotiation works in theory, and which key agreements we’re adding, how could it fail?</p>
    <div>
      <h2>Where things might break in practice</h2>
      <a href="#where-things-might-break-in-practice">
        
      </a>
    </div>
    
    <div>
      <h3>Protocol ossification</h3>
      <a href="#protocol-ossification">
        
      </a>
    </div>
    <p>Protocols are often designed with flexibility in mind, but if that flexibility is not exercised in practice, it’s often lost. This is called <i>protocol ossification</i>. The roll-out of TLS 1.3 <a href="/why-tls-1-3-isnt-in-browsers-yet/">was difficult</a> because of several instances of ossification. One poignant example is TLS’ version negotiation: there is a version field in the ClientHello message that indicates the latest version supported by the client. A new version was assigned to TLS 1.3, but in testing it turned out that many servers would not fallback properly to TLS 1.2, but crash the connection instead. How do we deal with ossification?</p>
    <div>
      <h4><b>Workaround</b></h4>
      <a href="#workaround">
        
      </a>
    </div>
    <p>Today, TLS 1.3 masquerades itself as TLS 1.2 down to including many legacy fields in the <i>ClientHello</i>. The actual version negotiation is moved into a new <i>extension</i> to the message. A TLS 1.2 server will ignore the new extension and ignorantly continue with TLS 1.2, while a TLS 1.3 server picks up on the extension and continues with TLS 1.3 proper.</p>
    <div>
      <h4><b>Protocol grease</b></h4>
      <a href="#protocol-grease">
        
      </a>
    </div>
    <p>How do we prevent ossification? Having learnt from this experience, browsers will regularly advertise dummy versions in this new version field, so that misbehaving servers are caught early on. This is not only done for the new version field, but in many other places in the TLS handshake, and presciently also for the key agreement identifiers. Today, 40% of browsers send two client keyshares: one X25519 and another a bogus 1-byte keyshare to keep key agreement flexibility.</p><p>This behavior is standardized in <a href="https://datatracker.ietf.org/doc/html/rfc8701">RFC 8701</a>: <i>Generate Random Extensions And Sustain Extensibility</i> (GREASE) and we call it protocol <i>greasing</i>, as in “greasing the joints” from Adam Langley’s metaphor of <a href="https://www.imperialviolet.org/2016/05/16/agility.html">protocols having rusty joints</a> in need of oil.</p><p>This keyshare grease helps, but it is not perfect, because it is the size of the keyshare that in this case causes the most concern.</p>
    <div>
      <h3>Fragmented ClientHello</h3>
      <a href="#fragmented-clienthello">
        
      </a>
    </div>
    <p>Post-quantum keyshares are big. The two Kyber hybrids are 832 and 1,216 bytes. Compared to that, X25519 is tiny with only 32 bytes. It is not unlikely that some implementations will fail when seeing such large keyshares.</p><p>Our biggest concern is with the larger Kyber768 based keyshare. A ClientHello with the smaller 832 byte Kyber512-based keyshare will just barely fit in a typical network packet. On the other hand, the larger 1,216 byte Kyber768-keyshare will typically fragment the ClientHello into two packets.</p><p>Assembling packets together isn’t free: it requires you to keep track of the partial messages around. Usually this is done transparently by the operating system’s TCP stack, but optimized middleboxes and load balancers that look at each packet separately, have to (and might not) keep track of the connections themselves.</p>
    <div>
      <h3><b>QUIC</b></h3>
      <a href="#quic">
        
      </a>
    </div>
    <p>The situation for <a href="https://www.cloudflare.com/learning/performance/what-is-http3/">HTTP/3</a>, which is built on <a href="/quic-version-1-is-live-on-cloudflare/">QUIC</a>, is particularly interesting. Instead of a simple port number chosen by the client (as in TCP), a QUIC packet from the client contains a <i>connection ID</i> that is chosen by the server. Think of it as “your reference” and “our reference” in snailmail. This allows a QUIC load-balancer to encode the particular machine handling the connection into the connection ID.</p><p>When opening a connection, the QUIC client doesn’t know which connection ID the server would like and sends a random one instead. If the client needs multiple initial packets, such as with a big ClientHello, then the client will use the same random connection ID. Even though multiple initial packets are allowed by the QUIC standard, a QUIC load balancer might not expect this, and won’t be able to refer to an underlying TCP connection.</p>
    <div>
      <h3>Performance</h3>
      <a href="#performance">
        
      </a>
    </div>
    <p>Aside from these hard failures, <i>soft</i> failures, such as performance degradation are also of concern: if it’s too slow to load, a website might as well have been broken to begin with.</p><p>Back in 2019 in a joint experiment with Google, we deployed two post-quantum key agreements: CECPQ2, based on NTRU-HRSS, and CECPQ2b, based on SIKE. NTRU-HRSS is very similar to Kyber: it’s a bit larger and slower. <a href="/the-tls-post-quantum-experiment/">Results from 2019</a> are very promising: X25519+NTRU-HRSS (orange line) is hard to distinguish from X25519 on its own (blue line).</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/3aqgMsHQUv4sMeIF3eHDOK/ac2d93d5156efd813d007997eb712c5f/image2-2.png" />
            
            </figure><p>We will continue to keep a close eye on performance, especially on the tail performance: we want a smooth transition for everyone, from the fastest to the slowest clients on the Internet.</p>
    <div>
      <h2>How to help out</h2>
      <a href="#how-to-help-out">
        
      </a>
    </div>
    <p>The Internet is a very heterogeneous system. To find all issues, we need sufficient numbers of diverse testers. We are working with browsers to add support for these key agreements, but there may not be one of these browsers in every network.</p><p>So, to help the Internet out, try and switch a small part of your traffic to Cloudflare domains to use these new key agreement methods. We have open-sourced forks for <a href="https://github.com/cloudflare/boringssl-pq">BoringSSL</a>, <a href="https://github.com/cloudflare/go">Go</a> and <a href="https://github.com/cloudflare/qtls-pq">quic-go</a>. For BoringSSL and Go, check out <a href="/experiment-with-pq/#boringssl">the sample code here</a>. If you have any issues, please let us know at <a>ask-research@cloudflare.com</a>. We will be discussing any issues and workarounds at the IETF <a href="https://datatracker.ietf.org/group/tls/about/">TLS working group</a>.</p>
    <div>
      <h2>Outlook</h2>
      <a href="#outlook">
        
      </a>
    </div>
    <p>The transition to a post-quantum secure Internet is urgent, but not without challenges. Today we have deployed a preliminary post-quantum key agreement on all our servers — a sizable portion of the Internet — so that we can all start testing the big migration today. We hope that come 2024, when NIST puts a bow on Kyber, we will all have laid the groundwork for a smooth transition to a Post-Quantum Internet.</p><p>.....</p><p><sup>1</sup>We only support these post-quantum key agreements in protocols based on TLS 1.3 including HTTP/3. There is one exception: for the moment we disable these hybrid key exchanges for websites in FIPS-mode.</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">4UeqNREMkVNSaC66RE5DEo</guid>
            <dc:creator>Bas Westerbaan</dc:creator>
            <dc:creator>Cefan Daniel Rubin</dc:creator>
        </item>
        <item>
            <title><![CDATA[Introducing post-quantum Cloudflare Tunnel]]></title>
            <link>https://blog.cloudflare.com/post-quantum-tunnel/</link>
            <pubDate>Mon, 03 Oct 2022 13:00:00 GMT</pubDate>
            <description><![CDATA[ Every connection we make post-quantum secure, we remove one opportunity for compromise: that's why we are announcing post-quantum Cloudflare Tunnel to help you secure every connection to our network ]]></description>
            <content:encoded><![CDATA[ <p></p><p>Undoubtedly, one of the big themes in IT for the next decade will be <i>the migration</i> to <i>post-quantum cryptography</i>. From tech giants to small businesses: we will all have to make sure our hardware and software is updated so that our data is protected against the arrival of <a href="/the-quantum-menace/">quantum computers</a>. It seems far away, but it’s not a problem for later: any encrypted data captured today (not protected by post-quantum cryptography) can be broken by a sufficiently powerful quantum computer in the future.</p><p>Luckily we’re almost there: after a tremendous worldwide effort by the cryptographic community, <a href="/nist-post-quantum-surprise/">we know</a> what will be the gold standard of post-quantum cryptography for the next decades. Release date: somewhere in 2024. Hopefully, for most, the transition will be a simple software update then, but it will not be that simple for everyone: not all software is maintained, and it could well be that hardware needs an upgrade as well. Taking a step back, many companies don’t even have a full list of all software running on their network.</p><p>For Cloudflare Tunnel customers, this migration will be much simpler: introducing <b>Post-Quantum</b> <b>Cloudflare Tunnel</b>. In this blog post, first we give an overview of how Cloudflare Tunnel works and explain how it can help you with your post-quantum migration. Then we’ll explain how to get started and finish with the nitty-gritty technical details.</p>
    <div>
      <h2>Cloudflare Tunnel</h2>
      <a href="#cloudflare-tunnel">
        
      </a>
    </div>
    <p>With <a href="https://www.cloudflare.com/products/tunnel/">Cloudflare Tunnel</a> you can securely expose a server sitting within an internal network to the Internet by running the <a href="https://github.com/cloudflare/cloudflared"><code>cloudflared</code></a> service next to it. For instance, after having installed <a href="https://github.com/cloudflare/cloudflared"><code>cloudflared</code></a> on your internal network, you can expose your on-prem webapp on the Internet under, say example.com, so that <a href="https://www.cloudflare.com/products/zero-trust/remote-workforces/">remote workers</a> can access it from anywhere,</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/4JiK6i2ZWO5iktBimbbSw3/9308d07667006ac4d8aa6d0b0b53d401/image1.png" />
            
            </figure><p>Life of a Cloudflare Tunnel request.</p><p>How does it work? <code>cloudflared</code> creates long-running connections to two nearby Cloudflare data centers, for instance San Francisco (connection 3) and one other. When your employee visits your domain, they connect (1) to a Cloudflare server close to them, say in Frankfurt. That server knows that this is a Cloudflare Tunnel and that your <code>cloudflared</code> has a connection to a server in San Francisco, and thus it relays (2) the request to it. In turn, via the reverse connection, the request ends up at <code>cloudflared</code>, which passes it (4) to the webapp via your internal network.</p><p>In essence, Cloudflare Tunnel is a simple but convenient tool, but the magic is in what you can do on top with it: you get <a href="https://www.cloudflare.com/ddos/">Cloudflare’s DDoS protection</a> for free; fine-grained access control with <a href="https://www.cloudflare.com/products/zero-trust/access/">Cloudflare Access</a> (even if the application didn’t support it) and <a href="https://developers.cloudflare.com/cloudflare-one/analytics/logs/audit-logs/">request logs</a> just to name a few. And let’s not forget the matter at hand:</p>
    <div>
      <h2>Post-quantum tunnels</h2>
      <a href="#post-quantum-tunnels">
        
      </a>
    </div>
    <p>Our goal is to make it easy for everyone to have a fully post-quantum secure connection from users to origin. For this, Post-Quantum Cloudflare Tunnel is a powerful tool, because with it, your users can benefit from a post-quantum secure connection without upgrading your application (connection 4 in the diagram).</p><p>Today, we make two important steps towards this goal: <code>cloudflared</code> <a href="https://github.com/cloudflare/cloudflared/releases/tag/2022.9.1">2022.9.1</a> adds the <code>--post-quantum</code> flag, that when given, makes the connection from <code>cloudflared</code> to our network (connection 3) post-quantum secure.</p><p>Also today, <a href="/post-quantum-for-all">we have announced</a> support for post-quantum browser connections (connection 1).</p><p>We aren’t there yet: browsers (and other HTTP clients) do not support the post-quantum security offered by our network, yet, and we still have to make the connections between our data centers (connection 2) post-quantum secure.</p><p>An attacker only needs to have access to one vulnerable connection, but attackers don’t have access everywhere: with every connection we make post-quantum secure, we remove one opportunity for compromise.</p><p>We are eager to make post-quantum tunnels the default, but for now it is a beta feature. The reason is that the cryptography used and its integration into the network protocol are not yet final. Making post-quantum the default now, would require users to update <code>cloudflared</code> more often than we can reasonably expect them to.</p>
    <div>
      <h2>Getting started</h2>
      <a href="#getting-started">
        
      </a>
    </div>
    <p>Are frequent updates to <code>cloudflared</code> not a problem for you? Then please do give post-quantum Cloudflare Tunnel a try. Make sure you’re on at least <a href="https://github.com/cloudflare/cloudflared/releases/tag/2022.9.1">2022.9.1</a> and simply run <code>cloudflared</code> with the <code>--post-quantum</code> flag:</p>
            <pre><code>$ cloudflared tunnel run --post-quantum tunnel-name
2022-09-23T11:44:42Z INF Starting tunnel tunnelID=[...]
2022-09-23T11:44:42Z INF Version 2022.9.1
2022-09-23T11:44:42Z INF GOOS: darwin, GOVersion: go1.19.1, GoArch: amd64
2022-09-23T11:44:42Z INF Settings: map[post-quantum:true pq:true]
2022-09-23T11:44:42Z INF Generated Connector ID: [...]
2022-09-23T11:44:42Z INF cloudflared will not automatically update if installed by a package manager.
2022-09-23T11:44:42Z INF Initial protocol quic
2022-09-23T11:44:42Z INF Using experimental hybrid post-quantum key agreement X25519Kyber768Draft00
2022-09-23T11:44:42Z INF Starting metrics server on 127.0.0.1:53533/metrics
2022-09-23T11:44:42Z INF Connection [...] registered connIndex=0 ip=[...] location=AMS
2022-09-23T11:44:43Z INF Connection [...] registered connIndex=1 ip=[...] location=AMS
2022-09-23T11:44:44Z INF Connection [...] registered connIndex=2 ip=[...] location=AMS
2022-09-23T11:44:45Z INF Connection [...] registered connIndex=3 ip=[...] location=AMS</code></pre>
            <p>If you run <code>cloudflared</code> <a href="https://developers.cloudflare.com/cloudflare-one/connections/connect-apps/install-and-setup/tunnel-guide/local/as-a-service/">as a service</a>, you can turn on post-quantum by adding <code>post-quantum: true</code> to the tunnel configuration file. Conveniently, the <code>cloudflared</code> service will <a href="https://developers.cloudflare.com/cloudflare-one/connections/connect-apps/install-and-setup/tunnel-guide/local/local-management/arguments/#no-autoupdate">automatically update itself</a> if not installed by a package manager.</p><p>If, for some reason, creating a post-quantum tunnel fails, you’ll see an error message like</p>
            <pre><code>2022-09-22T17:30:39Z INF Starting tunnel tunnelID=[...]
2022-09-22T17:30:39Z INF Version 2022.9.1
2022-09-22T17:30:39Z INF GOOS: darwin, GOVersion: go1.19.1, GoArch: amd64
2022-09-22T17:30:39Z INF Settings: map[post-quantum:true pq:true]
2022-09-22T17:30:39Z INF Generated Connector ID: [...]
2022-09-22T17:30:39Z INF cloudflared will not automatically update if installed by a package manager.
2022-09-22T17:30:39Z INF Initial protocol quic
2022-09-22T17:30:39Z INF Using experimental hybrid post-quantum key agreement X25519Kyber512Draft00
2022-09-22T17:30:39Z INF Starting metrics server on 127.0.0.1:55889/metrics
2022-09-22T17:30:39Z INF 

===================================================================================
You are hitting an error while using the experimental post-quantum tunnels feature.

Please check:

   https://pqtunnels.cloudflareresearch.com

for known problems.
===================================================================================


2022-09-22T17:30:39Z ERR Failed to create new quic connection error="failed to dial to edge with quic: CRYPTO_ERROR (0x128): tls: handshake failure" connIndex=0 ip=[...]</code></pre>
            <p>When the post-quantum flag is given, <code>cloudflared</code> will <i>not</i> fall back to a non post-quantum connection.</p>
    <div>
      <h3>What to look for</h3>
      <a href="#what-to-look-for">
        
      </a>
    </div>
    <p>The setup phase is the crucial part: once established, the tunnel is the same as a normal tunnel. That means that performance and reliability should be identical once the tunnel is established.</p><p>The post-quantum cryptography we use is very fast, but requires roughly a kilobyte of extra data to be exchanged during the handshake. The difference will be hard to notice in practice.</p><p>Our biggest concern is that some network equipment/middleboxes might be confused by the bigger handshake. If the post-quantum Cloudflare Tunnel isn’t working for you, we’d love to hear about it. Contact us at <a>ask-research@cloudflare.com</a> and tell us which middleboxes or ISP you’re using.</p>
    <div>
      <h2>Under the hood</h2>
      <a href="#under-the-hood">
        
      </a>
    </div>
    <p>When the <code>--post-quantum</code> flag is given, <code>cloudflared</code> restricts itself to the QUIC transport for the tunnel connection to our network and will only allow the post-quantum hybrid key exchanges <code>X25519Kyber512Draft00</code> and <code>X25519Kyber768Draft00</code> with TLS identifiers <code>0xfe30</code> and <code>0xfe31</code> respectively. These are <a href="https://datatracker.ietf.org/doc/draft-stebila-tls-hybrid-design/">hybrid</a> key exchanges between the classical <a href="https://cr.yp.to/ecdh.html">X25519</a> and the post-quantum secure <a href="https://pq-crystals.org/kyber/index.shtml">Kyber</a>. Thus, on the off-chance that Kyber turns out to be insecure, we can still rely on the non-post quantum security of X25519. These are the same key exchanges <a href="/post-quantum-for-all">supported on our network</a>.</p><p><code>cloudflared</code> randomly picks one of these two key exchanges. The reason is that the latter usually requires two initial packets for the TLS <i>ClientHello</i> whereas the former only requires one. That allows us to test whether a fragmented <i>ClientHello</i> causes trouble.</p><p>When <code>cloudflared</code> fails to set up the post-quantum connection, it will report the attempted key exchange, <code>cloudflared</code> version and error to <a href="https://pqtunnels.cloudflareresearch.com">pqtunnels.cloudflareresearch.com</a> so that we have visibility into network issues. Have a look at that page for updates on our post-quantum tunnel deployment.</p><p>The control connection and authentication of the tunnel between <code>cloudflared</code> and our network are not post-quantum secure yet. This is less urgent than the <i>store-now-decrypt-later</i> issue of the data on the tunnel itself.</p><p>We have <a href="https://github.com/cloudflare/qtls-pq">open-sourced</a> support for these post-quantum QUIC key exchanges in Go.</p>
    <div>
      <h2>Outlook</h2>
      <a href="#outlook">
        
      </a>
    </div>
    <p>In the coming decade the industry will roll out post-quantum data protection. Some cases will be as simple as a software update and others will be much more difficult. Post-Quantum Cloudflare Tunnel will secure the connection between Cloudflare’s network and your origin in a simple and user-friendly way — an important step towards the Post-Quantum Internet, so that everyone may continue to enjoy a private and secure Internet.</p> ]]></content:encoded>
            <category><![CDATA[Birthday Week]]></category>
            <category><![CDATA[Post-Quantum]]></category>
            <category><![CDATA[Research]]></category>
            <category><![CDATA[Cryptography]]></category>
            <category><![CDATA[Product News]]></category>
            <guid isPermaLink="false">4Uq6jjYa61mn71YcLKIpsF</guid>
            <dc:creator>Bas Westerbaan</dc:creator>
        </item>
        <item>
            <title><![CDATA[Experiment with post-quantum cryptography today]]></title>
            <link>https://blog.cloudflare.com/experiment-with-pq/</link>
            <pubDate>Thu, 04 Aug 2022 13:00:00 GMT</pubDate>
            <description><![CDATA[ The future is post quantum. Enable post-quantum key agreement on your test zone today and get a headstart ]]></description>
            <content:encoded><![CDATA[ <p></p><p>Practically all data sent over the Internet today is at <a href="/the-quantum-menace/">risk</a> in the future if a sufficiently large and stable quantum computer is created. Anyone who captures data now could decrypt it.</p><p>Luckily, there is a solution: we can switch to so-called <a href="https://www.cloudflare.com/learning/ssl/quantum/what-is-post-quantum-cryptography/"><i>post-quantum (PQ) cryptography</i></a>, which is designed to be secure against attacks of quantum computers. After a six-year worldwide selection process, in July 2022, NIST <a href="/nist-post-quantum-surprise/">announced</a> they will standardize <a href="https://pq-crystals.org/kyber/index.shtml">Kyber</a>, a post-quantum key agreement scheme. The standard will be ready in 2024, but we want to help drive the adoption of post-quantum cryptography.</p><p>Today we have added support for the <i>X25519Kyber512Draft00</i> and <i>X25519Kyber768Draft00</i> hybrid post-quantum key agreements to a number of test domains, including <a href="https://pq.cloudflareresearch.com/">pq.cloudflareresearch.com</a>.</p><p><i>Do you want to experiment with post-quantum on your test website for free? Mail</i> <a><i>ask-research@cloudflare.com</i></a> <i>to enroll your test website, but read the fine-print below.</i></p>
    <div>
      <h2>What does it mean to enable post-quantum on your website?</h2>
      <a href="#what-does-it-mean-to-enable-post-quantum-on-your-website">
        
      </a>
    </div>
    <p>If you enroll your website to the post-quantum beta, we will add support for these two extra key agreements <b>alongside</b> the existing classical encryption schemes such as X25519. If your browser doesn’t support these post-quantum key agreements (and none at the time of writing do), then your browser will continue working with a classically secure, but not quantum-resistant, connection.</p>
    <div>
      <h3>Then how to test it?</h3>
      <a href="#then-how-to-test-it">
        
      </a>
    </div>
    <p>We have open-sourced a fork of <a href="https://github.com/cloudflare/boringssl-pq">BoringSSL</a> and <a href="https://github.com/cloudflare/go">Go</a> that has support for these post-quantum key agreements. With those and an enrolled test domain, you can check how your application performs with post-quantum key exchanges. We are working on support for more libraries and languages.</p>
    <div>
      <h3>What to look for?</h3>
      <a href="#what-to-look-for">
        
      </a>
    </div>
    <p>Kyber and classical key agreements such as X25519 have different performance characteristics: Kyber requires less computation, but has bigger keys and requires a bit more RAM to compute. It could very well make the connection faster if used on its own.</p><p>We are not using Kyber on its own though, but are using <b>hybrids</b>. That means we are doing both an X25519 <i>and</i> Kyber key agreement such that the connection is still classically secure if either is broken. That also means that connections will be a bit slower. In our experiments, the difference is <a href="/the-tls-post-quantum-experiment/">very</a> <a href="/post-quantumify-cloudflare/">small</a>, but it’s best to check for yourself.</p>
    <div>
      <h2>The fine-print</h2>
      <a href="#the-fine-print">
        
      </a>
    </div>
    <p>Cloudflare’s post-quantum cryptography support is a beta service for experimental use only. Enabling post-quantum on your website will subject the website to Cloudflare’s Beta Services terms and will impact other Cloudflare services on the website as described below.</p>
    <div>
      <h3>No stability or support guarantees</h3>
      <a href="#no-stability-or-support-guarantees">
        
      </a>
    </div>
    <p>Over the coming months, both Kyber and the way it’s integrated into <a href="https://www.cloudflare.com/learning/ssl/transport-layer-security-tls/">TLS</a> will change for several reasons, including:</p><ol><li><p>Kyber will see small, but backward-incompatible changes in the coming months.</p></li><li><p>We want to be compatible with other early adopters and will change our integration accordingly.</p></li><li><p>As, together with the cryptography community, we find issues, we will add workarounds in our integration.</p></li></ol><p>We will update our forks accordingly, but cannot guarantee any long-term stability or continued support. PQ support may become unavailable at any moment. We will post updates on <a href="https://pq.cloudflareresearch.com">pq.cloudflareresearch.com</a>.</p>
    <div>
      <h3>Features in enrolled domains</h3>
      <a href="#features-in-enrolled-domains">
        
      </a>
    </div>
    <p>For the moment, we are running enrolled zones on a slightly different infrastructure for which not all features, notably QUIC, are available.</p><p>With that out of the way, it’s…</p>
    <div>
      <h2>Demo time!</h2>
      <a href="#demo-time">
        
      </a>
    </div>
    
    <div>
      <h3>BoringSSL</h3>
      <a href="#boringssl">
        
      </a>
    </div>
    <p>With the following commands build our <a href="https://github.com/cloudflare/boringssl-pq">fork of BoringSSL</a> and create a TLS connection with pq.cloudflareresearch.com using the compiled <code>bssl</code> tool. Note that we do not enable the post-quantum key agreements by default, so you have to pass the <code>-curves</code> flag.</p>
            <pre><code>$ git clone https://github.com/cloudflare/boringssl-pq
[snip]
$ cd boringssl-pq &amp;&amp; mkdir build &amp;&amp; cd build &amp;&amp; cmake .. -GNinja &amp;&amp; ninja 
[snip]
$ ./tool/bssl client -connect pq.cloudflareresearch.com -server-name pq.cloudflareresearch.com -curves Xyber512D00
	Connecting to [2606:4700:7::a29f:8a55]:443
Connected.
  Version: TLSv1.3
  Resumed session: no
  Cipher: TLS_AES_128_GCM_SHA256
  ECDHE curve: X25519Kyber512Draft00
  Signature algorithm: ecdsa_secp256r1_sha256
  Secure renegotiation: yes
  Extended master secret: yes
  Next protocol negotiated: 
  ALPN protocol: 
  OCSP staple: no
  SCT list: no
  Early data: no
  Encrypted ClientHello: no
  Cert subject: CN = *.pq.cloudflareresearch.com
  Cert issuer: C = US, O = Let's Encrypt, CN = E1</code></pre>
            
    <div>
      <h3>Go</h3>
      <a href="#go">
        
      </a>
    </div>
    <p>Our <a href="https://github.com/cloudflare/go">Go fork</a> doesn’t enable the post-quantum key agreement by default. The following simple Go program enables PQ by default for the http package and GETs pq.cloudflareresearch.com.</p>
            <pre><code>package main

import (
    "context"
    "crypto/tls"
    "fmt"
    "net/http"
)

func main() {
    req, err := http.NewRequestWithContext(
        context.WithValue(
            context.Background(),
            tls.CFEventHandlerContextKey{},
            func(ev tls.CFEvent) {
                switch e := ev.(type) {
                case tls.CFEventTLS13HRR:
                    fmt.Printf("HelloRetryRequest\n")
                case tls.CFEventTLS13NegotiatedKEX:
                    switch e.KEX {
                    case tls.X25519Kyber512Draft00:
                        fmt.Printf("Used X25519Kyber512Draft00\n")
                    default:
                        fmt.Printf("Used %d\n", e.KEX)
                    }
                }
            },
        ),
        "GET",
        "https://pq.cloudflareresearch.com",
        nil,
    )
    if err != nil {
        panic(err)
    }

    http.DefaultTransport.(*http.Transport).TLSClientConfig = &amp;tls.Config{
        CurvePreferences: []tls.CurveID{tls.X25519Kyber512Draft00, tls.X25519},
    }

    if _, err = (&amp;http.Client{}).Do(req); err != nil {
        fmt.Println(err)
    }
}</code></pre>
            <p>To run we need to compile our <a href="https://github.com/cloudflare/go">Go fork</a>:</p>
            <pre><code>$ git clone https://github.com/cloudflare/go
[snip]
$ cd go/src &amp;&amp; ./all.bash
[snip]
$ ../bin/go run path/to/example.go
Used X25519Kyber512Draft00</code></pre>
            
    <div>
      <h3>On the wire</h3>
      <a href="#on-the-wire">
        
      </a>
    </div>
    <p>So what does this look like on the wire? With <a href="https://www.wireshark.org/">Wireshark</a> we can capture the packet flow. First a non-post quantum HTTP/2 connection with X25519:</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/4xAkcteIQZp4rEkXNhJpEb/537b6cfe73ad478336fdc74d14dda0cd/image1-8.png" />
            
            </figure><p>This is a normal <a href="https://www.cloudflare.com/learning/ssl/what-happens-in-a-tls-handshake/">TLS 1.3 handshake</a>: the client sends a ClientHello with an X25519 keyshare, which fits in a single packet. In return, the server sends its own 32 byte X25519 keyshare. It also sends various other messages, such as the certificate chain, which requires two packets in total.</p><p>Let’s check out Kyber:</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/4tczvgQiEaYXtanEjGy6Wb/466ef092c38058c34c7370770a126d17/image3-2.png" />
            
            </figure><p>As you can see the ClientHello is a bit bigger, but still fits within a single packet. The response takes three packets now, instead of two, because of the larger server keyshare.</p>
    <div>
      <h2>Under the hood</h2>
      <a href="#under-the-hood">
        
      </a>
    </div>
    <p>Want to add client support yourself? We are using a <a href="https://www.ietf.org/archive/id/draft-ietf-tls-hybrid-design-04.txt">hybrid</a> of <a href="https://datatracker.ietf.org/doc/html/rfc7748">X25519</a> and Kyber <a href="https://pq-crystals.org/kyber/data/kyber-specification-round3-20210804.pdf">version 3.02</a>. We are writing out the details of the latter in <a href="https://github.com/bwesterb/draft-schwabe-cfrg-kyber">version 00 of this CRFG IETF draft</a>, hence the name. We are using TLS <a href="https://www.iana.org/assignments/tls-parameters/tls-parameters.xhtml#tls-parameters-8">group identifiers</a> <code>0xfe30</code> and <code>0xfe31</code> for <i>X25519Kyber512Draft00</i> and <i>X25519Kyber768Draft00</i> respectively.</p><p>There are some differences between our Go and BoringSSL forks that are interesting to compare.</p><ul><li><p>Our <a href="https://github.com/cloudflare/go">Go fork</a> uses our fast <a href="https://github.com/cloudflare/circl/tree/main/kem/kyber">AVX2 optimized implementation of Kyber</a> from <a href="/introducing-circl/">CIRCL</a>. In contrast, our BoringSSL fork uses the simpler <a href="https://github.com/pq-crystals/kyber/tree/master/ref">portable reference implementation</a>. Without the AVX2 optimisations it’s easier to evaluate. The downside is that it’s slower. Don’t be mistaken: it is still very fast, but you can check yourself.</p></li><li><p>Our Go fork only sends one keyshare. If the server doesn’t support it, it will respond with a HelloRetryRequest message and the client will fallback to one the server does support. This adds a roundtrip.Our BoringSSL fork, on the other hand, will send two keyshares: the post-quantum hybrid and a classical one (if a classical key agreement is still enabled). If the server doesn’t recognize the first, it will be able to use the second. In this way we avoid a roundtrip if the server does not support the post-quantum key agreement.</p></li></ul>
    <div>
      <h2>Looking ahead</h2>
      <a href="#looking-ahead">
        
      </a>
    </div>
    <p>The quantum future is here. In the coming years the Internet will move to post-quantum cryptography. Today we are offering our customers the tools to get a headstart and test post-quantum key agreements. We love to hear your feedback: e-mail it to <a>ask-research@cloudflare.com</a>.</p><p>This is just a small, but important first step. We will continue our efforts to move towards a secure and private quantum-secure Internet. Much more to come — watch this space.</p> ]]></content:encoded>
            <category><![CDATA[Post-Quantum]]></category>
            <category><![CDATA[Cryptography]]></category>
            <category><![CDATA[TLS]]></category>
            <category><![CDATA[Research]]></category>
            <guid isPermaLink="false">2XdVJ2OPv7P9zFIhVjxmU0</guid>
            <dc:creator>Bas Westerbaan</dc:creator>
            <dc:creator>Christopher Patton</dc:creator>
            <dc:creator>Peter Wu</dc:creator>
        </item>
        <item>
            <title><![CDATA[NIST’s pleasant post-quantum surprise]]></title>
            <link>https://blog.cloudflare.com/nist-post-quantum-surprise/</link>
            <pubDate>Fri, 08 Jul 2022 17:54:40 GMT</pubDate>
            <description><![CDATA[ On Tuesday, the US National Institute of Standards and Technology (NIST) announced which post-quantum cryptography they will standardize. ]]></description>
            <content:encoded><![CDATA[ <p></p><p>On Tuesday, the US National Institute of Standards and Technology (NIST) <a href="https://www.nist.gov/news-events/news/2022/07/nist-announces-first-four-quantum-resistant-cryptographic-algorithms">announced</a> which post-quantum cryptography they will standardize. We were already drafting this post with an educated guess on the choice NIST would make. We almost got it right, except for a single choice we didn’t expect—and which changes everything.</p><p>At Cloudflare, <a href="https://www.cloudflare.com/learning/ssl/quantum/what-is-post-quantum-cryptography/">post-quantum cryptography</a> is a topic close to our heart, as the future of a secure and private Internet is on the line. We have been working towards this day for <a href="/tag/post-quantum/">many years</a>, by <a href="/introducing-circl/">implementing</a> post-quantum cryptography, contributing <a href="https://sphincs.org/">to</a> <a href="https://datatracker.ietf.org/doc/draft-celi-wiggers-tls-authkem/">standards</a>, and testing <a href="/post-quantumify-cloudflare/">post-quantum cryptography</a> <a href="/the-tls-post-quantum-experiment/">in</a> <a href="/sizing-up-post-quantum-signatures/">practice</a>, and we are excited to share our perspective.</p><p>In this long blog post, we explain how we got here, what NIST chose to standardize, what it will mean for the Internet, and what you need to know to get started with your own post-quantum preparations.</p>
    <div>
      <h2>How we got here</h2>
      <a href="#how-we-got-here">
        
      </a>
    </div>
    
    <div>
      <h3>Shor’s algorithm</h3>
      <a href="#shors-algorithm">
        
      </a>
    </div>
    <p>Our story starts in 1994, when mathematician Peter Shor discovered a <a href="https://en.wikipedia.org/wiki/Shor%27s_algorithm">marvelous algorithm</a> that efficiently factors numbers and computes discrete logarithms. With it, you can break nearly all public-key cryptography deployed today, including RSA and elliptic curve cryptography. Luckily, Shor’s algorithm doesn’t run on just any computer: it needs a <i>quantum computer</i>. Back in 1994, quantum computers existed only on paper.</p><p>But in the years since, physicists started building actual quantum computers. Initially, these machines were (and still are) too small and too error-prone to be threatening to the integrity of public-key cryptography, but there is a clear and impending danger: it only seems a matter of time now before a quantum computer is built that has the capability to break public-key cryptography. So what can we do?</p>
    <div>
      <h3>Encryption, key agreement and signatures</h3>
      <a href="#encryption-key-agreement-and-signatures">
        
      </a>
    </div>
    <p>To understand the risk, we need to distinguish between the three cryptographic primitives that are used to protect your connection when browsing on the Internet:</p><blockquote><p><b>Symmetric encryption</b>. With a symmetric cipher there is <i>one</i> key to encrypt and decrypt a message. They’re the workhorse of cryptography: they’re fast, well understood and luckily, as far as known, secure against quantum attacks. (We’ll touch on this later when we get to <a href="#post-quantumsecuritylevels">security levels</a>.) Examples are <a href="https://en.wikipedia.org/wiki/Advanced_Encryption_Standard">AES</a> and <a href="/it-takes-two-to-chacha-poly/">ChaCha20</a>.</p></blockquote><p>Symmetric encryption alone is not enough: which key do we use when visiting a website for the first time? We can’t just pick a random key and send it along in the clear, as then anyone surveilling that session would know that key as well. You’d think it’s impossible to communicate securely without ever having met, but there is some clever math to solve this.</p><blockquote><p><b>Key agreement</b>, also called a key exchange, allows two parties that never met to agree on a shared key. Even if someone is snooping, they are not able to figure out the agreed key. Examples include <a href="https://developers.cloudflare.com/internet/protocols/tls#ephemeral-diffie-hellman-handshake">Diffie–Hellman</a> over elliptic curves, such as <a href="https://datatracker.ietf.org/doc/html/rfc7748">X25519</a>.</p></blockquote><p>The key agreement prevents a passive observer from reading the contents of a session, but it doesn’t help defend against an attacker who sits in the middle and does two separate key agreements: one with you and one with the website you want to visit. To solve this, we need the final piece of cryptography:</p><blockquote><p><b>Digital signatures</b>, such as <a href="https://en.wikipedia.org/wiki/RSA_(cryptosystem)">RSA</a>, <a href="https://www.cloudflare.com/learning/ssl/what-is-an-ssl-certificate/">allow you to check</a> that you’re actually talking to the right website with a chain of certificates going up to a <a href="https://en.wikipedia.org/wiki/Certificate_authority">certificate authority</a>.</p></blockquote><p>Shor’s algorithm breaks all widely deployed key agreement and digital signature schemes, which are both critical to the security of the Internet. However, the urgency and mitigation challenges between them are quite different.</p>
    <div>
      <h4>Impact</h4>
      <a href="#impact">
        
      </a>
    </div>
    <p>Most signatures on the Internet have a relatively short lifespan. If we replace them before quantum computers can crack them, we’re golden. We shouldn’t be too complacent here: signatures aren’t that easy to replace as we will see later on.</p><p>More urgently, though, an attacker <b>can store traffic today and decrypt later</b> by breaking the key agreement using a quantum computer. Everything that’s sent on the Internet today (personal information, credit card numbers, keys, messages) is at risk.</p>
    <div>
      <h3>NIST Competition</h3>
      <a href="#nist-competition">
        
      </a>
    </div>
    <p>Luckily cryptographers took note of Shor’s work early on and started working on <i>post-quantum cryptography</i>: cryptography not broken by quantum algorithms. In 2016, NIST, known for standardizing AES and SHA, <a href="https://csrc.nist.gov/CSRC/media/Projects/Post-Quantum-Cryptography/documents/call-for-proposals-final-dec-2016.pdf">opened</a> a public competition to select which post-quantum algorithms they will standardize. Cryptographers from all over the world submitted algorithms and <a href="https://groups.google.com/a/list.nist.gov/g/pqc-forum">publicly scrutinized</a> each other’s submissions. To focus attention, the list of potential candidates were whittled down over three rounds. From the original 82 submissions, eight made it into the final third round. From those eight, NIST chose one key agreement scheme and three signature schemes. Let’s have a look at the key agreement first.</p>
    <div>
      <h2>What NIST announced</h2>
      <a href="#what-nist-announced">
        
      </a>
    </div>
    
    <div>
      <h3>Key agreement</h3>
      <a href="#key-agreement">
        
      </a>
    </div>
    <p>For key agreement, NIST picked only <a href="https://pq-crystals.org/kyber/index.shtml"><b>Kyber</b></a>, which is a Key Encapsulation Mechanism (KEM). Let’s compare it side-by-side to an RSA-based KEM and the X25519 Diffie–Hellman key agreement:</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/5ltGYyYPY4GtLzE4ETzpE/81b57ba49a5753ba576e0501a0f15821/Screen-Shot-2022-07-08-at-7.37.04-AM.png" />
            
            </figure><p>Performance characteristics of Kyber and RSA. We compare instances of security level 1, see below. Timings vary considerably by platform and implementation constraints and should be taken as a rough indication only.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/3JiVHnH2VbzrTs4aZow5Tf/caec70701cd0affee28d47e7dafe6a23/Screen-Shot-2022-07-08-at-7.37.25-AM.png" />
            
            </figure><p>Performance characteristics of the X25519 Diffie–Hellman key agreement commonly used in TLS 1.3.</p>
    <div>
      <h5>KEM versus Diffie–Hellman</h5>
      <a href="#kem-versus-diffie-hellman">
        
      </a>
    </div>
    <p>To properly compare these numbers, we have to explain how KEM and Diffie–Hellman key agreements are different.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/1cseVDL5dz3hAakfQ3gVgM/4a229fa440511b1cf8af65616a9e545b/IMG_3E98764E5A4C-1.jpeg.jpeg" />
            
            </figure><p>Protocol flow of KEM and Diffie-Hellman key agreement.</p><p>Let’s start with the KEM. A KEM is essentially a <a href="/hybrid-public-key-encryption/">Public-Key Encryption</a> (PKE) scheme tailored to encrypt shared secrets. To agree on a key, the initiator, typically the client, generates a fresh keypair and sends the public key over. The receiver, typically the server, generates a shared secret and encrypts (“encapsulates”) it for the initiator’s public key. It returns the ciphertext to the initiator, who finally decrypts (“decapsulates”) the shared secret with its private key.</p><p>With Diffie–Hellman, both parties generate a keypair. Because of the magic of Diffie–Hellman, there is a unique shared secret between every combination of a public and private key. Again, the initiator sends its public key. The receiver <i>combines</i> the received public key with its own private key to create the shared secret and returns its public key with which the initiator can also compute the shared secret.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/5rLtpAeaZvMzWQwUks07xt/35595ea8f8eeb9f44cfee55035c016ba/Screen-Shot-2022-07-08-at-7.40.57-AM.png" />
            
            </figure><h6><i>Interactive versus non-interactive key agreement</i></h6><p>As an aside, in this simple key agreement (such as in TLS), there is not a big difference between using a KEM or Diffie–Hellman: the number of round-trips is exactly the same. In fact, we’re using Diffie–Hellman essentially as a KEM. This, however, is not the case for all protocols: for instance, the <a href="https://signal.org/docs/specifications/x3dh/">3XDH</a> handshake of Signal <a href="https://eprint.iacr.org/2019/1356">can’t be done</a> with plain KEMs and requires the full flexibility of Diffie–Hellman.</p><p>Now that we know how to compare KEMs and Diffie–Hellman, how does Kyber measure up?</p>
    <div>
      <h5>Kyber</h5>
      <a href="#kyber">
        
      </a>
    </div>
    <p>Kyber is a balanced post-quantum KEM. It is very fast: much faster than X25519, which is already known for its speed. Its main drawback, common to many post-quantum KEMs, is that Kyber has relatively large ciphertext and key sizes: compared to X25519 it adds 1,504 bytes. Is this problematic?</p><p>We have some indirect data. Back in 2019 together with Google we tested two post-quantum KEMs, NTRU-HRSS and SIKE in Chrome. SIKE has very small keys, but is computationally very expensive. NTRU-HRSS, on the other hand, has similar performance characteristics to Kyber, but is slightly bigger and slower. <a href="/the-tls-post-quantum-experiment/">This is what we found</a>:</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/3ZeN5ueGHiWynRKFenllBk/4994a0a4c970fcbf8111a9a1fe44080a/pasted-image-0.png" />
            
            </figure><p>Handshake times for TLS with X25519 (control), NTRU-HRSS (CECPQ2) and SIKE (CECPQ2b). Both post-quantum KEMs were combined with a X25519 key agreement.</p><p>In this experiment we used a combination (a <i>hybrid</i>) of the post-quantum KEM and X25519. Thus, NTRU-HRSS couldn’t benefit from its speed compared to X25519. Even with this disadvantage, the difference in performance is very small. Thus, we expect that switching to a hybrid of Kyber and X25519 will have little performance impact.</p><p>So can we switch to post-quantum TLS today? We would love to. However, we have to be a bit careful: some TLS implementations are brittle and crash on the larger <i>KeyShare</i> message that contains the bigger post-quantum keys. We will work hard to find ways to mitigate these issues, as was done <a href="/why-tls-1-3-isnt-in-browsers-yet/">to deploy TLS 1.3</a>. Stay tuned!</p>
    <div>
      <h5>The other finalists</h5>
      <a href="#the-other-finalists">
        
      </a>
    </div>
    <p>It’s interesting to have a look at the KEMs that didn’t make the cut. NIST intends to standardize some of these in a fourth round. One reason is to increase the diversity in security assumptions in case there is a breakthrough in attacks on structured lattices on which Kyber is based. Another reason is that some of these schemes have specialized, but very useful applications. Finally, some of these schemes might be standardized outside of NIST.</p><table><tr><td><p><b>Structured lattices</b></p></td><td><p><b>Backup</b></p></td><td><p><b>Specialists</b></p></td></tr><tr><td><p><a href="http://web.archive.org/web/20221018220946/https://ntru.org/">NTRU</a></p></td><td><p><a href="http://web.archive.org/web/20221018220946/https://bikesuite.org/">BIKE</a> 4️⃣</p></td><td><p><a href="http://web.archive.org/web/20221018220946/https://classic.mceliece.org/">Classic McEliece</a> 4️⃣</p></td></tr><tr><td><p><a href="http://web.archive.org/web/20221018220946/https://ntruprime.cr.yp.to/">NTRU Prime</a></p></td><td><p><a href="http://web.archive.org/web/20221018220946/https://pqc-hqc.org/">HQC</a> 4️⃣</p></td><td><p><a href="http://web.archive.org/web/20221018220946/https://sike.org/">SIKE</a> 4️⃣</p></td></tr><tr><td><p><a href="http://web.archive.org/web/20221018220946/https://www.esat.kuleuven.be/cosic/pqcrypto/saber/">SABER</a></p></td><td><p><a href="http://web.archive.org/web/20221018220946/https://frodokem.org/">FrodoKEM</a></p></td><td><p></p></td></tr></table><p>The finalists and candidates of the third round of the competition. The ones marked with 4️⃣ are proceeding to a fourth round and might yet be standardized.</p><h6><i>The structured lattice generalists</i></h6><p>Just like Kyber, the KEMs <b>SABER</b>, <b>NTRU</b> and <b>NTRU Prime</b> are all structured lattice schemes that are very similar in performance to Kyber. There are some finer differences, but any one of these KEMs would’ve been a great pick. And they still are: OpenSSH 9.0 <a href="https://www.openssh.com/txt/release-9.0">chose to implement</a> NTRU Prime.</p><h6><i>The backup generalists</i></h6><p><b>BIKE</b>, <b>HQC</b> and <b>FrodoKEM</b> are also balanced KEMs, but they’re based on three different underlying hard problems. Unfortunately they’re noticeably less efficient, both in key sizes and computation. A breakthrough in the cryptanalysis of structured lattices is possible, though, and in that case it’s nice to have backups. Thus, NIST is advancing BIKE and HQC to a fourth round.</p><p>While NIST chose not to advance FrodoKEM, which is based on unstructured lattices, Germany’s BSI <a href="https://www.bsi.bund.de/SharedDocs/Downloads/EN/BSI/Crypto/Migration_to_Post_Quantum_Cryptography.pdf?__blob=publicationFile&amp;v=2">prefers</a> it.</p><h6><i>The specialists</i></h6><p>The last group of post-quantum cryptographic algorithms under NIST’s consideration are the specialists. We’re happy that both are advancing to the fourth round as they can be of great value in just the right application.</p><p>First up is <b>Classic McEliece</b>: it has rather unbalanced performance characteristics with its large public key (261kB) and small ciphertexts (128 bytes). This makes McEliece unsuitable for the ephemeral key exchange of TLS, where we need to transmit the public key. On the other hand, McEliece is ideal when the public key is distributed out-of-band anyway, as is often the case in applications and mobile apps that pin certificates. To use McEliece in this way, we need to change TLS a bit. Normally the server authenticates itself by sending a signature on the handshake. Instead, the client can encrypt a challenge to the KEM public key of the server. Being able to decrypt it is an implicit authentication. This variation of TLS is known as <a href="/kemtls-post-quantum-tls-without-signatures/">KEMTLS</a> and also works great with Kyber when the public key isn’t known beforehand.</p><p>Finally, there is <b>SIKE,</b> which is based on super singular isogenies. It has very small key and ciphertext sizes. Unfortunately, it is computationally more expensive than the other contenders.</p>
    <div>
      <h3>Digital signatures</h3>
      <a href="#digital-signatures">
        
      </a>
    </div>
    <p>As we just saw, the situation for post-quantum key agreement isn’t too bad: Kyber, the chosen scheme is somewhat larger, but it offers computational efficiency in return. The situation for post-quantum signatures is worse: none of the schemes fit the bill on their own for different reasons. We discussed these issues at length for ten of them <a href="/sizing-up-post-quantum-signatures/">in a deep-dive last year</a>. Let’s restrict ourselves for the moment to the schemes that were most likely to be standardized and compare them against Ed25519 and RSA-2048, the schemes that are in common use today.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/5wlbFCsTjsWtsugi5Q9cIJ/705931a2c0c18b2efe9d77c57733a3e4/Screenshot-2022-07-09-at-08.45.51.png" />
            
            </figure><p>Performance characteristics of NIST’s chosen signature schemes compared to Ed25519 and RSA-2048. We compare instances of security level 1, see below. Timings vary considerably by platform and implementation constraints and should be taken as a rough indication only. SPHINCS+ was timed with simple haraka as the underlying hash function. (*) Falcon requires a suitable double-precision floating-point unit for fast signing.</p>
    <div>
      <h4>Floating points: Falcon’s achilles</h4>
      <a href="#floating-points-falcons-achilles">
        
      </a>
    </div>
    <p>All of these schemes have much larger signatures than those commonly used today. Looking at just these numbers, <b>Falcon</b> is the best of the worst. It, however, has a weakness that this table doesn’t show: it requires <i>fast constant-time double-precision floating-point arithmetic</i> to have acceptable signing performance.</p><p>Let’s break that down. <b>Constant time</b> means that the time the operation takes does not depend on the data processed. If the time to create a signature depends on the private key, then the private key can often be recovered by <a href="https://crypto.stanford.edu/~dabo/papers/ssl-timing.pdf">measuring</a> how long it takes to create a signature. Writing constant-time code is hard, but over the years cryptographers have got it figured out for integer arithmetic.</p><p>Falcon, crucially, is the first big cryptographic algorithm to use <a href="https://en.wikipedia.org/wiki/Double-precision_floating-point_format">double-precision floating-point</a> arithmetic. Initially it wasn’t clear at all whether Falcon could be implemented in constant-time, but impressively, Falcon was implemented in constant-time for <a href="https://eprint.iacr.org/2019/893.pdf">several different CPUs</a>, which required several <a href="https://falcon-sign.info/impl/fpr.h.html">clever workarounds</a> for certain CPU instructions.</p><p>Despite this achievement, Falcon’s constant-timeness is built on shaky grounds. The next generation of Intel CPUs might add an optimization that breaks Falcon’s constant-timeness. Also, <a href="https://eprint.iacr.org/2022/405.pdf">many CPUs</a> today do not even have fast constant-time double-precision operations. And then still, there might be an <a href="https://twitter.com/bwesterb/status/1509583201848672258">obscure bug</a> that has been overlooked.</p><p>In time, it might be figured out how to do constant-time arithmetic on the FPU robustly, but we feel it’s too early to deploy Falcon where the timing of signature minting can be measured. Notwithstanding, Falcon is a great choice for offline signatures such as those in certificates.</p>
    <div>
      <h4>Dilithium’s size</h4>
      <a href="#dilithiums-size">
        
      </a>
    </div>
    <p>This brings us to <b>Dilithium</b>. Compared to Falcon it’s easy to implement safely and has better signing performance to boot. Its signatures and public keys are much larger though, which is problematic. For example, to each browser visiting this very page, we sent six signatures and two public keys. If we’d replace them all with Dilithium2 we would be looking at <b>17KB of additional data</b>. Last year, <a href="/sizing-up-post-quantum-signatures/">we ran an experiment</a> to see the impact of additional data in the TLS handshake:</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/75kLinYj12cYdK8eHQvRx8/d880e06a52625cb0fc8f681ddc3b6cfc/pasted-image-0--1--1.png" />
            
            </figure><p>Impact of larger signatures on TLS handshake time. For the details, see <a href="/sizing-up-post-quantum-signatures/">this blog</a>.</p><p>There are some caveats to point out: first, we used a big 30-segment initial congestion window (icwnd). With a normal icwnd, the <i>bump</i> at 40KB moves to 10KB. Secondly, the height of this bump is the <a href="https://www.cloudflare.com/learning/cdn/glossary/round-trip-time-rtt/">round-trip time (RTT)</a>, which due to our broadly distributed network, is <a href="/cdn-latency-passive-measurement/">very low</a> for us. Thus, switching to Dilithium alone might well double your TLS handshake times. More disturbingly, we saw that some connections stopped working when we added too much data:</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/3QHAZZc6N74wSbYRJlgZDy/bf8af43d90ad6a2144dc2504167a80cb/Screen-Shot-2022-07-08-at-10.04.10-AM.png" />
            
            </figure><p>Amount of failed TLS handshakes by size of added signatures. For the details, see <a href="/sizing-up-post-quantum-signatures/">this blog</a>.</p><p>We expect this was caused by misbehaving middleboxes. Taken together, we concluded that early adoption of post-quantum signatures on the Internet would likely be more successful if those six signatures and two public keys would fit in 9KB. This can be achieved by using Dilithium for the handshake signature and Falcon for the other (offline) signatures.</p>
    <div>
      <h4>At most one of Dilithium or Falcon</h4>
      <a href="#at-most-one-of-dilithium-or-falcon">
        
      </a>
    </div>
    <p>Unfortunately, NIST stated on <a href="https://csrc.nist.gov/CSRC/media/Presentations/pqc-update-round-2-and-beyond/images-media/pqcrypto-sept2020-moody.pdf">several</a> <a href="https://nvlpubs.nist.gov/nistpubs/ir/2020/NIST.IR.8309.pdf">occasions</a> that it would choose only two signature schemes, but not both Falcon and Dilithium:</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/rOBpuWZKsYrCB14qBI8UD/d1cbbd680a6c3ebf5ec720c1c77ae708/Screenshot-2022-07-06-at-13.20.43.png" />
            
            </figure><p><a href="https://csrc.nist.gov/CSRC/media/Presentations/pqc-update-round-2-and-beyond/images-media/pqcrypto-sept2020-moody.pdf">Slides</a> of NIST’s status update after the conclusion of round 2</p><p>The reason given is that both Dilithium and Falcon are based on structured lattices and thus do not add more security diversity. Because of the difficulty of implementing Falcon correctly, we expected NIST to standardize Dilithium and as a backup SPHINCS+. With that guess, we saw a big challenge ahead: to keep the Internet fast we would need some difficult and rigorous changes to the protocols.</p>
    <div>
      <h5>The twist</h5>
      <a href="#the-twist">
        
      </a>
    </div>
    <p>However, to everyone’s surprise, NIST <b>picked both</b>! NIST chose to standardize Dilithium, Falcon <i>and</i> SPHINCS+. This is a very pleasant surprise for the Internet: it means that post-quantum authentication will be much simpler to adopt.</p>
    <div>
      <h4>SPHINCS+, the conservative choice</h4>
      <a href="#sphincs-the-conservative-choice">
        
      </a>
    </div>
    <p>In the excitement of the fight between Dilithium and Falcon, we could almost forget about SPHINCS+, a stateless hash-based signature. Its big advantage is that its security is based on the second-preimage resistance of the underlying hash-function, which is well understood. It is not a stretch to say that SPHINCS+ is the most conservative choice for a signature scheme, post-quantum or otherwise. But even as a co-submitter of SPHINCS+, I have to admit that its performance isn’t that great.</p><p>There is a lot of flexibility in the parameter choices for SPHINCS+: there are tradeoffs between signature size, signing time, verification time and the maximum number of signatures that can be minted. Of the current parameter sets, the “s” are optimized for size and “f” for signing speed; both chosen to allow 264 signatures. NIST has hinted at reducing the signature limit, which would improve performance. A custom choice of parameters for a particular application would improve it even more, but would still trail Dilithium.</p><p>Having discussed NIST choices, let’s have a look at those that were left out.</p>
    <div>
      <h4>The other finalists</h4>
      <a href="#the-other-finalists">
        
      </a>
    </div>
    <p>There were three other finalists: GeMSS, Picnic and Rainbow. None of these are progressing to a fourth round.</p><p><b>Picnic</b> is a conservative choice similar to SPHINCS+. Its construction is interesting: it is based on the <a href="https://en.wikipedia.org/wiki/Secure_multi-party_computation">secure multiparty computation</a> of a block cipher. To be efficient, a non-standard block cipher is chosen. This makes Picnic’s assumptions a bit less conservative, which is why NIST preferred SPHINCS+.</p><p><b>GeMSS</b> and <b>Rainbow</b> are specialists: they have large public key sizes (hundreds of kilobytes), but very small signatures (33–66 bytes). They would be great for applications where the public key can be distributed out of band, such as for the Signed Certificate Timestamps included in certificates for <a href="https://certificate.transparency.dev/">Certificate Transparency</a>. Unfortunately, both turned out to <a href="https://eprint.iacr.org/2022/214.pdf">be</a> <a href="https://hal.archives-ouvertes.fr/hal-03533455/document">broken</a>.</p>
    <div>
      <h4>Signature schemes on the horizon</h4>
      <a href="#signature-schemes-on-the-horizon">
        
      </a>
    </div>
    <p>Although we expect Falcon and Dilithium to be practical for the Internet, there is ample room for improvement. Many new signature schemes have been proposed after the start of the competition, which could help out a lot. NIST recognizes this and is <a href="https://csrc.nist.gov/News/2022/pqc-candidates-to-be-standardized-and-round-4#new-call">opening a new competition</a> for post-quantum signature schemes.</p><p>A few schemes that have caught our eye already are <b>UOV</b>, which has similar <i>performance</i> trade-offs to those for GeMSS and Rainbow; <b>SQISign</b>, which has small signatures, but is computationally expensive; and <b>MAYO</b>, which looks like it might be a great general-purpose signature scheme.</p>
    <div>
      <h4>Stateful hash-based signatures</h4>
      <a href="#stateful-hash-based-signatures">
        
      </a>
    </div>
    <p>Finally, we’d be remiss not to mention the post-quantum signature scheme that already <a href="https://csrc.nist.gov/publications/detail/sp/800-208/final">has been standardized by NIST</a>: the stateful hash-based signature schemes <b>LMS</b> and <b>XMSS</b>. They share the same conservative security as their sibling SPHINCS+, but have much better performance. The rub is that for each keypair there are a finite number of signature <i>slots</i> and each signature slot can only be used once. If it’s used twice, it <a href="https://research.tue.nl/en/publications/oops-i-did-it-again-security-of-one-time-signatures-under-two-mes">is insecure</a>. This is why they are called <i>stateful</i>; as the signer must remember the state of all slots that have been used in the past, and any mistake is fatal. Keeping the state perfectly can be very challenging.</p>
    <div>
      <h2>What else</h2>
      <a href="#what-else">
        
      </a>
    </div>
    
    <div>
      <h3>What’s next?</h3>
      <a href="#whats-next">
        
      </a>
    </div>
    <p>NIST will draft standards for the selected schemes and request public feedback on them. There might be changes to the algorithms, but we do not expect anything major. The standards are expected to be finalized in 2024.</p><p>In the coming months, many languages, libraries and protocols will already add preliminary support for the current version of Kyber and the other post-quantum algorithms. We’re helping out to make post-quantum available to the Internet as soon as possible: we’re working within the IETF to add Kyber to TLS and will contribute upstream support to popular open-source libraries.</p>
    <div>
      <h4>Start experimenting with Kyber today</h4>
      <a href="#start-experimenting-with-kyber-today">
        
      </a>
    </div>
    <p>Now is a good time for you to try out Kyber in your software stacks. We were lucky to correctly guess Kyber would be picked and have experience running it internally. Our tests so far show it performs great. Your requirements might differ, so try it out yourself.</p><p>The <a href="https://github.com/pq-crystals/kyber">reference implementation</a> in C is excellent. The Open Quantum Safe project <a href="https://openquantumsafe.org/applications/tls.html">integrates</a> it with various TLS libraries, but beware: the algorithm identifiers and scheme might still change, so be ready to migrate.</p><p>Our <a href="https://github.com/cloudflare/circl">CIRCL</a> library has a fast independent implementation of <a href="https://github.com/cloudflare/circl/tree/main/kem">Kyber in Go</a>. We implemented Kyber ourselves so that we could help tease out any implementation bugs or subtle under specification.</p>
    <div>
      <h4>Experimenting with post-quantum signatures</h4>
      <a href="#experimenting-with-post-quantum-signatures">
        
      </a>
    </div>
    <p>Post-quantum signatures are not as urgent, but might require more engineering to get right. First off, which signature scheme to pick?</p><ul><li><p>Are large signatures and slow operations acceptable? Go for SPHINCS+.</p></li><li><p>Do you need more performance?</p><ul><li><p>Can your signature generation be timed, for instance when generated on-the-fly? Then go for (a <i>hybrid</i>, see below, with) Dilithium.</p></li><li><p>For offline signatures, go for (a hybrid with) Falcon.</p></li></ul></li><li><p>If you can keep a state perfectly, check out XMSS/LMS.</p></li></ul><p><a href="https://openquantumsafe.org/">Open Quantum Safe</a> can be used to test these out. Our CIRCL library also has a fast independent implementation of <a href="https://github.com/cloudflare/circl/tree/master/sign/dilithium">Dilithium in Go</a>. We’ll add Falcon and SPHINCS+ soon.</p>
    <div>
      <h3>Hybrids</h3>
      <a href="#hybrids">
        
      </a>
    </div>
    <p>A <b>hybrid</b> is a combination of a classical and a post-quantum scheme. For instance, we can combine Kyber512 with X25519 to create a single <b>Kyber512X</b> key agreement. The advantage of a hybrid is that the data remains secure against non-quantum attackers even if Kyber512 turns out broken. It is important to note that it’s not just about the algorithm, but also the implementation: Kyber512 might be perfectly secure, but an implementation might leak via side-channels. The downside is that two key-exchanges are performed, which takes more CPU cycles and bytes on the wire. For the moment, we prefer sticking with hybrids, but we will revisit this soon.</p>
    <div>
      <h3>Post-quantum security levels</h3>
      <a href="#post-quantum-security-levels">
        
      </a>
    </div>
    <p>Each algorithm has different parameters targeting various post-quantum security levels. Up till now we’ve only discussed the performance characteristics of security level 1 (or 2 in case of Dilithium, which doesn’t have level 1 parameters.) The definition of the security levels is rather interesting: they’re defined as being as hard to crack by a classical or quantum attacker as specific instances of AES and SHA:</p><table><tr><td><p><b>Level</b></p></td><td><p><b>Definition, as least as hard to break as…</b></p></td></tr><tr><td><p>1</p></td><td><p>To recover the key of AES-128 by exhaustive search</p></td></tr><tr><td><p>2</p></td><td><p>To find a collision in SHA256 by exhaustive search</p></td></tr><tr><td><p>3</p></td><td><p>To recover the key of AES-192 by exhaustive search</p></td></tr><tr><td><p>4</p></td><td><p>To find a collision in SHA384 by exhaustive search</p></td></tr><tr><td><p>5</p></td><td><p>To recover the key of AES-256 by exhaustive search</p></td></tr></table><p>So which security level should we pick? Is level 1 good enough? We’d need to understand how hard it is for a quantum computer to crack AES-128.</p>
    <div>
      <h4>Grover’s algorithm</h4>
      <a href="#grovers-algorithm">
        
      </a>
    </div>
    <p>In 1996, two years after Shor’s paper, Lov Grover <a href="https://journals.aps.org/prl/abstract/10.1103/PhysRevLett.79.325">published</a> his <b>quantum search algorithm</b>. With it, you can find the AES-128 key (given known plain and ciphertext) with only 264 executions of the cipher <i>in superposition</i>. That sounds much faster than the 2127 tries on average for a classical brute-force attempt. In fact, it sounds like security level 1 isn’t that secure at all. Don’t be alarmed: level 1 is much more secure than it sounds, but it requires some context.</p><p>To start, a classical brute-force attempt can be parallelized — millions of machines can participate, sharing the work. Grover’s algorithm, on the other hand, <a href="https://arxiv.org/abs/quant-ph/9711070">doesn’t parallelize</a> well because the quadratic speedup disappears over that portion. To wit, a billion quantum computers would still have to do 249 iterations each to crack AES-128.</p><p>Then each iteration requires many gates. It’s <a href="https://ieeexplore.ieee.org/stamp/stamp.jsp?tp=&amp;arnumber=8961201">estimated</a> that these 249 operations take roughly 264 noiseless quantum gates. If each of our billion quantum computers could execute a billion noiseless quantum gates per second, then it’d still take 500 years.</p><p>That already sounds more secure, but we’re not done. Quantum computers do not execute noiseless quantum gates: they’re analogue machines. Every operation has a little bit of noise. Does this mean that quantum computing is hopeless? Not at all! There are <a href="https://en.wikipedia.org/wiki/Quantum_error_correction">clever algorithms</a> to turn, say, a million noisy qubits into one less noisy qubit. It doesn’t just add qubits, but also extra gates. How much depends very much on the exact details of the quantum computer.</p><p>It is not inconceivable that in the future there will be quantum computers that effectively execute far more than a billion noiseless gates per second, but it will likely be decades after Shor’s algorithm is practical. This all is a long-winded way of saying that security level 1 seems solid for the foreseeable future.</p>
    <div>
      <h4>Hedging against attacks</h4>
      <a href="#hedging-against-attacks">
        
      </a>
    </div>
    <p>A different reason to pick a higher security level is to hedge against better attacks on the algorithm. This makes a lot of sense, but it is important to note that this isn’t a foolproof strategy:</p><ul><li><p>Not all attacks are small improvements. It’s possible that improvements in cryptanalysis break all security levels at once.</p></li><li><p>Higher security levels do not protect against implementation flaws, such as (<a href="/hertzbleed-explained/">new</a>) timing vulnerabilities.</p></li></ul><p>A different aspect, that’s arguably more important than picking a high number, is <b>crypto agility</b>: being able to switch to a new algorithm/implementation in case of a break of trouble. Let’s hope that we will not need it, but now we’re going to switch, it’s nice to make it easier in the future.</p>
    <div>
      <h3>CIRCL is Post-Quantum Enabled</h3>
      <a href="#circl-is-post-quantum-enabled">
        
      </a>
    </div>
    <p>We already mentioned CIRCL a few times, it’s our optimized crypto-library for Go whose <a href="/introducing-circl/">development we started</a> in 2019. CIRCL already contains support for several post-quantum algorithms such as the KEMs Kyber and SIKE and signature schemes Dilithium and Frodo. The code is up-to-date and compliant with test vectors from the third round. CIRCL is readily usable in Go programs either as a library or natively as part of Go using <a href="https://github.com/cloudflare/go">this fork</a>.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/13Yr1CAgGUVkNU48YQcowR/0e79dde272e73143135795d2cb78b521/pasted-image-0--2-.png" />
            
            </figure><p>One goal of CIRCL is to enable experimentation with post-quantum algorithms in TLS. For instance, we ran a <a href="/kemtls-post-quantum-tls-without-signatures/">measurement study</a> to <a href="https://eprint.iacr.org/2021/1019">evaluate</a> the feasibility of the KEMTLS protocol for which we’ve adapted the TLS package of the Go library.</p><p>As an example, this code uses CIRCL to sign a message with eddilithium2, a hybrid signature scheme pairing Ed25519 with Dilithium mode 2.</p>
            <pre><code>package main

import (
  "crypto"
  "crypto/rand"
  "fmt"

  "github.com/cloudflare/circl/sign/eddilithium2"
)

func main() {
  // Generating random keypair.
  pk, sk, err := eddilithium2.GenerateKey(rand.Reader)

  // Signing a message.
  msg := []byte("Signed with CIRCL using " + eddilithium2.Scheme().Name())
  signature, err := sk.Sign(rand.Reader, msg, crypto.Hash(0))

  // Verifying signature.
  valid := eddilithium2.Verify(pk, msg, signature[:])

  fmt.Printf("Message: %v\n", string(msg))
  fmt.Printf("Signature (%v bytes): %x...\n", len(signature), signature[:4])
  fmt.Printf("Signature Valid: %v\n", valid)
  fmt.Printf("Errors: %v\n", err)
}</code></pre>
            
            <pre><code>Message: Signed with CIRCL using Ed25519-Dilithium2
Signature (2484 bytes): 84d6882a...
Signature Valid: true
Errors: &lt;nil&gt;</code></pre>
            <p>As can be seen the application programming interface is the same as the <a href="https://pkg.go.dev/crypto#Signer">crypto.Signer</a> interface from the standard library. Try it out, and we’re happy to hear your <a href="https://github.com/cloudflare/circl/issues/new">feedback</a>.</p>
    <div>
      <h2>Conclusion</h2>
      <a href="#conclusion">
        
      </a>
    </div>
    <p>This is a big moment for the Internet. From a set of excellent options for post-quantum key agreement, NIST chose Kyber. With it, we can secure the data on the Internet today against quantum adversaries of the future, without compromising on performance.</p><p>On the authentication side, NIST pleasantly surprised us by choosing both Falcon and Dilithium against their earlier statements. This was a great choice, as it will make post-quantum authentication more practical than <a href="/sizing-up-post-quantum-signatures/">we expected</a> it would be.</p><p>Together with the cryptography community, we have our work cut out for us: we aim to make the Internet post-quantum secure as fast as possible.</p><p>Want to follow along? Keep an eye on <a href="/tag/post-quantum/">this blog</a> or have a look at <a href="https://research.cloudflare.com">research.cloudflare.com</a>.</p><p>Want to help out? We’re <a href="https://www.cloudflare.com/careers/jobs/?title=research+engineer">hiring</a> and open to <a href="https://research.cloudflare.com/outreach/academic-programs/researchers/">research visits</a>.</p>
    <div>
      <h3>Watch on Cloudflare TV</h3>
      <a href="#watch-on-cloudflare-tv">
        
      </a>
    </div>
    <div></div><p></p> ]]></content:encoded>
            <category><![CDATA[Research]]></category>
            <category><![CDATA[Post-Quantum]]></category>
            <category><![CDATA[Cryptography]]></category>
            <guid isPermaLink="false">3Ig8G8arSwNFKog5OMhkHk</guid>
            <dc:creator>Bas Westerbaan</dc:creator>
        </item>
        <item>
            <title><![CDATA[Sizing Up Post-Quantum Signatures]]></title>
            <link>https://blog.cloudflare.com/sizing-up-post-quantum-signatures/</link>
            <pubDate>Mon, 08 Nov 2021 15:39:18 GMT</pubDate>
            <description><![CDATA[ How much room does TLS have for the big post-quantum signatures? We had a look: it’s tight. ]]></description>
            <content:encoded><![CDATA[ <p></p><p>Quantum computers are a boon and a bane. Originally <a href="https://link.springer.com/chapter/10.1007%2F978-3-030-23922-0_2">conceived</a> by Manin and Feynman to simulate nature efficiently, large-scale quantum computers will speed-up innovation in material sciences by orders of magnitude. Consider the technical advances enabled by the discovery of new materials (with bronze, iron, steel and silicon each ascribed their own age!); quantum computers could help to unlock the next age of innovation. Unfortunately, they will also break the majority of the cryptography that’s currently used in TLS to protect our web browsing. They fall in two categories:</p><ol><li><p><b>Digital signatures,</b> such as RSA, which ensure you’re talking to the right server.</p></li><li><p><b>Key exchanges,</b> such as Diffie–Hellman, which are used to agree on encryption keys.</p></li></ol><p>A moderately-sized stable quantum computer will easily break the signatures and key exchanges currently used in TLS using <a href="https://en.wikipedia.org/wiki/Shor%27s_algorithm">Shor’s algorithm</a>. Luckily this can be fixed: over the last two decades, there has been great progress in so-called <a href="https://www.cloudflare.com/learning/ssl/quantum/what-is-post-quantum-cryptography/"><b>post-quantum cryptography</b></a>. “Post quantum”, abbreviated <b>PQ</b>, means secure against quantum computers. Five years ago, the standards institute NIST started a <a href="https://csrc.nist.gov/projects/post-quantum-cryptography">public process</a> to standardise post-quantum signature schemes and key exchanges. The outcome is expected to be announced early 2022.</p><p>At Cloudflare, we’re not just following this process closely, but are also testing the real-world performance of PQ cryptography. In our <a href="/the-tls-post-quantum-experiment/">2019 experiment</a> with Google, we saw that we can switch to a PQ key exchange with little performance impact. Among the NIST finalists, there are many with even better performance. This is good news, as we would like to switch to PQ key exchanges as soon as possible — indeed, an attacker could intercept sensitive data today, then keep and decrypt it years into the future using a quantum computer.</p>
    <div>
      <h2>Why worry about PQ signatures today</h2>
      <a href="#why-worry-about-pq-signatures-today">
        
      </a>
    </div>
    <p>One would think we can take it easy with signatures for TLS: we only need to have them replaced before a large quantum computer is built. The situation, however, is more complicated.</p><ul><li><p>The <b>lead time</b> to change signatures is higher. Not only do we need to change the browsers and servers, we also need to change certificate authorities (CAs) and everyone’s certificate management.</p></li><li><p><b>TLS is addicted to small and fast signatures</b>. For this page that you’re viewing we sent six signatures: two in the certificate chain; one handshake signature; one <a href="/high-reliability-ocsp-stapling/">OCSP staple</a> and finally two SCTs used for <a href="/introducing-certificate-transparency-and-nimbus/">certificate transparency</a>.</p></li><li><p>PQ signature schemes have wildly <b>varying performance trade-offs and quirks</b> (as we’ll see below) which stack up quickly with six signatures, which all have slightly different requirements.</p></li></ul><p>One might ask: can’t we be clever and get rid of some of these signatures? We think so! For instance, we can replace the handshake signature with a smaller <a href="/kemtls-post-quantum-tls-without-signatures/">key exchange</a> or suppress <a href="https://www.amazon.science/publications/speeding-up-post-quantum-tls-handshakes-by-suppressing-intermediate-ca-certificates">intermediate certificates</a>. Such fundamental changes take years to be adopted. That is why we are also investigating the performance of plain TLS with <b>drop-in</b> <b>PQ signatures</b>.</p><p>So, what are our options?</p>
    <div>
      <h2>The zoo of PQ signatures</h2>
      <a href="#the-zoo-of-pq-signatures">
        
      </a>
    </div>
    <p>The three finalists of the NIST competition are <a href="https://pq-crystals.org/dilithium/index.shtml">Dilithium</a>, <a href="https://falcon-sign.info/">Falcon</a> and <a href="https://www.pqcrainbow.org/">Rainbow</a>. In the table below we compare them against RSA and <a href="https://www.cloudflare.com/learning/dns/dnssec/ecdsa-and-dnssec/">ECDSA</a>, both of which are in common use today, and a selection of other PQ schemes that might see standardisation in the future.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/3jWjoMzawYpHGELyZHZYxl/23d58d97907d027f97bc49a9343e459b/Screenshot-2021-11-22-at-13.17.20.png" />
            
            </figure><p>(* There are many caveats to this table. We compare instances of PQC security level 1. Signing and verification times vary considerably by hardware platform and implementation constraints. They should be taken as a rough indication only. The signing time of Falcon512 is discussed later on. We do not list all relevant variants of the NIST alternates or promising schemes. This instance of XMSS can only sign a million messages, is stateful, requires quite a bit of storage for quick signing, is not standardised and thus far from a drop-in replacement. Rainbow has one other variant, which has smaller private keys.)</p><p>None of these PQ signatures are a clear-cut drop-in replacement. To start, all have (much) larger signatures, except for Rainbow, GeMMS and SQISign. Rainbow and GeMMS have huge public keys and SQISign is very slow.</p>
    <div>
      <h3>TLS signatures</h3>
      <a href="#tls-signatures">
        
      </a>
    </div>
    <p>To confuse matters even more, the signatures within TLS are not all the same:</p><ul><li><p><b>Online</b>. Only the handshake signature is created with every incoming TLS connection, and so signing needs to be fast. Dilithium fits this role well.</p></li><li><p><b>Offline</b>. All other signatures are made months/years in advance, and so signing time is not that important. This group splits in two:</p><ul><li><p><b>With a public key</b>. The certificate chain includes signatures and their public keys. Here Falcon seems most suited.</p></li><li><p><b>Without a public key</b>. The remaining three (SCTs and OCSP staple) are just signatures. For these, Rainbow seems optimal, as its large public keys are not transmitted.</p></li></ul></li></ul><p>Using Dilithium, Falcon, and Rainbow, together, allows optimization for both speed and size simultaneously, which seems like a great idea. However, combining different signatures at the same time has disadvantages:</p><ul><li><p>A security issue in the design or implementation of one of the signatures compromises the whole.</p></li><li><p>Clients need to implement multiple cryptographic algorithms, in this case three of them, which is troublesome for smaller devices — especially if separate hardware support is needed for each of them.</p></li></ul><p>So do we really need to eke out every byte and every cycle of performance? Or can we stick to a single signature scheme for simplicity and security?</p>
    <div>
      <h3>Can we pick just one?</h3>
      <a href="#can-we-pick-just-one">
        
      </a>
    </div>
    <p>If we stick to one signature scheme, looking just at the numbers, Falcon512 seems like a reasonable option. It needs 5KB of extra space (compared to a classical handshake), about the same as the Dilithium–Falcon–Rainbow chimera of before. Unfortunately Falcon comes with a caveat: creating signatures efficiently requires constant-time 64-bit floating point arithmetic. Without it, signing is 20x slower. But speed alone is not enough; it <i>has to</i> run in constant time. Without that, one can slowly learn the secret key by measuring the time it takes to create a signature.</p><p>Although PCs typically have a sufficiently constant-time floating-point unit, many smaller devices do not. Thus, Falcon seems ill-suited for general purpose online signatures.</p><p>What about Dilithium2? It needs 17KB extra — let’s find out if that makes a big difference.</p>
    <div>
      <h2>Evidence by Experiment</h2>
      <a href="#evidence-by-experiment">
        
      </a>
    </div>
    <p>All the different variables and constraints clearly complicate an already challenging puzzle. The best thing is to just try the options. Over the last few years several interesting papers have appeared studying the various options, such as <a href="#skd20">SKD20</a>, <a href="#pst20">PST20</a>, <a href="#skd21">SKD21</a> and <a href="#pknln22">PKNLN22</a>. These are great starts, but don’t provide a complete picture:</p><ul><li><p>SCTs and OCSP staples have yet to be considered. Leaving half (three) of the signatures out changes the results significantly.</p></li><li><p>The networks tested or emulated offer insights, but are far from representative of real-world conditions. All tests were conducted between two datacenters (which does not include real-world last-mile conditions such as Wi-Fi or spotty mobile connections); <i>or</i> a network was simulated with unrealistic packet loss rates.</p></li></ul><p>Here, Cloudflare can contribute. One of the things we like to do is to put new ideas in the community <a href="/cloudflare-research-two-years-in/">to the test</a> on a global scale.</p><p>In this case we’re just taking a first step. Setting up a real-world experiment with a modified browser is quite involved, especially when we consider the many possible variations. Instead, as a first step, we decided first to investigate the most striking variable, the size, and try to answer the question:</p><p><i>How do larger signatures affect the TLS handshake?</i></p><p>There are two parts to this: how fast are they, and, more importantly, do they work at all?</p>
    <div>
      <h3>Experimental setup</h3>
      <a href="#experimental-setup">
        
      </a>
    </div>
    <p>We need some way to emulate bigger signatures without having to modify the clients. We considered several options. The first idea we had was to pad a valid certificate with a dummy extension. That would require a custom certificate for each size to test, which is cumbersome. Then we considered responding with a dummy <i>ServerHello extension</i>. This is, however, not allowed by TLS 1.2 without a corresponding <i>ClientHello extension</i>. In the end, we went for <b>adding dummy certificates</b>.</p>
    <div>
      <h3>Dummy certificates</h3>
      <a href="#dummy-certificates">
        
      </a>
    </div>
    <p>These dummy certificates are 1kB self-signed invalid certificates that have nothing to do with the certificate chain. To vary the size to test, we simply add more copies. Adding unrelated certificates to the certificate chain is a common misconfiguration and clients have learnt to ignore them. In fact, TLS 1.3 stipulates that these (in <a href="https://datatracker.ietf.org/doc/html/rfc2119">rfc-speak</a>) <i>SHOULD</i> be ignored by the client. Testing out hundreds of browsers, we saw no issues.</p><p>Standards and reality don’t always agree: when inserting dummy certificates on actual traffic, we saw issues with a small, but not insignificant number of clients. We don’t want to ruin anyone’s connection, and so we decided to use separate connections for this purpose.</p>
    <div>
      <h3>Using challenge pages to launch probes</h3>
      <a href="#using-challenge-pages-to-launch-probes">
        
      </a>
    </div>
    <p>So what did we actually do? On a small percentage of the challenge pages (those with the CAPTCHA), we pick a number <i>n</i> and a random key and send this key in two separate background requests to:</p><ul><li><p><code>0.tls-size-experiment-c.cloudflareresearch.com</code></p></li><li><p><code>_**[n]**_.tls-size-experiment-1.cloudflareresearch.com</code></p></li></ul><p>The first, <b>the control</b>, is a normal webpage that stores the TLS handshake time under the key that’s been sent. The real action happens at the second, <b>the live</b>, which adds the <i>n</i> dummy certificates to its chain. The live also stores handshake time under the given key. We could call it “experimental” instead of “live”, but the benign control connection is also an important part of the experiment. Indeed, it allows us to see if live connections are missing. These endpoints were a breeze to write using <a href="/workers-kv-is-ga/">Cloudflare Workers and KV</a>.</p>
    <div>
      <h3>How much dummy data to test?</h3>
      <a href="#how-much-dummy-data-to-test">
        
      </a>
    </div>
    <p>Before launching the experiment, we tested several libraries and browsers on the live endpoint to see whether they would error due to the dummy certificates. None rejected a single certificate, but how far can we go? TLS 1.3 theoretically allows a certificate chain of 16MB, but in practice many clients reject a much shorter chain. OpenSSL, for instance, rejects one of 102kB. The most stingy we found is Go’s TLS client, which rejects a handshake larger than 64kB. Because of this, we tested with between 1 and 59 dummy certificates.</p>
    <div>
      <h3>Intermezzo: TCP’s congestion window</h3>
      <a href="#intermezzo-tcps-congestion-window">
        
      </a>
    </div>
    <p>So, what did we find? The graphs are in the next section, have a peek! Before diving right in, we would like to explain a crucial concept, the TCP <b>congestion window</b>, that helps us read the results.</p><p>Data sent over the Internet is broken down in packets of around 1.4kB that traverse many routers to reach their destination. Sometimes a router has more incoming packets than it can handle and it has to drop them — this is called <b>congestion</b>. To avoid causing congestion, TCP initially sends just a few packets (typically ten, so ~14kB). Then, with every acknowledgement received in return, the TCP sender will very quickly ramp up the number of packets that it keeps <i>in flight</i>. This number is called the <b>congestion window</b> (<b>cwnd</b>). When it gets too high, congestion occurs, packets are dropped and in response the sender backs off by dialing down the congestion window. Any dropped packet is seen as a sign of congestion by TCP. For this reason, Wi-Fi has its own retransmission mechanism transparent to TCP.</p><p>Considering all this, we would expect to see two effects with larger signatures:</p><ul><li><p><b>Gentle slope.</b> Every single packet needs some extra time to transmit, due to limited bandwidth and possible physical-layer retransmissions. This slope isn’t so gentle if your internet connection is slow or spotty.</p></li><li><p><b>cwnd wall.</b> Once we fill the congestion window, we have to wait for a whole roundtrip before we can continue. This effect is stronger if the <a href="https://www.cloudflare.com/learning/cdn/glossary/round-trip-time-rtt/">roundtrip time (RTT)</a> is higher.</p></li></ul><p>The strength of the two effects can differ. With a fast connection and high RTT we expect to see the graph below on the left. With a slow connection and low RTT, we expect the one on the right.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/5jCdECcIdSmu6J04h85L0Y/20f4c11f1f366c1ff98fd7a405ab0dec/image2.jpg" />
            
            </figure><p>There might be other unknown effects. The best thing is to have a look.</p><p>In PQ research, the second effect has gained the most attention. The larger signatures simply do not fit in the initial congestion windows used today. A common suggestion in response has been to simply increase the initial congestion window to accommodate the larger signatures. This is far from a <a href="https://static.googleusercontent.com/media/research.google.com/en//pubs/archive/36640.pdf">simple</a> <a href="https://datatracker.ietf.org/doc/html/rfc6928">change</a> to make globally, and we have to understand if this solves the problem to begin with.</p>
    <div>
      <h2>Results</h2>
      <a href="#results">
        
      </a>
    </div>
    <p>Over 24 days we’ve received 964,499 live connections from 454,218 different truncated IPs (to 24 bits, “/24”, for IPv4 and 48 bits for IPv6) and 11,239 different <a href="https://en.wikipedia.org/wiki/Autonomous_system_(Internet)">ASNs</a>. First, let’s check how many clients had trouble with the bigger handshakes.</p>
    <div>
      <h3>Can clients handle the larger handshakes?</h3>
      <a href="#can-clients-handle-the-larger-handshakes">
        
      </a>
    </div>
    <p>The control connection was missing for 2.4% of the live connections. This is not alarming: we expect some connections to be missing for harmless reasons, such as the user browsing away from the challenge page. There are, however, significantly more control connections without live connection at 3.6%.</p><p>In the graph below on the left we break the number of received live connections down by the number of dummy certificates added. Because we pick the number of certificates randomly, the graph is noisy. To get a clearer picture, we started storing the number of certificates added in the corresponding control request, which gives us the graph on the right. The bumps at 10kB and 30kB suggest that there are clients or middleboxes that cannot handle these handshake sizes.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/4AIbHQImRIWL8z1KMW8h05/640c8c357daf5493a0eae88258b7529d/image3-13.png" />
            
            </figure>
    <div>
      <h3>Handshake times with larger signatures</h3>
      <a href="#handshake-times-with-larger-signatures">
        
      </a>
    </div>
    <p>What is the effect on the handshake time? The graph on the left shows the <a href="https://en.wikipedia.org/wiki/Weighted_median">weighted</a> median and 75th percentile TLS handshake times for different amounts of dummy data added. We use the weight so that every truncated IP contributes equally. On the right we show the slowdowns for each size, relative to the handshake time of the control connection.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/1boFkI4HQ2uOqmp3yb0gL5/cdecd307ee2017a5b0e4d922bfd846ba/image1-8.png" />
            
            </figure><p>We can see the <i>not-so-gentle slope</i> until 40kB, where we hit a <i>little</i> <i>wall</i> that corresponds to Cloudflare’s default initial congestion window of 30 packets.</p><p>Adding 35kB fits within <i>our</i> initial congestion window. Nonetheless, the median handshake with 35kB extra is 40% slower. The slowest 10% are even worse off, taking 60% as much time. Thus even though we stay within the congestion window, the added data is not for free at all.</p><p>We can now translate these insights back to concrete PQ signatures. For example, using Dilithium2 as a drop-in replacement, we need around 17kB extra. That also fits within <i>our</i> initial congestion window with a median slowdown of 20%, which gets worse for the tail-end of users. For the normal initial congestion window of ten, we expect the slowdown to be much worse — around 60–80%.</p><p>There are several caveats to point out:</p><ul><li><p>These experiments used an initial congestion window of 30 packets instead of ten. With a smaller initial congestion window of ten, which is the default for most systems, we would expect the wall to move from 40kB to around 10kB.</p></li><li><p>Because of our presence all across the world, our RTTs are <a href="/cdn-latency-passive-measurement/">fairly low</a>. Thus the effect of the <i>cwnd wall</i> is smaller for us.</p></li><li><p>Challenge pages are served, by design, to those clients that we expect to be bots. This adds a significant bias because bots are generally hosted at well-connected providers, and so are closer than users.</p></li><li><p>HTTP/3 was not supported by the server we used for the endpoint. Support for IPv6 was only added ten days into the experiment and accounts for 10.9% of the measurements.</p></li><li><p>Actual TLS handshakes differ in size much more than tested in this setup due to differences in certificate sizes and extensions and other factors.</p></li></ul>
    <div>
      <h2>What have we learned?</h2>
      <a href="#what-have-we-learned">
        
      </a>
    </div>
    <p>The TLS handshake is just one step (~5–20%) in a long chain required to show you a webpage. Casually browsing, it would be hard to notice a TLS handshake that’s 60% slower. But such differences add up. To make a website really fast, you need many seemingly insignificant speedups. Browser developers take this seriously: <a href="https://chromium.googlesource.com/chromium/src/+/refs/heads/main/docs/speed/addressing_performance_regressions.md#if-you-believe-the-regression-is-justified">only in exceptional cases</a> does Chrome allow a change that slows down any microbenchmark by even a percent.</p><p>Because of the many parties and complexities involved, we should avoid waiting too long to adopt post-quantum signatures in TLS. That’s a hard sell if it comes at the price of a double-digit slowdown, not least to content servers but also to browser vendors and clients.</p><p>A timely adoption of PQ signatures on the web would be great. Our evidence so far suggests that this will be easiest, if six signatures and two public keys would fit in 9kB.</p><p>We will continue our efforts to help build a post-quantum secure Internet. To follow along, keep an eye on this blog or have a look at <a href="https://research.cloudflare.com">research.cloudflare.com</a>.</p><p><i>Bas Westerbaan is co-submitter of the SPHINCS+ signature scheme.</i></p>
    <div>
      <h2>References</h2>
      <a href="#references">
        
      </a>
    </div>
    <p>SKD20: Sikeridis, Kampanakis, Devetsikiotis. <a href="https://dl.acm.org/doi/10.1145/3386367.3431305">Assessing the overhead of post-quantum cryptography in TLS 1.3 and SSH</a>. CoNEXT’20.PST20: Paquin, Stebila, Tamvada. <a href="https://eprint.iacr.org/2019/1447.pdf">Benchmarking Post-Quantum Cryptography in TLS</a>. PQCrypto 2020.SKD21: Sikeridis, Kampanakis, Devetsikiotis. <a href="https://eprint.iacr.org/2020/071.pdf">Post-Quantum Authentication in TLS 1.3: A Performance Study</a>. NDSS2020.PKNLN22: Paul, Kuzovkova, Lahr, Niederhagen. <a href="https://eprint.iacr.org/2021/1447">Mixed Certificate Chains for the Transition to Post-Quantum Authentication in TLS 1.3</a>. To appear in AsiaCCS 2022.</p> ]]></content:encoded>
            <category><![CDATA[Research]]></category>
            <category><![CDATA[TLS]]></category>
            <category><![CDATA[Post-Quantum]]></category>
            <category><![CDATA[Cryptography]]></category>
            <guid isPermaLink="false">6xYdKtiClxjcuIintFLYgJ</guid>
            <dc:creator>Bas Westerbaan</dc:creator>
        </item>
    </channel>
</rss>