Is RSA broken? What the AI encryption scare means for internet security

Is RSA broken? What the AI encryption scare means for internet security

Dec 4, 2026 – 18 min

Workspace Team

Workspace Team


RSA is not broken, even though in the last week of November 2026 a rumour spread online claiming one of the big AI labs had found a fast way to factor RSA keys. People rotated their SSH keys over the weekend, and on Monday, November 30, the lab published four papers and 541 pages of mathematics about lattice-based cryptography, with no attack on RSA anywhere in them. Two days later, on December 2, 2026, US government security agencies said AI companies had disclosed discoveries affecting some cryptographic systems in use today, without naming the systems, and called the threat neither immediate nor widespread.

The papers aimed at a different algorithm altogether, but the scare was still useful because it reminded teams of a date most of them ignore. Under the final transition plan the US standards body NIST published on October 27, 2026, RSA and elliptic-curve cryptography are deprecated after 2030 and disallowed after 2035, and Shor's algorithm has broken RSA on paper since 1994, for anyone with a large enough quantum computer.

We wrote this post from our own university notes: a cryptography and network security exam script with RSA tasks solved by hand, and the Python labs on RSA signatures, Diffie-Hellman and TLS certificates which today's students of the same subject still work through.

How does RSA encryption work?

RSA is a public-key encryption and signature scheme published at MIT in 1977 and named after Ron Rivest, Adi Shamir and Leonard Adleman. Its security rests on one asymmetry: multiplying two large prime numbers takes milliseconds, while recovering those primes from their product takes longer than the age of the universe at 2048 bits.

Key generation takes five steps, and the exam script from our cryptography course works through them by hand:

  1. Pick two large primes, p and q.
  2. Multiply them into the public modulus, n = p × q.
  3. Compute Euler's function, φ(n) = (p − 1)(q − 1).
  4. Choose a public exponent e that is coprime with φ(n).
  5. Compute the private exponent d so e × d mod φ(n) = 1.

The public key is (e, n) and the private key is (d, n). Encryption turns a message M into C = M^e mod n, and decryption turns C back into M = C^d mod n. One exam task used p = 5, q = 11 and e = 3, which gives n = 55, φ(n) = 40 and d = 27, so the message 9 encrypts to 9³ mod 55 = 14, and 14²⁷ mod 55 returns 9. Students computed the power without a calculator, using the modular reduction property (a × b) mod n = ((a mod n) × (b mod n)) mod n to keep every number small.

RSA key generation with p = 5 and q = 11: modulus 55, φ(n) = 40, public exponent 3, private exponent 27, message 9 encrypts to 14 and decrypts back to 9

Why does a small RSA key break in seconds?

A small RSA modulus breaks because anyone factors it by trial division. One exam task gave n = 21 and e = 7, so p = 3, q = 7, φ(n) = 12 and d = 7: the public and private exponents came out identical, and the message 5 encrypted to 5. The model answer in the script notes the scheme offers no asymmetry between the keys at all.

Another task gave a public key with N = 40,741 and e = 11 and three lines of ciphertext blocks. Factoring N into 131 × 311 gives φ(N) = 40,300, the private exponent follows as d = 10,991, and the decrypted text reads "CONGRATULATION YOU HAVE BROKEN THE RSA SCHEME". A student solves the task with pen and paper in a few minutes, because the modulus has only five digits.

The modulus 40,741 factored into 131 and 311, giving the private exponent 10,991 and the decrypted exam message

How secure is RSA-2048 today?

RSA-2048 uses a modulus of 2048 bits, a number with 617 decimal digits, and no public method factors it today. By the standard key-size tables RSA-2048 gives about 112 bits of security and RSA-3072 about 128 bits, the level of AES-128, which is why US security agencies now recommend RSA-3072 as a stopgap for systems not yet ready for post-quantum algorithms.

The current university lab on this subject, where students build an authenticated Diffie-Hellman key exchange in Python, generates its RSA keys with rsa.generate_private_key(public_exponent=65537, key_size=2048). The exponent 65537 equals 2¹⁶ + 1, a number with only two 1-bits in binary. Computing a power with the square-and-multiply algorithm costs one squaring per bit and one multiplication per 1-bit, so the exam's example 5⁵⁹⁶ mod 1234 took 10 squarings and 4 multiplications, while e = 65537 takes 16 squarings and 1 multiplication, which makes encryption and signature checks fast.

What did AI change for RSA in 2026?

