Zero Knowledge

How It Actually Works

The real cryptography behind Zero Knowledge - keys, locks, quantum computers, and the one thing I made up.

Almost everything in this book is real. The quantum computing is real. The cryptography is real. The way it breaks is real. The reason the world doesn’t end is real. There is one made-up thing in the whole story, and when we get to it, I’ll explain it. If you want to go deeper on any of this, there are links at the end.

You don’t need any math. You need two ideas: a lock, and a key.

A key is an object used two ways. The key that locks my front door can also unlock it. So, whoever has the key can lock and unlock a door.

Public-key cryptography, which almost all of modern life runs on, solves that with a cool trick. You get two keys, and they’re a matched pair. One of them you hand out to the whole world. This is called your public key. The other you keep and show nobody. This is your private key.

Something locked with your public key can only be opened with your private key. So if you give me your public key, I can lock something with it and send it to you across a wide-open channel full of eavesdroppers, and none of them can open it. Only you can, because only you have the private key.

That one idea is doing the work behind the little padlock in your browser, your banking app, your messages, the software updates your phone installs while you sleep, and every Bitcoin that has ever moved.

The public and private key do two different jobs.

It’s important to separate the concept of “a secret” and “a signature”, because when the break comes, one of them mostly survives and the other falls apart. That gap is a critical part of the novel.

All of this rests on one kind of math problem which is easy to do in one direction, but miserable to undo.

Multiplying two big numbers together is easy. A twelve year old can do it slowly and a computer does it instantly. But take the answer, a giant number with hundreds of digits, and try to work backward to the two numbers that were multiplied to make it. There is no fast way to do this. If the number is big enough (and subsequently has enough digits), the best current computers on Earth, working together, would take longer than the age of the universe to come up with the answer.

Your public key is one of those giant numbers. The lock works because going backward, and figuring out the two numbers that multiplied together made the giant number, is impossible in any time that matters. This is often called “factoring the number.” The entire modern digital fortress sits on that one assumption.

Breaking it means somebody found a way to go backward fast. The moment you can factor the number, you can derive the private key from the public one. If you have the private key you were never supposed to have, you can open the lock or forge a signature. Everything built on the premise that “going backwards and figuring out the factors” is impossible falls apart immediately.

There’s a close cousin of this math called elliptic curves that protects a lot of the same things, including Bitcoin. A different problem underneath, but the same weakness to this attack. When I say “the break,” I mean both.

Now, let’s talk about quantum computers. They aren’t faster than a regular computer. It’s a different kind of machine that is very good at a short list of specific problems. However, it is useless at many others, like speeding up how quickly you get through your email. But for a handful of problems with a particular type of structure, it can explore an enormous number of possibilities simultaneously, arranging for the wrong answers to cancel each other out, leaving the right one remaining.

In 1994 a mathematician named Peter Shor found a way to turn “factor this giant number” into exactly that kind of problem. Shor’s algorithm is the backward step, the one that’s supposed to be impossible, done fast, if you have a big enough quantum computer to run it.

The real state of the world as I write this, in the fall of 2026, is that nobody has a quantum computer that can do this, and it’s not close. The best quantum machines anyone has built have on the order of a thousand qubits today, and they’re so error-prone that only a few dozen are reliable enough to do real work. In 2025, a quantum computer able to factor a real 2048-bit key (the size used today) would need somewhere around 1 million qubits. That’s a million needed against the thousand that exist.

But the trend is important. In 2019 the estimate for that same break was 20 million qubits. By 2025 a Google researcher had pushed it under 1 million, which is what I referenced in the above paragraph. In early 2026 a team claimed a design that needs fewer than 100,000. An order of magnitude reduction in one year.

Nobody got a bigger machine to do that. They got smarter about the math, and every time they got smarter the machine needed got smaller.

This is the made-up step in the book. Samantha doesn’t build a bigger machine. She figured out the next leap in the math and comes up with a new way to do the algorithm in a way that collapses the requirement from a million qubits down to a few hundred.

If this algorithm existed, a machine with a few hundred qubits could factor a 2048-bit key. This size machine could sit on an optical table in a quiet lab. While the shortcut is currently fiction, you should assume that many different researchers are working on this problem right now. Eek.

Next, let’s discuss where the two jobs the key does (secrets and signatures) go in opposite directions.

The problem, risk, and general threat is a known one and many people and companies are working on it. Years ago, work began to swap out vulnerable locks.

The locks that keep secrets were the easy ones to swap, and that work is mostly done. Right now, today, more than half of the encrypted traffic on the web already runs on a new kind of lock the break can’t touch. Your browser switched to it quietly and you never noticed. So when the break lands, most of your actual secrets hold.

The locks that prove who you are, the signatures and certificates, are a nightmare to swap. They’re baked into hardware, into standards, and into the boot chip of devices that will still be running in fifteen years. The lighting system in my condo runs off of hardware built in 2006 and even though I can control it using an application I built in Claude Code on the web, I can’t protect it from this problem without replacing it. This is the real problem.

So the day the break lands, your secrets mostly hold. What you lose is the ability to tell what’s genuine. The website that looks like your bank might be anyone. The software update that says it’s from the manufacturer might be from an attacker, and your device installs it without a flicker of doubt, because the signature checks out. It’s a real signature now, just made by the wrong person.

