There are rumors going around that one of the AI labs has made a breakthrough in cryptography. Some people are saying maybe it’s a fast algorithm for integer factorization; others are saying that they’ve proved P=NP, which may or may not matter for practical cryptography. I’ve been getting questions from friends and family about what any of this means, and I’m seeing a lot of confused and wrong takes on the internet. Here’s my attempt to think through this stuff, and also to write things down in one place that I can point people to.
Before I get into it, two things.
One, things are moving really fast and many of the hypotheticals below will get ruled out in the coming days. This post is mostly about fast factoring because that’s what the rumors are about. Some of the discussion below becomes less interesting if the result is actually about something else. I’ll try my best to distinguish between settled results and possible futures.
Two, now would be a great time to update your phone, browser and OS frequently. Even if there’s no practical method that breaks modern cryptography, there have been a lot of security exploits recently and there will certainly be more. And if RSA gets broken, major browser vendors will push patches to reject RSA anywhere in the certificate chain. You want that. I update daily these days. Even if you have automatic updates turned on, iOS often doesn’t apply them ASAP. I literally do it manually.
Okay I have a third thing that’s maybe a bit more controversial: Maybe switch to Signal right now. Of all the major messaging apps, it’s the one whose crypto is safe in the largest number of possible worlds. (iMessage is also good.)
Okay. Very roughly speaking, there are four major possibilities:
-
(Status quo) There’s no fast, practical factoring algorithm. Maybe they proved that factoring is not in P (which implies P != NP). Or maybe factoring is in P but the algorithm is galactic, or there’s some improvement to GNFS but it’s only small. Or P=NP but the algorithm is galactic. The set of worlds here contains some incredibly major results, but not much would change practically.
-
(RSA is broken in practice but not discrete log over elliptic curves) There’s a practical algorithm for factoring integers that works on input sizes big enough that RSA stops being useful in practice. The algorithm may or may not be polynomial time, but it’s good enough to break 2048-bit RSA keys. However, the ideas in this algorithm don’t extend to discrete log over elliptic curves, so key-exchange methods like X25519 still work, and so does ECDSA. This world is strictly better than if a big quantum computer showed up.
-
(Both RSA and elliptic curve discrete log are broken in practice) This is equivalent to “a big quantum computer showed up”. This is the world that post-quantum cryptography is designed for. We have a playbook for encryption, and the migration is currently under way. But the work for signatures and certificates has barely started. The migration would suddenly become a code red emergency, and impersonation would become a huge problem overnight.
-
(P=NP and there’s a practical algorithm for all problems in NP) This is so unlikely I’m not even sure it’s worth considering, but I guess it’s possible. This would be crazy bad for cryptography. All cryptography except for one-time pads would be broken, because all encryption and hashing methods rely on the difficulty of problems in NP. Attackers can impersonate anyone, read any communication, etc. But, like, also, all the classic hard computer science problems would be solvable fast, so maybe this is actually great? I have trouble seriously imagining this world. It’s really goofy.
In reality there are way more possibilities, and I picked this way of slicing the possible futures because the rumors are about factoring rather than something else. If the result isn’t about factoring then this isn’t the right analysis any more. This post is going to be obsolete very fast!
Also, this way of slicing things only matters if you care about practical consequences for banking, the internet, the economy, etc. I sometimes care about those things! I often care about those things! But I also wear other hats. If you care about math and theoretical computer science, then P=NP is absolutely astounding and the cryptography stuff is a sideshow. Our collective minds would be blown to smithereens. Knuth would turn out to be right, the world is very silly, etc.
There’s a long background and glossary section at the end if you’d like a quick refresher on any of this stuff.
Practical things people have asked me
What should I do?
Update your browser, OS and phone. At least once a week (check!), and maybe more frequently.
If RSA gets broken then immediately update your browser and maybe wait for the chaos to subside before using your bank stuff? Just be careful.
If both RSA and ECDSA get broken then, uhh, maybe do banking in person for a bit? Disable internet banking? Don’t buy stuff online and lock your credit cards? I’m not sure this is necessary, but I’d rather miss out on good post-Thanksgiving sales than lose a bunch of money.
Use a password manager, but change all passwords in LastPass shared items in case RSA gets broken soon.
Is LastPass safe?
Individual passwords are safe from an RSA break because they use only symmetric crypto, shared items use RSA. There was a breach in 2022 where attackers took shared folder data, so if RSA breaks they’ll be able to decrypt them now. Change all passwords that were ever in LastPass shared items.
If your master password wasn’t safe, you should change everything that was in the vault in 2022.
Why is Signal safe?
Signal uses a mix of post-quantum and elliptic curve cryptography to encrypt messages such that both would need to be broken. Of course if P=NP with a practical algorithm then Signal’s crypto is broken as well oops lol! But that’s really not going to happen, I mean come on.
World 1: status quo
There are many astounding results in CS and cryptography that nevertheless don’t change real life very much. For example, if P=NP but there’s no practical algorithm, then all of theoretical CS is in a very cool and interesting place but you can continue using your phone for Black Friday shopping.
This world also includes results that rule out ways to break RSA with classical computers. For example, we could learn that P != NP, and integer factorization is not in P. Or we could get a lower bound on the hardness on integer factorization while not ruling out the possibility that P=NP: for example, an n^100 lower bound on integer factorization leaves RSA safe and is consistent with P=NP.
There are lots of intermediate and complicated possibilities here! For example, it is possible in principle that P != NP, and integer factorization is not in P, yet average RSA moduli can be factored easily! The safety of RSA depends on average-case hardness.
These are strange and wonderful things to consider, but as results come in over the next days or weeks, the biggest practical question is whether we’re still in this world. Is there a practical method that breaks RSA for real sizes, or makes it much easier?
I’m so sorry but I must present another intermediate possibility. There could be an advance that makes RSA slightly easier to break, but only with enormous amounts of compute. So a state-level actor (or someone with a massive GPU fleet) could break an individual key by throwing millions of dollars at the problem. In practice this would mean that RSA key sizes get bigger until it’s finally deprecated in the move to post-quantum crypto. But if you’re important enough that someone might spend millions to break your comms, presumably you’re already not using something that relies on RSA, right? Right?
World 2: RSA broken in practice but ECDSA is safe
This is better than if a big quantum computer gets made, because at least ECDSA is still safe. But we’d have a messy scramble and many emergency migrations.
People have already mentioned that many root TLS certificates use RSA signatures. Fortunately, there are some non-RSA TLS root certs that are already in the trusted stores of major browsers and operating systems (they use ECDSA, which is based on elliptic curves, but aren’t post-quantum). Browser and OS vendors will push patches in a hurry that stop trusting RSA signatures anywhere in the certificate chain. Major websites will probably quickly get new certificates. However, a long tail of sites won’t. Google and Cloudflare and Bank of America will probably be quickly fine, but your local bank website might not. It’s important to update your browser and not use any website that your browser says is unsafe! Many websites will appear to be broken, and you might be tempted to try using some other browser. That would be a mistake. There are strong open-weights models that anyone could use to run exploits at scale. It doesn’t take a rare genius any more to do that.
TLS isn’t the end of the story, not by a long shot! Google and Microsoft sign-in tokens are signed using RSA, so anyone could forge a token, sign them using Google’s private key, and then sign in as you. I think this is a bigger deal than TLS impersonation! For example, I sign in to Tailscale using my Google account, so if Tailscale accepts a forged JWT then an attacker can ssh into my laptop! I haven’t checked exactly how Tailscale’s login flow works; I suspect they do the correct thing and ask Google for their current keys, and Google would immediately revoke RSA keys. But there are so, so many services that people sign into with these services, and the worst part is that each individual service needs to update: services should look up Google’s current keys at a published URL, but many services hardcode or cache keys for a long time. There may be a long tail of services that would accept forged tokens.
There’s lots of other stuff that gets broken in this world. TLS 1.2 traffic where key exchange was done using RSA; LastPass shared items are encrypted with RSA, and there was a LastPass server breach a while ago; credit cards in offline mode; old recorded iMessage traffic, which used RSA-1280; Bitwarden’s organization sharing feature. 1Password uses RSA to encrypt each vault’s key, so if there’s a 1Password server breach then I think (but am not confident) 1Password vaults would get broken. They’d probably act fast to switch away from RSA, but if it turns out there has been a breach in the past then all those vaults get broken anyway. Messy messy messy!
World 3: Both RSA and ECDSA broken in practice
This is equivalent to a big quantum computer showing up, so it’s exactly what the post-quantum cryptography migration would protect against. It’s just that the migration is expected to take some time, and now it would need to happen in a hurry. Expect a big mess! Everything from the previous section would happen, plus any sessions that didn’t use post-quantum key exchange would get broken. For example, old TLS sessions from before about 2024 would get decrypted. (The technical term for this is that forward secrecy of those sessions is broken, because the parts of Diffie-Hellman key exchange that are sent in the clear would be enough to recover the parts that are not.)
We’re way less ready for this world than for World 2, because we already have a classical replacement for RSA, elliptic curve signatures and key exchange, and it’s widely deployed.
In World 3, the replacement for signatures and certificates (ML-DSA) isn’t deployed yet. Key exchange is in better shape because of hybrid ML-KEM, which is already used in TLS 1.3.
So expect a big mess and lots of chaos if this happens!
World 4: P=NP and there’s a practical algorithm
This is a super interesting and crazy world! It’s absolutely not going to happen, but I feel that it’s worth considering if only for the health benefits of the mental gymnastics.
The main thing to understand is that every cryptographic algorithm besides one-time pads would get broken, because they all rely on the difficulty of problems that are in NP. For example, cryptographic hashes are considered safe because it’s very hard to find a string that hashes to a given hash. But the problem of finding such a string is in NP, because an affirmative answer is checkable in polynomial time: just compute the hash and check. So a practical algorithm for everything in NP would mean that you can find a preimage for any hash, which breaks the key guarantee.
Background
(This section is deliberately simplified. I beg your forgiveness and understanding if you know a lot of cryptography; I’ve tried to write this for a broad set of people.)
Cryptography solves two major classes of problems: preventing attackers from reading your messages, and proving to someone that you’re really who you say you are.
In symmetric cryptography, in order to exchange messages, Alice and Bob must first establish a shared secret, called a key.
In public-key cryptography, Alice has a public key that she can hand out to everyone. Bob can encrypt a message with Alice’s public key. Only Alice can decrypt this message, because only Alice has the private key corresponding to her public key. The security of the system rests on the difficulty of determining the private key, if all you know is the public key.
Digital signatures are used to prove that a message is really from Alice. Alice signs a message using her private key. Bob can verify the signature using her public key. The verification proves that only someone who has Alice’s private key could have made the signature. The security here also rests on the difficulty of going from the public to the private key; if that were easy, then Eve could figure out Alice’s private key using just her public key and then sign anything she likes. In other words, Eve could forge Alice’s signature.
Key exchange are methods where Alice and Bob can send each other some messages in cleartext and end up with a shared private secret. Then they can encrypt the rest of their communication using symmetric key crypto and that shared key.
Diffie-Hellman is a class of methods for key exchange. The original variant used plain integers modulo a prime. That’s not used much in practice any more. Elliptic Curve Diffie-Hellman (ECDH) is a newer class of key exchange that’s harder to break than the original. The specific variant of ECDH you’ll see mentioned in practice is X25519.
ECDSA is a digital signature algorithm that uses elliptic curves. The security of ECDSA, ECDH, and X25519 relies on the difficulty of the Elliptic Curve Discrete Logarithm problem. I won’t go into the math here, but, roughly, it’s the problem of finding n if you’re given x^n, where x is known. Here, n is an integer and taking a power isn’t repeated multiplication but rather repeated application of the group operation in an elliptic curve.
RSA is an early and important public-key cryptography algorithm. In RSA, the private key is a pair of large prime numbers. The public key is their product. The security of RSA rests on the difficulty of finding the two primes, if all you know is their product. That’s the integer factorization problem.
There is no known practical method for factoring integers quickly, but also, nobody has proved that no such method exists. This post discusses what would happen if various different discoveries relating to this problem are made.
P is the class of decision problems that can be solved in polynomial time. P is a set, so we say that a problem is “in P” or “not in P”. For example, reachability in a graph: “Is there a path from s to t in this graph?” This problem can be solved in polynomial time using breadth-first search, so it’s in P. The most common way to show that problem is in P is to produce a polynomial time algorithm for solving it.
For a long time it was unknown whether primality testing is in P. But in 2002, the paper PRIMES is in P provided a polynomial time algorithm for primality testing, called the AKS primality test. The Miller primality test also runs in polynomial time, but it’s only correct if the Generalized Riemann Hypothesis is true – which, it really really seems, was proved in November 2026! So Miller is now also a polynomial time algorithm for primality testing.
Many problems are most naturally phrased as “finding a solution” rather than as a decision problem. Sorting is an example. You can often turn them into a series of decision problems by just asking about each bit of the output: “Is the first bit of the sorted output 1?” Since there are only a polynomial number of bits in the output of a sorting algorithm, we can turn a polynomial time algorithm for solving the decision problem into a polynomial time algorithm for solving the original problem of producing the sorted output. (In theory, not in practice.) With that bit of machinery in mind, we say that “sorting is in P”, because we have O(n log n) algorithms for sorting.
I’m just being super technical here because both P and NP are classes of decision problems, and some of the confusion online on this topic comes from not making this distinction.
NP is the class of decision problems such that a “yes” answer can be accompanied by a certificate showing that the answer is correct, and the certificate can be checked in polynomial time. SAT is the classic example: given a boolean expression with a bunch of variables, is there an assignment of true/false to each variable that makes the overall expression true? If yes, then the certificate is simply the assignment of true/false to each variable. To check the answer, simply evaluate the boolean expression. So a “yes”-answer has an accompanying certificate that can be checked in polynomial time.
Let’s phrase integer factorization as a decision problem: “Does n have a factor less than k?” If the answer is yes, the certificate is simply the factor. We can easily check that the factor is less than k and that it divides n.
How does this decision problem relate to the original problem of finding the factors? Well, we can binary search on k: if it’s composite then there’s a factor between 2 and sqrt(n), so in log n steps we can find an actual factor, if one exists. Once it has been found we can divide n by the factor, and now we have a smaller version of the same problem.
co-NP is the class of decision problems whose “no” answer has a certificate checkable in polynomial time. Integer factorization is in both NP and co-NP: to show that n does not have a factor less than k, the certificate is the list of all factors. To check it, we first verify that they’re all bigger than k, that they’re all prime (using AKS or Miller, which run in polynomial time), and that they multiply to give n. We won’t talk much about co-NP in this post, but you might hear the phrase on the internet.
Quantum computers use properties of quantum physics to solve certain problems much faster than the classical computers we all know and enjoy today. In particular, there are algorithms that can run on quantum computers that would quickly factor large integers, which breaks RSA, and solve the discrete logarithm problem on elliptic curves, which breaks elliptic curve Diffie-Hellman key exchange. As of November 2026, there are no quantum computers that can process inputs large enough to matter for breaking real cryptography we use today.
Post-Quantum Cryptography refers to methods that would continue to be secure even if there are practical quantum computers that can process big inputs. Quantum computers could be imminent (it wouldn’t be crazy if it happened in the next ten years), so there’s a big push underway right now to move to these methods. This is supposed to happen over the next 3-8 years or so, and it’s super unevenly distributed: Signal’s encryption is already post-quantum, but not its authentication. Traffic between your browser and Cloudflare is encrypted with post-quantum methods, but most signatures and certificates are not yet post-quantum.
Glossary
- Fast
- People mean “fast” to mean a couple different things. In complexity theory, “fast” can mean “polynomial time”. In common usage, “fast” can mean “practical for real inputs on reasonable hardware”. In this post I use “practical” for that second meaning. Some of the confusion online comes from people talking past each other because they’re using “fast” to mean different things.
- Integer factorization
- The problem of finding, given an integer N, its prime factors.
- P
- The class of decision problems that can be solved in polynomial time.
- NP
- The class of decision problems where, when the answer is “yes”, there’s a proof that the “yes” answer is correct, and the proof can be verified in polynomial time.
- P =? NP
- The most important unsolved problem (as of November 2026) in computer science: is P = NP? That is, if a problem’s “yes” answer can be verified in polynomial time, can it also be actually solved in polynomial time?
- Galactic algorithm
- An algorithm that beats alternatives only on inputs too large to ever occur. For example, it could be polynomial, but so incredibly slow that it’s just not practical at all. This could be because there’s a big constant, or a big exponent, or both.
- GNFS
- General Number Field Sieve. The best known algorithm for factoring large integers. It’s worse than polynomial but better than exponential in the size of the input. If we find a method that’s way faster in practice than GNFS, then that would break RSA.