AI agents made factoring cheaper in 2026 without changing the mathematics behind it. In September 2026 two teams used AI coding agents to port the general number field sieve, the best known classical factoring method, to GPUs: one factored an 862-bit RSA challenge number in about 13.5 GPU-years, and a second factored the 896-bit RSA-896 in about 10 days on up to 2,048 GPUs. Both authors described the work as performance engineering with no new algorithm, and extrapolations from the 896-bit run put RSA-2048 at roughly 35 billion times more work.

In November 2026 AI agents working under human supervision found two cost reductions against legacy RSA-1024: a cheaper signature forgery and a method to factor many keys in one batch about 30 times cheaper per extra key. Both results hit 1024-bit keys, which standards bodies retired years ago, and the batch result belongs to a family of attacks on badly generated keys covered in the next section.

The quantum side moved on paper as well, since a 2025 estimate put RSA-2048 at under 1 million noisy qubits running for under a week, and 2026 preprints claim figures between roughly 23,000 and 100,000 qubits on new hardware designs, while the best machines built so far run tens of error-corrected logical qubits. Experts quoted in the coverage place a quantum computer able to break RSA-2048 in 2035 or later, close to the date NIST already set for disallowing RSA.

Where does RSA fail in practice?

Most RSA failures in our course material had nothing to do with factoring 2048-bit numbers, and each one maps to a real class of bugs, several of them found in deployed products over the last 15 years:

  • Two users who share one modulus n with different exponents each compute φ(n) from their own key pair, and from there the other user's private key.
  • Two keys which share one prime fall to a single greatest-common-divisor computation, and a 2012 scan of the internet factored about 0.5% of the RSA keys used by TLS hosts this way, mostly on embedded devices with poor random number generators.
  • Primes p and q too close to each other let an attacker search for factors around √n and factor even a 1024-bit modulus quickly, and a 2022 vulnerability in a crypto library used in office printers worked exactly like the exam task.
  • Textbook RSA is malleable, because E(M₁) × E(M₂) = E(M₁ × M₂). In the exam example with N = 899, an attacker multiplies the ciphertext 770 by 2¹¹, gets the victim to decrypt the result 114 into 570, divides by 2 and recovers the message 285 without the private key.
  • Textbook RSA with e = 3 and no padding leaks short messages outright: when M³ is smaller than n, the ciphertext equals M³ and an ordinary cube root returns the message, so the exam task with e = 3 stays safe only because 9³ wraps around the modulus 55.
  • RSA encryption alone gives no integrity, so an attacker who changes a ciphertext in transit goes unnoticed unless a hash or MAC protects it.
  • A TLS handshake without authenticated opening messages lets an attacker strip the strong cipher suites and force both sides onto the weakest ones, and in 2015 this exact downgrade pushed servers onto 512-bit "export" RSA keys factorable in hours.

Modern libraries close the padding holes with OAEP for encryption and PSS for signatures, and the university lab signs with RSA-PSS and SHA-256 for this reason. The downgrade lesson matters again in the post-quantum move, because a hybrid handshake protects nothing if an attacker forces both sides back to the classical option.

Chosen-ciphertext attack on textbook RSA with modulus 899: ciphertext 770 is multiplied by 2 to the 11th, decrypted by the victim to 570 and halved to the original message 285

What would breaking RSA mean for the internet?

Breaking RSA means recovering p and q from a public modulus n, and anyone who manages it at scale reads or forges everything protected by the matching private key. The damage depends on what the key does, and on today's internet RSA does two different jobs.

Certificate chain from root CA to a website, next to a TLS key exchange, showing what an RSA break exposes in each

The first job is signatures: every HTTPS certificate chain ends in a root certificate authority (CA), the browser trusts the chain because each certificate carries a signature from the one above it, and many of those signatures still use RSA. An attacker who factors a certificate authority's key issues valid certificates for any domain, signs software updates, and impersonates banks and login pages without a single browser warning. Exam questions on certificate chains, revocation lists and self-signed roots posted on a bank's website all came down to the same rule, that trust in the chain equals trust in its weakest signature. Signatures only need replacing before a large quantum computer exists, since a forged signature has no value after the fact.

