TL;DR:
P vs NP asks whether every problem that's easy to check is also easy to solve. Bitcoin runs on that gap: verifying a block or a signature is instant, while finding a nonce or a private key is effectively impossible. Most experts bet P ≠ NP, but a proof wouldn't make your keys safe. ECDSA's key problem isn't NP-complete, so its security rests on its own assumption, and "polynomial" doesn't mean practical anyway. The real threat to your sats is quantum computing.
The chance that AI proves P = NP is under 5%.
Either way, cryptography can evolve, and Bitcoin can upgrade its signatures.
What P and NP actually mean
- P is the set of problems a computer can solve quickly.
- NP is the set of problems where a computer can check a proposed answer quickly.
"Quickly" has a precise meaning: the work grows at a manageable rate as the problem gets bigger, like doubling or squaring. It doesn't explode, the way guessing a 256-bit key does, where each extra bit doubles the work.
Anything you can solve quickly, you can also check quickly, so every P problem is also in NP. The million-dollar question is whether the reverse holds. Is every NP problem secretly a P problem?
Four examples:
- Sort your UTXOs by value: fast to check and fast to solve. This one is in P.
- Solve a giant Sudoku: fast to check, with no known fast way to solve.
- Find a valid block nonce: one hash to check, brute force to find.
- Get a private key from a public key: one scalar multiplication to check, with no known fast way to find.
Sidebar: the textbook definition
In a textbook, P and NP are defined using Turing machines, the theoretical model of a computer.
- P is what an ordinary (deterministic) Turing machine can solve in polynomial time, meaning at most nᵏ steps for an input of size n. An ordinary machine has exactly one next move at every step.
- NP is what a nondeterministic Turing machine can solve in polynomial time. This imaginary machine can branch into every possible move at once, or think of it as always guessing right. It says "yes" if any branch finds a "yes."
Picture a nondeterministic miner. It doesn't grind through nonces. It guesses the winning nonce in one step, then spends a few microseconds checking it. No real machine works this way.
The two definitions describe the same set of problems. The lucky guesses on a winning branch are a proof that anyone can check quickly. And a nondeterministic machine can guess a proof bit by bit, then check it. So "solvable by a lucky guesser" and "easy to check" mean the same thing.
In these terms, P vs NP asks whether an ordinary machine can always fake the lucky guessing with only a polynomial slowdown. Trying every branch is exponential.
Two common mix-ups:
- The N stands for nondeterministic, not "non-polynomial."
- Quantum computers are not nondeterministic machines. They don't get to guess right for free, and they aren't believed to solve NP-complete problems quickly.
Why Bitcoiners should care
Nobody knows the answer. The question has been open since 1971, and it is one of the Clay Mathematics Institute's seven Millennium Prize Problems, with $1 million for a proof.
If you run a node, you already live inside this question every ten minutes.
I learned this from Christos Papadimitriou, my professor at Stanford in the 1980s and one of the people who wrote the textbook on complexity, literally. His motto fits this post: "There is nothing worth explaining that cannot be explained through a good story." (Columbia CS) So here's the story.
Mining is the perfect example
Checking a block is instant. Your node hashes the header once and compares it to the target. Done in a fraction of a millisecond.
Finding that block is brutal. Miners worldwide grind through trillions upon trillions of nonces, because nobody knows a shortcut. You just guess until a hash comes in under the target.
Same story with your keys. Checking that a private key matches a public key takes one calculation. Going the other way, from public key to private key, would take longer than the age of the universe with every computer on Earth.
That gap between "easy to check" and "hard to find" is the whole subject. P vs NP asks whether the gap is real, or whether we just haven't found the shortcuts yet.
NP-complete: the master keys
Some NP problems are "NP-complete." These are the hardest ones, and they are all linked: a fast method for any one of them gives you a fast method for every NP problem.
There are thousands of them, including Sudoku, delivery-route planning, and scheduling. One should look familiar. A miner building a block template wants the set of transactions that pays the most fees while fitting under the weight limit. That's a version of the knapsack problem, which is NP-complete. That's why mining software uses good-enough shortcuts, like sorting by fee rate, instead of finding the perfect block.
So proving P = NP means finding one fast method that works for all of them. Proving P ≠ NP means showing that no such method can exist.
Polynomial isn't the same as practical
"In P" means fast on paper. Real-world speed is a different question, and the best story about the difference happened while I was at Stanford.
Linear programming is the math of getting the best result under constraints, like routing oil, scheduling flights, or allocating capital. Three algorithms show how far theory and practice can drift apart:
- Simplex method (1947, George Dantzig, later a Stanford professor): slow in theory, because some contrived inputs take exponential time. Fast in practice, and still everywhere.
- Ellipsoid method (1979, Leonid Khachiyan): the first polynomial-time method, so fast in theory. Much slower than simplex in practice.
- Interior-point method (1984, Narendra Karmarkar at Bell Labs): fast in theory and in practice. It's the basis of modern solvers.
There's a twist: the slow-in-theory simplex method turned out to be polynomial on average inputs. In the early 1980s, Karl-Heinz Borgwardt and Steve Smale showed that the bad cases are rare. That's why it kept winning in practice.
What this means for Bitcoiners:
- Worst case isn't typical case. Sudoku and SAT are NP-complete, but modern SAT solvers routinely handle industrial problems with millions of variables. NP-complete means some instances are hard, not all of them.
- Cryptography needs the opposite. Your key has to be hard on average, for a random key, not just in the worst case. That's a separate and stronger promise than anything P vs NP gives you.
- Concrete cost beats asymptotics. secp256k1 is a fixed size. What matters is the actual attack cost. The best known classical attack, Pollard's rho, takes about 2¹²⁸ steps. That's the number that protects your coins, not a theorem about nᵏ.
What it means for your sats
Bitcoin rests on two hard problems. SHA-256 secures mining and addresses. The secp256k1 elliptic curve secures your signatures. Here is how each possible answer would affect them.
If P = NP, with a practical algorithm: this is the doomsday case. Finding a key or a hash input is exactly the kind of search a practical algorithm would make easy, so in principle both pillars would fall. It would also break nearly all of modern cryptography. Most experts think this is extremely unlikely.
If P = NP, but the algorithm is impractically slow: nothing happens. An algorithm that takes n¹⁰⁰⁰ steps is "fast" on paper and useless in real life.
If P ≠ NP: this is the twist most people miss. A proof that P ≠ NP would not prove your keys are safe. Here's why.
Why ECDSA isn't NP-complete
Bitcoin signs transactions with ECDSA, and since Taproot also with Schnorr signatures. Both are secure only if nobody can recover your private key from your public key. That's the elliptic curve discrete log problem, and it is almost certainly not NP-complete. Here's why experts are confident, even without a proof:
- It's easy to check in both directions. If someone claims a key exists in some range, they can prove it. If they claim it doesn't, they can prove that too. Problems like that belong to a class called NP ∩ coNP. If one of them were NP-complete, a big chunk of complexity theory would collapse (NP would equal coNP), and almost nobody believes that.
- Quantum computers can break it. Shor's algorithm cracks it efficiently on a large enough quantum computer. Experts don't believe quantum computers can solve NP-complete problems efficiently, so this is another sign that it's easier than NP-complete.
The same is true of factoring, which RSA relies on. Both live in the middle zone between P and NP-complete. That cuts both ways for you. A P ≠ NP proof wouldn't protect your keys. But a crack of ECDSA wouldn't prove P = NP or break every other hard problem, either.
The real threat is quantum, not P vs NP. Shor's algorithm already breaks elliptic curve keys on a large enough quantum computer. The hardware doesn't exist yet, but the estimated size needed keeps falling. Google researchers published new resource estimates for breaking secp256k1 in 2026. That's why post-quantum signatures are the real conversation for Bitcoin, and why reusing addresses that expose your public key is a bad habit.
What the experts bet, and what Christos taught me
Most experts bet that P ≠ NP. In Bill Gasarch's 2019 poll of researchers, roughly 88% said so. We've had 50+ years of the smartest people alive failing to find a fast method for even one NP-complete problem.
So why is it so hard to prove? Showing P ≠ NP means proving that no fast algorithm exists, out of infinitely many possible algorithms, including ones nobody has imagined. Researchers have even proved that the most common proof techniques can't work here. Whoever solves it will probably need entirely new math.
Christos Papadimitriou has spent his career mapping this terrain. He has taught at Harvard, MIT, Stanford, and Berkeley, and is now the Donovan Family Professor of Computer Science at Columbia. Three of his ideas matter for Bitcoiners:
- He wrote the book. His 1994 textbook Computational Complexity is still where grad students learn this stuff.
- He mapped the middle zone. Some problems seem hard but aren't NP-complete. Papadimitriou created a class called PPAD for one family of them, and with Constantinos Daskalakis and Paul Goldberg he showed that finding a Nash equilibrium is PPAD-complete. That's the kind of in-between hardness I described earlier for your private keys.
- He thinks about incentives. He helped build algorithmic game theory, which studies what happens when selfish players meet algorithms. That's Bitcoin in one sentence: game theory plus cryptography.
I knew him at Stanford from 1982 to 1986. That was eight years before his textbook came out, and more than two decades before Satoshi published the whitepaper. The ideas that secure Bitcoin today were being worked out in rooms like his.
Could AI crack it?
Probably not soon, but it's no longer a joke question. In May 2026, an OpenAI reasoning model disproved an 80-year-old conjecture from Paul Erdős about distances between points. Human mathematicians improved on its result within weeks, but the core idea came from the machine.
P vs NP is a different league, though. The Erdős result was a clever construction. P ≠ NP needs a proof that something is impossible, and that's exactly where the known barriers bite.
My rough odds, which are gut calls and not data:
- AI solves P vs NP: about 1% within a year, 5% within five years, and 15% within ten.
- AI finds a classical break of secp256k1: about 0.5% within a year, 2–3% within five years, and 6% within ten.
And if it does get solved, I'd still bet roughly 9 to 1 the answer is P ≠ NP. Either way, the quantum clock matters more for your coins than either column.
The bottom line
For Bitcoin, the real risk is quantum computing, not P vs NP. Shor's algorithm is a known, concrete attack on ECDSA and Schnorr signatures. The only thing missing is the hardware, and the estimates for how much is needed keep falling.
The P vs NP risk is small. Even if AI cracks P vs NP in the next decade, which I put at about 15%, I'd bet about 9 to 1 the answer is P ≠ NP. So the chance AI proves P = NP is well under 5%, and the chance it hands us a practical algorithm that breaks cryptography is lower still.
Either way, cryptography can evolve. NIST has already standardized post-quantum signatures like ML-DSA and SLH-DSA. Bitcoin can adopt new signature schemes by soft fork, the same way it added Schnorr with Taproot in 2021. The hard part isn't the math. It's coordination: moving coins to new address types before the threat arrives, especially coins whose public keys are already exposed on-chain.
So don't lose sleep over the Millennium Prize. Do follow the post-quantum proposals, and stop reusing addresses.
Sources
- Christos Papadimitriou: Four decades of exploring the boundaries of computation, Columbia Computer Science
- Christos Papadimitriou faculty page, Columbia Engineering
- OpenAI claims it solved an 80-year-old math problem, TechCrunch, May 2026
- How AI tore through a mathematical community, Quanta Magazine, Aug 2026
- Securing elliptic curve cryptocurrencies against quantum vulnerabilities, Babbush, Zalcman and Gidney (Google), IACR ePrint 2026/625
- A new polynomial-time algorithm for linear programming, N. Karmarkar, Combinatorica, 1984
- Narendra Karmarkar, Paris Kanellakis Theory and Practice Award, ACM
- Karmarkar's algorithm overview, CWI Amsterdam





