By Bonaventure Ogeto · Published · Last verified:
How Quantum Computers Could Break RSA and Elliptic Curve Encryption
The short answer
A large, error-corrected quantum computer running Shor's algorithm could work out RSA and elliptic-curve private keys from public ones, undoing today's key exchange and signatures. The UK's NCSC says quantum computers today are still limited[1]; estimates of what breaking RSA-2048 needs fell from about a billion qubits in 2012[2] to under 100,000 by February 2026[3], under stated assumptions.
Source: Mctaba Labs, “How Quantum Computers Could Break RSA and Elliptic Curve Encryption”, last verified 4 December 2026, mctaba.com/learn/cryptography/how-quantum-computers-break-rsa-and-ecc
At a glance
- Shor's algorithm, published in 1994[4], factors numbers and solves discrete logarithms efficiently on a quantum computer. A large enough machine would break RSA, Diffie-Hellman and elliptic-curve cryptography.
- Grover's algorithm only speeds up brute-force search: NIST expects AES-128 to remain secure for decades[5], and doubling the key size will be sufficient[6] if Grover ever becomes practical.
- Estimates for RSA-2048 fell from 20 million noisy qubits in 2019[7] to under a million in 2025[8] and under 100,000 in February 2026[3].
- Google counted on the order of 100 to 1,000 qubits in May 2025[2] on machines with useful error rates. Every estimate needs far more.
- The danger today is recorded traffic: NIST calls harvest now, decrypt later one of the main reasons[9] the move to post-quantum cryptography is urgent.
Why could a quantum computer break RSA and elliptic curves?
Public-key cryptography rests on maths that is easy one way and hard the other. RSA multiplies two large secret primes, and the RSA paper says the system's security rests in part on the difficulty of factoring[10] their product. Elliptic-curve cryptography and Diffie-Hellman rest on the discrete logarithm problem: given a starting point and the result of multiplying it by a secret number, find the number. At today's key sizes, ordinary computers cannot solve either problem in any useful time.
In 1994[4] Peter Shor published quantum algorithms that solve both problems efficiently, in a number of steps that grows only polynomially with the key size. NIST's report on the threat, NIST IR 8105[6], says his result renders “all public key cryptosystems based on such assumptions impotent”[6].
A qubit is the quantum version of a bit. Instead of being zero or one, it can hold a weighted blend of both, and many qubits can be linked so their values depend on each other. That does not mean a quantum computer tries every answer at once and reads off the right one. Shor's algorithm is cleverer. Factoring a number can be turned into finding the period of a repeating pattern, and a quantum computer can make the wrong candidates cancel out through interference so that the period stands out. With the period in hand, ordinary arithmetic gives the two primes. The same trick finds the secret number behind an elliptic-curve key.
The catch is scale. NIST's explainer says “Quantum computers employing many thousands of qubits will be needed to break present-day encryption”[11].
What is the difference between Shor's and Grover's algorithms?
Shor's algorithm breaks public-key cryptography outright. Grover's algorithm is a general search speed-up: it finds an item in an unsorted list of N entries in about √N steps, where a classical search needs N/2[12]. Grover's paper states that his method is “within a small constant factor of the fastest possible quantum mechanical algorithm”[12], so quantum search will not get much faster than that.
NIST IR 8105 says Grover's speed-up does not render cryptographic technologies obsolete[6] but can require larger keys, and that doubling the key size will be sufficient[6]. NIST's FAQ goes further: Grover's full speed-up needs every step run in series[5], which real attacks spread across many machines cannot manage, so NIST judges it “quite likely that Grover's algorithm will provide little or no advantage in attacking AES, and AES 128 will remain secure for decades to come”[5]. A Chromium blog post put the consequence for TLS plainly: the symmetric algorithms protecting data in transit are considered safe, but the way the symmetric keys are created is not[13].
| Shor's algorithm | Grover's algorithm | |
|---|---|---|
| Published | 1994[4] | 1996[12] |
| What it does | Factors integers and finds discrete logarithms efficiently | Speeds up brute-force search to about √N steps[12] |
| What it threatens | RSA, ECDSA, ECDH and DSA: no longer secure[6] | Can require larger key sizes[6], though NIST expects AES-128 to remain secure for decades[5] |
| The fix | Replace the algorithm with post-quantum cryptography | Keep AES and SHA-2; use AES-256 for data that must stay secret for decades |
Whether AES-256 is enough for your data is covered in is AES-256 quantum safe?
How many qubits would it take to break RSA-2048?
Real qubits are fragile. Error correction groups many physical qubits into one reliable logical qubit, so estimates count physical qubits and depend heavily on the error rates and speeds their authors assume. That approach is starting to work: Google says its Willow chip cut the logical error rate in half each time it grew its encoded grid from 3x3 to 5x5 to 7x7[14], which the field calls operating below threshold.
Published estimates for breaking RSA-2048 have fallen fast:
| Year | Who | Estimate for RSA-2048 | Hardware assumed |
|---|---|---|---|
| 2012[2] | An estimate Google cites | About a billion physical qubits[2] | The same physical assumptions as in 2019[2] |
| 2019[7] | Gidney and Ekerå | 20 million noisy qubits, about 8 hours[7] | A square grid of qubits with 0.1% gate error[8] |
| 2025[8] | Gidney (Google) | Under a million noisy qubits, under a week[8] | The same assumptions as in 2019[8] |
| February 2026[3] | Pinnacle Architecture preprint | Under 100,000 physical qubits[3] | Quantum LDPC codes, a one-in-a-thousand error rate[3] |
| March 2026[15] | Oratomic and Caltech[16] | About 102,000 qubits, 97 days[16] | Reconfigurable atomic qubits[15] |
| October 2026[17] | Alice & Bob | 22,593 cat qubits, 3.14 days[17] | Cat qubits with no bit-flips[17] |
Read the table as a trend, not a race. Each row is an estimate under its authors' own assumptions, and the units differ: noisy qubits on a grid, neutral atoms and cat qubits are different hardware. Alice & Bob's figure assumes cat qubits that never suffer bit-flip errors; with a bit-flip time of about one hour, RSA-2048 rises to about 45,000[17]. Most of these papers are preprints, not yet peer reviewed.
Qubits can also be traded for time. Alice & Bob estimate RSA-2048 in 1.25 hours on about 611,000 cat qubits[17]. Going the other way, Oratomic's paper argues that Shor's algorithm is possible with as few as 10,000 reconfigurable atomic qubits[15], but Physics World's reading of the paper puts that machine at three years for ECC-256 and 120 years for RSA-2048[18].
Why do the numbers keep falling? Mostly better methods. Gidney's 2025 estimate kept the 2019 hardware assumptions[8] and still needed 20 times fewer qubits[2], and Alice & Bob says better error-correcting codes more than halved its own earlier figure, from 49,649 to 22,593[19]. In Gidney's case the target moved closer on paper with no change in the hardware assumed.
Are elliptic curves easier to break than RSA?
In the newest estimates, yes. Three teams that costed both found elliptic curves at today's sizes cheaper or quicker to break than RSA-2048:
- Google Quantum AI estimated that a 256-bit elliptic-curve key could be broken in a few minutes on fewer than 500,000 physical qubits[20], with circuits needing under 1,200 logical qubits[21]. Google's own RSA-2048 figure is under a million noisy qubits running for under a week[8].
- Alice & Bob estimated at most 30,000 cat qubits and about 1 hour[17] for the secp256k1 curve, against 3.14 days[17] for RSA-2048.
- Oratomic estimated 10 days on about 26,000 qubits for ECC-256, and 97 days on about 102,000 for RSA-2048[16].
That matters because elliptic curves do most of the work today. Cloudflare noted that X25519, an elliptic-curve key exchange, secures the majority of internet connections, either on its own or as a hybrid with ML-KEM-768[22]; the connections using it on its own are the exposed ones. Elliptic curves also sign certificates and software, and Bitcoin has traditionally used ECDSA over secp256k1[23]. Is Bitcoin safe from quantum computers? covers that case.
Does a quantum computer that can break RSA exist today?
The official sources treat it as a machine still to come. NIST's explainer asks “If cryptographically relevant quantum computers don't exist yet, why is developing post-quantum encryption algorithms important now?”[11], and the UK's National Cyber Security Centre (NCSC) says “quantum computers today are still limited”[1], with relatively high error rates.
The public numbers agree. Google counted machines with relevant error rates at 100 to 1,000 qubits in May 2025[2], and its Willow chip, announced in December 2024, has 105 qubits[14]. Every estimate in the table above needs far more.
When a large enough machine might arrive is a separate, disputed question. NIST says experts' estimates range from a few years to a few decades[11], and when will quantum computers break encryption? sets out who says what.
Why act before then? Because an attacker can record encrypted traffic today and decrypt it once the machine exists. NIST IR 8547 calls this threat, known as harvest now, decrypt later, “one of the main reasons why the transition to post-quantum cryptography is urgent”[9], and harvest now, decrypt later explains which data is exposed. NIST will deprecate quantum-vulnerable public-key cryptography after 2030 and disallow it after 2035[9].
What replaces RSA and elliptic curves?
Post-quantum algorithms, built on maths that Shor's algorithm does not solve. NIST published the first three standards on 13 August 2024[24]: ML-KEM (FIPS 203) for key exchange, and ML-DSA (FIPS 204) and SLH-DSA (FIPS 205) for signatures. Of the first algorithms NIST selected, three rest on structured lattices and the fourth on hash functions[11]. FIPS 203 says that at present ML-KEM “is believed to be secure, even against adversaries who possess a quantum computer”[25].
For the bigger picture, read what post-quantum cryptography is, the NIST standards explained and lattice cryptography without the heavy maths, or start from the series hub.
For developers: which parts of my stack does Shor's algorithm affect?
NIST IR 8547 is blunt: ECDSA, RSA and EdDSA signatures, and the Diffie-Hellman, MQV and RSA key-establishment schemes, are “vulnerable to Shor's Algorithm on a cryptanalytically relevant quantum computer”[9]. In a typical web or payments stack, that sorts out like this:
- TLS key exchange (ECDHE over X25519 or P-256): in Shor's reach and exposed now, because recorded handshakes can be attacked later. NIST lists elliptic-curve and RSA key establishment as deprecated after 2030 and disallowed after 2035[9]. Turn on hybrid ML-KEM; the NIST standards page lists library support.
- Signatures and certificates (RSA or ECDSA certificates, JWTs signed with
RS256orES256, SSH keys, code signing): in Shor's reach, but forging one needs the machine at the time of the attack. NIST gives them the same schedule: deprecated after 2030 and disallowed after 2035[9]. - Symmetric pieces (AES-GCM, SHA-256, and HMAC webhook signatures such as Paystack's x-paystack-signature, an HMAC SHA512[26]): Grover only, so keep AES-256 and SHA-256 and carry on. The guide to verifying the x-paystack-signature header shows HMAC in practice.
To see what your own systems use:
find-shor-exposed-keys.sh# 1. Which public-key algorithm does a server's certificate use?
openssl s_client -connect example.com:443 -servername example.com </dev/null 2>/dev/null \
| openssl x509 -noout -text | grep -E "Public Key Algorithm|Public-Key:"
# 2. Which algorithm and size are your SSH keys? RSA, ECDSA and ED25519 are all in Shor's reach.
for k in ~/.ssh/*.pub; do ssh-keygen -lf "$k"; done
# 3. Which algorithm signs a JWT? RS256 and ES256 are RSA and elliptic curve; HS256 is an HMAC.
node -e 'console.log(Buffer.from(process.argv[1].split(".")[0], "base64url").toString())' "$JWT"Anything that prints rsaEncryption, id-ecPublicKey, RSA, ECDSA, ED25519, RS256 or ES256 goes on your migration list. Crypto-agility and cryptographic inventory shows how to do this across a whole organisation.
Frequently asked questions
- How long would a quantum computer take to break RSA-2048?
- It depends entirely on the machine's design. Gidney (Google) estimates under a week on under a million noisy qubits[8]; Alice & Bob's is 3.14 days on 22,593 cat qubits[17]; Oratomic's is 97 days on about 102,000 qubits[16]. Within one design, fewer qubits generally means a longer run: Alice & Bob's faster variant needs 1.25 hours on about 611,000 cat qubits[17].
- Can quantum computers break AES?
- Not the way they would break RSA. Grover's algorithm only gives a square-root speed-up on key search: NIST expects AES-128 to remain secure for decades[5], and doubling the key size will be sufficient[6] if that ever changes. AES-256 adds margin for data that must stay secret for decades.
- What is Shor's algorithm in simple terms?
- A quantum method, published in 1994[4], that finds the hidden period in a repeating number pattern. That period reveals the two primes behind an RSA key, and the same idea recovers the secret number behind an elliptic-curve key.
- Are elliptic curves weaker than RSA against quantum computers?
- In recent estimates they fall faster. Google estimated that a 256-bit curve could be broken in a few minutes on fewer than 500,000 physical qubits[20], and Alice & Bob put secp256k1 at about 1 hour[17] against days for RSA-2048. Both are estimates for machines far larger than today's.
Sources
- [1] UK National Cyber Security Centre, 14 August 2024, checked 4 December 2026
- [2] Google, 23 May 2025, checked 4 December 2026
- [3] arXiv (Webster et al.), 12 February 2026, checked 4 December 2026
- [4] arXiv, 30 August 1995, checked 4 December 2026
- [5] NIST CSRC, 18 November 2018, checked 4 December 2026
- [6] NIST, April 2016, checked 4 December 2026
- [7] arXiv (Craig Gidney, Martin Ekerå), 23 May 2019, checked 4 December 2026
- [8] arXiv (Craig Gidney), 21 May 2025, checked 4 December 2026
- [9] NIST, October 2026, checked 4 December 2026
- [10] Rivest, Shamir and Adleman (author's copy on Ronald Rivest's MIT page), February 1978, checked 4 December 2026
- [11] NIST, 27 February 2026, checked 4 December 2026
- [12] arXiv, 29 May 1996, checked 4 December 2026
- [13] Google (Chromium Blog), 10 August 2023, checked 4 December 2026
- [14] Google, 9 December 2024, checked 4 December 2026
- [15] arXiv (Cain et al., Oratomic), 30 March 2026, checked 4 December 2026
- [16] arXiv (Cain et al., Oratomic), 30 March 2026, checked 4 December 2026
- [17] IACR Cryptology ePrint Archive (Alice & Bob), 28 October 2026, checked 4 December 2026
- [18] Physics World, 26 May 2026, checked 4 December 2026
- [19] Alice & Bob, 29 October 2026, checked 4 December 2026
- [20] Google Research, 31 March 2026, checked 4 December 2026
- [21] arXiv (Babbush et al., Google Quantum AI), 30 March 2026, checked 4 December 2026
- [22] Cloudflare, 28 October 2025, checked 4 December 2026
- [23] Bitcoin Improvement Proposals repository (github.com/bitcoin/bips), 19 January 2020, checked 4 December 2026
- [24] NIST CSRC, 2 December 2026, checked 4 December 2026
- [25] NIST, 13 August 2024, checked 4 December 2026
- [26] Paystack (developer documentation), checked 4 December 2026
Related guides
- What Is Post-Quantum Cryptography? A Plain-English Explanation (2026)
- When Will Quantum Computers Break Encryption? An Honest Look at Q-Day
- Is AES-256 Quantum Safe? Symmetric Encryption, Hashing and Passwords After Quantum
- Harvest Now, Decrypt Later: Why Today's Data Is Already at Risk
- NIST Post-Quantum Standards Explained: ML-KEM, ML-DSA, SLH-DSA, FN-DSA and HQC
- Lattice Cryptography Explained Without the Heavy Math
- Cryptography explained: the full series