The second job is key exchange, and here the timeline changes. TLS 1.3 negotiates session keys with ephemeral Diffie-Hellman over elliptic curves and uses RSA only to sign the handshake, so recorded traffic stays safe even if a server's RSA key leaks later, while older TLS 1.2 setups with RSA key transport expose every recorded session the day the key falls. A large quantum computer running Shor's algorithm breaks elliptic-curve Diffie-Hellman as well, which turns recordings of today's traffic into future plaintext. Security teams call this "harvest now, decrypt later", and it affects any data whose secrecy has to outlast the next 10 years, such as contracts, health records, credentials and source code. One of the largest CDNs reported in December 2026 about 73% of browser connections already using hybrid post-quantum key exchange, while the certificates on those same connections remain classical.

The November 2026 papers did not deal with RSA at all and described a quantum algorithm against structured lattices, the mathematics behind ML-KEM, the post-quantum standard meant to replace RSA and elliptic-curve key exchange. Reviewers called the algorithm "galactic" because the speed-up grows with the ring dimension, ML-KEM fixes that dimension at 256, and even 2¹⁰⁰⁰ quantum operations fall far short of the attack's cost on ML-KEM-512. The exam lesson applies in reverse here, because an asymptotic result says little about cost at a fixed key size, in the same way trial division breaks n = 21 and says nothing about n with 617 digits.

What should your team change before 2030?

Your team should treat the scare as a reminder of the 2030 and 2035 deadlines and plan a migration on its own schedule, without rotating every key overnight. Most of the work happens in libraries, hosting platforms and browsers, and the part left to you comes down to knowing where your keys live and keeping them replaceable.

  1. Make an inventory of every place your product uses public-key cryptography: TLS certificates, JWT signing keys for sign-in, SSH and deployment keys, VPN access, code signing, webhooks from payment providers, and encrypted backups.
  2. Mark the data with a long secrecy lifetime, because traffic carrying it is the first target for harvest-now-decrypt-later recording, and switch off any remaining TLS 1.2 cipher suites with RSA key transport.
  3. Move key exchange to hybrid mode, which pairs ML-KEM with an elliptic curve such as X25519 so an attacker has to break both. The lattice papers lowered long-term confidence in structured lattices, which argues for hybrids, and for most web products the switch arrives through a CDN, load balancer or runtime update.
  4. Keep the choice of algorithms in configuration, so your team can swap RSA-2048 for a post-quantum signature with a config change and a redeploy, without rewriting the sign-in flow, an ability security teams call crypto-agility.
  5. Don't implement RSA yourself, but use a maintained library, OAEP for encryption, PSS for signatures, and at least 3072-bit keys for anything new which still needs RSA.
  6. Ask your vendors and hosting providers for their post-quantum timeline in writing, and ignore emails offering an urgent "post-quantum upgrade", a phishing pattern security teams warned about right after the November rumour.

Symmetric encryption needs less work, because AES-256 keeps a wide margin even against a quantum computer, so the data at rest in your database stays protected as long as the keys guarding it travel over post-quantum channels.

Checklist of six steps for moving a product off RSA before 2030

Where do the keys sit in the products we build?

Like most product teams, we don't design cryptography, but we do build web platforms, booking systems and business apps for startups and SMEs, and every one of them leans on public-key cryptography in at least three places: the HTTPS certificate, the tokens behind sign-in, and the integrations with payment providers and external APIs. All three come from hosting platforms and maintained libraries, which is where the RSA migration will mostly happen.

What we learned back at university is that RSA rarely fails because of the mathematics and far more often because of where the keys sit and who replaces them. That's why we keep staging and production keys apart, as in the shared-modulus task, and why every webhook checks its signature before it reads the payload, since textbook RSA lets an attacker tamper with a ciphertext. We leave cipher-suite lists to the platform defaults because the downgrade attack shows how easy it is to get them wrong when a team assembles them by hand.

On the products we build and maintain, we keep the list of keys and certificates current, keep algorithm choices in configuration, and roll out hybrid key exchange as soon as the hosting, CDN and runtime providers offer it.

Start with a list of your keys

RSA-2048 is safe today, because the AI encryption scare of November 2026 was a rumour about a different algorithm and AI agents made factoring cheaper without breaking anything in use. Standards bodies set 2030 as the real deadline for RSA, so the useful first step for your team is a one-page list of every key, certificate and token your product depends on, with the owner and the algorithm next to each one.

If you want help building the inventory or planning the move to post-quantum cryptography in your own software, reach out to book a discovery session.

More from the blog

Looking for a long-term digital partner?

Different skills, one team, focused on building reliable digital products and on being your go-to partner for AI-driven digital transformation.

30 reviews

Ivan
Roko
Ante
Luka
Toni

The team that turns your ideas into AI-powered digital products.