When identity breaks, anybody can sign as anybody. The problem isn’t that the world’s secrets are suddenly readable. It’s that the world can no longer tell a true thing from a lie that’s signed correctly. Think of this as digital forgery.

Bitcoin is an obvious victim, so it dies first in the book. It’s likely it would die first in real life also and has been a quantum computing trope for a while, heavily debated as to whether it will happen in a year, or twenty years.

You prove you own a Bitcoin by signing with your private key. Fine, except that some Bitcoin addresses have the owner’s public key written right there on the public ledger, in the open, for anyone to read. Normally that’s harmless, because you can’t get from the public key to the private one. Break the math and you can. You read the public key off the chain, compute the private key, and move coins that were never yours. Remember, digital forgery.

The most exposed coins of all are the oldest ones. Satoshi Nakamoto, Bitcoin’s anonymous inventor, holds roughly 1.1 million coins in exactly that kind of exposed address, public keys sitting in the open, untouched since the beginning of Bitcoin. Current estimates put something like a quarter to a third of all Bitcoin in addresses a quantum break could reach.

The moment a long-dormant Satoshi-era coin moves, the entire world sees it, on a public ledger, within minutes. It can’t be un-seen or faked. It will be one of the most visible events in all of finance and technology. One transaction, and every government, exchange, and Bitcoin owner on Earth knows the impossible just happened.

In the book, that transaction fires by accident, during a test. The proof and the catastrophe can happen at the same time.

The Bitcoin community is working on fixing this. There’s a serious effort called Project Eleven, and a proposal called BIP-360 for a quantum-resistant address type, accepted into Bitcoin’s proposal repository in early 2026. It isn’t live yet, and even once it is, none of it can force old coins to safety - it would only protect coins that move to the new address type.

Bitcoin is a noisy catastrophe and will be front page news everywhere. The quiet catastrophe is worse, and it’s the core problem the book revolves around.

Think about what happens when your computer installs an update. It doesn’t call a human to ask permission. It checks a signature, and if the signature traces back to one of a small number of master keys it was built to trust, such as the keys that sign Windows, it installs the code automatically.

Forge one of those master keys and you can hand billions of devices a piece of malicious software that every one of them accepts as genuine. No stealing, no tricking a user, no getting lucky. You compute the private key, sign your malware with it, and every device built to trust that key installs it as genuine.

This has already happened without any quantum break. In 2012 a piece of malware called Flame forged a Microsoft signing certificate through a cryptographic flaw and rode the Windows Update channel. Stuxnet, the worm that wrecked Iranian centrifuges, signed itself with stolen certificates so machines would trust it. In 2020 the SolarWinds attack shipped a legitimately signed software update that happened to be poisoned, and roughly 18,000 organizations installed it without blinking. Every one of those needed luck, a stolen key, or a rare flaw. A quantum break removes all three conditions and makes the attack universal.

The master certificates that sign the boot chip for a generation of Windows machines were issued in 2011, they’re the breakable kind, and they expired in 2026. They’re being rotated out to new ones right now. But a huge population of devices will keep trusting the old, breakable keys for years, because their trust keys are burned into firmware that almost never gets updated: medical equipment, cars, factory controllers, and machines built to run for twenty years. This is where the real danger lives.

It’s also why, in the book, the thing that finally makes all of this real and human isn’t a stock chart. It’s a device in a hospital, running firmware signed by a key that can now be forged. Sure, Bitcoin is interesting and theoretically valuable, but hardware in a hospital that is hijacked can kill people.

Fortunately Zero Knowledge is a race and not an apocalypse.

The shortcut that breaks the locks only works on one particular kind of mathematical structure. It’s the structure underneath RSA and elliptic curves, the stuff the whole classical world was built on. But there’s a completely different kind of math, built on something called lattices, that has none of that structure for the shortcut to grab onto. Point the break at it and the break has nothing to do. It just stops.

This isn’t a theory. It has been figured out. The U.S. standards body, NIST, ran a years-long worldwide competition to find replacement locks that survive a quantum computer, and in August 2024 it published the winners, lattice-based schemes with names like ML-KEM for keeping secrets and ML-DSA for signatures. Those are the new locks. They’re the ones your browser already switched to.

So the book is a race to get everyone on the replacement locks before an attacker gets what they want. There is a door. A central question in the book is whether everyone makes it through in time, and whether the people who could hold the door open while changing the locks can agree on how.

However, even a lock that’s mathematically safe can fail if somebody builds it wrong. One wrong number in one widely used piece of software can leak the private key through the signatures it produces. Collect enough signatures and the key falls out. That’s not the math breaking, but a bug. If you can figure out the bug, and fix it in time, and then get the world to install the fix in time…

If you want to go deeper following are some links as of October 2026. This field is moving incredibly fast so much of this will be obsolete soon.

This is a near-term sci-fi thriller. You don’t have to understand any of this to enjoy the book. I’ve tried to explain things at a high level in the dialogue between characters. But, since this is my first novel, I’m still working on figuring out how to do this effectively. So, hopefully this helps.

Finally, if I got something wrong, and some of you know this material far better than I do, tell me on the line where I got it wrong. I’d rather fix it than defend it.

the newsletter

Get every post by email.

Zero Knowledge is being written in the open. New posts go straight to your inbox, and you'll be first to know the day it's out. Unsubscribe anytime.

← contents