How to be safe from quantum computing
Practical quantum computers have been ten years away for the last several decades. Now, however, it's beginning to look as though they will be possible in just a few years. Recent research with obfuscated results demonstrated much lower memory requirements to factor ECDSA keys on a quantum computer, with work by other researchers in the open more than halving memory use compared to the state of the art in 2023. At the same time, computer manufacturers are boasting quantum processors that retain viable superpositions over longer periods. Given how slowly software updates filter out to stable systems, it's worth looking at what configuration changes and protocol updates are needed to be safe from quantum computers now.
What is the threat?
Quantum computers are not faster than classical computers in general (although they can invert general black-box functions more quickly, which is important to some cryptographic applications). Rather, there are specific problems, such as integer factorization, that are believed to be difficult on classical computers that quantum computers can solve more efficiently. Unfortunately, much of our modern cryptographic infrastructure relies on the hardness of these problems.
Modern cryptography is generally divided into two areas: symmetric-key and non-symmetric-key cryptography. The former relies on all involved parties having a shared secret, and is not believed to be vulnerable to analysis by a quantum computer. The problem is obtaining a shared secret in the first place; users generally want to be able to connect to many different web sites, to exchange email with many different people, etc. Establishing a shared secret with each of them would be difficult.
This is where non-symmetric-key cryptography (also called public-key cryptography) comes in. These are cryptographic protocols that work without any shared secrets; instead, participants have a public key, which is known to the whole world, and a private key, which is known only to themselves. Encryption can be done with one of the keys, and then decryption is only possible with the other. Cryptographic signatures work by encrypting a known value with the private key, proving that whoever made the signature must have had the key. The security of these cryptosystems inherently depends on there being problems that are hard to solve with just the public key, but which become easy to solve with access to an additional piece of secret information.
The original public-key cryptosystem was RSA, which relies on the difficulty of factoring large numbers — a task that the scientific community theoretically knows how to do quickly on a quantum computer. Later, RSA was partially displaced by elliptic-curve cryptography, which relies on a closely related problem called the discrete log problem, but which uses much smaller keys.
Currently, the best publicly available quantum processor offers 1,121 physical qubits. IBM's published quantum-computing timeline promises that its Kookaburra processor, with 1,386 physical qubits, will be finished by the end of 2026. Even if the company is over-promising, the last few months have seen the best known quantum circuit for factoring ECDSA keys fall from 1,425 logical qubits to 1,154 logical qubits. But there is a difference between physical and logical qubits. Even the most well-isolated quantum computers are affected by noise from their environments, which adds error to the value of the computer's qubits that must be corrected or compensated for. The best known quantum error-correction techniques need about 500 physical qubits to emulate one logical qubit with reasonable fidelity; that number will go down with both additional algorithmic breakthroughs and better physical chips.
Inspired by this trend, for many years cryptographers have been working on other public-key cryptosystems based on problems that are not known to have an efficient solution on quantum computers. Recently, they've settled on and standardized a handful of cryptosystems that are believed to be robust enough for general use.
The challenge facing the open-source community, then, is deploying these new cryptosystems in all of the places that use public-key encryption and signing. Of these two tasks, encryption is more urgent: things being encrypted today may be attacked tomorrow, but signatures validated today can be trusted, because any quantum forgeries will occur in the future. Both use cases do need to be addressed eventually, however, and public-key cryptography comes up in a surprising number of places.
One slight wrinkle is that the newly invented quantum-resistant cryptosystems do not yet have a long track record of use. Cryptographers believe that they are secure, but there could turn out to be some flaw enabling classical or quantum computers to break them. While there is probably no harm in moving directly to post-quantum cryptography, the conservative approach is to use a hybrid scheme: encrypt things with both a well-known elliptic-curve cryptosystem and a newer post-quantum cryptosystem. As long as at least one of those encryption schemes remains secure, the whole construction is secure. Therefore, the encryption scheme that web browsers, OpenPGP implementations, and other encryption software are moving toward is a combination of ML-KEM-768 (the NIST-standardized post-quantum encryption scheme) and X25519 (an elliptic-curve cryptosystem in wide use today). Various government agencies have pushed for allowing the use of non-hybrid encryption schemes, but for now most software seems to be defaulting to X25519MLKEM768.
Web browsing
The largest use of public-key cryptography in the modern world is probably web browsing. Luckily, all major browsers now support using post-quantum cryptography to encrypt TLS connections. It has been enabled by default since Firefox 132 (released in October 2024), Google Chrome 131 (released November 2024), and Safari 26 (released in September 2025). All three support the X25519MLKEM768 key-exchange mechanism.
More difficult is rolling out the use of these key-exchange mechanisms to web servers. Most web servers, such as Apache HTTP Server and NGINX, delegate cipher management to OpenSSL, which has supported post-quantum key-exchange mechanisms since version 3.5.0, released in April 2025. Users stuck on earlier versions of OpenSSL can add support for newer ciphers using the oqs-provider library from the Open Quantum Safe project. Web servers that rely on OpenSSL typically have a way to send configuration options to OpenSSL's SSL_CONF_cmd() function; in the absence of such an override, OpenSSL will default to the settings given in the openssl.cnf configuration file.
On the Red Hat family of distributions and on openSUSE, that configuration file is generated by the crypto-policies mechanism. Users add policies to /etc/crypto-policies and then regenerate the OpenSSL configuration file using update-crypto-policies. This will also generate updated configurations for other encryption libraries such as LibreSSL, and for some software that handles its own encryption formats such as OpenSSH. Releases after Fedora 43 and Red Hat Enterprise Linux 10.1 should default to preferring post-quantum cryptography. Older releases will require setting a backported default policy or manually editing the Groups directive in the appropriate policy module:
# The policy may be named differently depending on distribution and version
update-crypto-policies --set DEFAULT:PQ
Debian, Ubuntu, Arch Linux, and others have the user edit openssl.cnf directly. Debian and Ubuntu both have ports of crypto-policies, but they aren't enabled by default. Users of alternate encryption libraries on these distributions may need to update their configurations as well. None of the distributions currently default to preferring post-quantum cryptography in the configuration file, but installations with a new enough version of OpenSSL may end up using OpenSSL's own defaults, which do prefer it.
Some web servers, such as Caddy, use an embedded library rather than relying on the distribution's OpenSSL library. In Caddy's case, post-quantum cryptography is enabled by default whenever it is built using Go 1.24 or newer.
Overall, the safest approach to enable support for post-quantum cryptography on one's web server is to explicitly set the supported Groups given to SSL_CONF_cmd() to include "X25519MLKEM768". That only affects the individual web server, however, and may fall out of date if better post-quantum cryptosystems are found. Setting policy on a system-wide level covers other uses of OpenSSL, but has the same update problem. Relying on OpenSSL's own defaults will always result in one of the most recent ciphers, but it is easy for a changed default configuration from one's distribution to silently override.
OpenPGP
While web browsing is probably the most common activity that uses encryption, digital signatures are arguably more important to the security of modern Linux systems. Packages are typically accompanied by OpenPGP signatures to guarantee that they really do come from the distribution's package repository; individual Git commits or tags may also be signed to indicate that they come from a trusted individual. Given that many keys have a lifetime of years, it may be wise to begin moving to post-quantum signatures well in advance of any possible forgery.
Unfortunately, the OpenPGP ecosystem has been split in two since 2023. The GNU privacy guard (GPG), which is widely used by Linux distributions, started following a specification called LibrePGP, while several other tools continued to follow the IETF-standardized OpenPGP. The two standards disagree on how to implement post-quantum cryptography, which makes verifying signatures made with one set of software using the other tool slightly painful.
OpenPGP's approach is given in RFC 9980 ("Post-Quantum Cryptography in OpenPGP"). It adds seven new algorithms, four of which are hybrid algorithms. For encryption, it allows either ML-KEM-768 paired with X25519, matching the recommended default for web browsers, or ML-KEM-1024 paired with X448, which has slightly larger keys and signatures but may provide better security. For signing, the same underlying algorithms are used, but they are given different names and parameter choices that are optimized for signatures. Either ML-DSA-65 (corresponding to the security level of ML-KEM-768) and Ed25519 or ML-DSA-87 (corresponding to the security level of ML-KEM-1024) and Ed448 can be used.
The RFC requires these keys to be encoded in the new v6 key format specified in RFC 9580 ("OpenPGP"), which GPG does not support. There is one carve-out permitted by RFC 9980: implementations usually skip PGP subkeys that have unrecognized algorithms, so it allows creating v4 OpenPGP keys with post-quantum subkeys. Version 4 keys are compatible with GPG, so this may be the most prudent option for interoperability, if GPG ever adds support for the relevant signing algorithms.
GPG only supports using post-quantum keys for encryption; there are no separate signing key algorithms. When used to create such an encryption key, it uses the same underlying encryption algorithm (ML-KEM and an elliptic curve of choice), but stores the key and binds it to the user's identity information in an incompatible way. Specifically, ML-KEM defines a way to ensure that two devices believe they are using the same protocol in order to understand each other's keys by mixing a static set of protocol information into the key-derivation function. GPG uses a different set of static information than the IETF standards specify. Sequoia and other OpenPGP implementations cannot understand GPG's native post-quantum keys and vice versa.
Some other encryption software, such as RNP, the OpenPGP engine that powers Thunderbird's email encryption, uses GPG's LibrePGP key format, but makes an exception for understanding post-quantum v4 subkeys. To make the situation even more confusing, Sequoia provides a "GPG chameleon" which implements the GPG command-line interface, so users running gpg may actually be talking to Sequoia.
Practically, the simplest workaround is to create two separate PGP keys, one using classical signing algorithms and one using the RFC 9980 signing algorithms, and sign everything with both of them. This is the approach that Red Hat has been using for package signing, and it does work, at the cost of requiring signers to maintain two separate PGP identities. Theoretically, a v4 PGP key with a post-quantum subkey could be used, but, due to the limitations of the format, only for encryption and not for signing.
Users who want to make sure that their signatures are quantum-resistant should consider switching to Sequoia (possibly using the chameleon, to keep the interface the same), generating a v4 classical signing key (or reusing an existing key), generating a v6 post-quantum signing key, using both keys to endorse each other, and signing everything important with them both. This is certainly not ideal; we can hope that a better solution emerges before it becomes truly urgent.
For now, verifying this kind of dual-signature is straightforward: as long as either signature is valid, it can probably be trusted. But once it becomes possible to forge some RSA and elliptic-curve signatures with a quantum computer, consumers of signatures will have to either verify only the post-quantum signature, or use some kind of certificate transparency mechanism to make sure that the classical signature was made before such a quantum computer became available.
The only real solution
There is, of course, one option that offers complete protection against any kind of cryptographic attack, no matter how powerful: give up and go live in the woods. For those of us who do not have that option, we will just need to settle for hoping that configuring OpenSSL and our OpenPGP software of choice appropriately is sufficient, and keeping an eye out for the tipping point when quantum attacks become possible.
| Index entries for this article | |
|---|---|
| Security | Quantum computing |
