Skip to content

Essay

AI Will Break the World’s Software Before It Secures It

By Arjun Khemani ·

AI will create a short-term security crisis before a long-term security renaissance. For Zcash, that renaissance has already begun.

For a long time, complex software benefited from the fact that very few people could understand it well enough to break it. Flaws persisted for years because few people knew where to look, and finding them was expensive.

However, AI is reminding us that absence of evidence is not evidence of absence, and that hidden flaws can still be waiting.

Zcash may be the first case study in how AI first breaks critical software and then makes it more secure than ever.

How a frontier model helped find a counterfeit bug in Zcash

On May 29, security researcher Taylor Hornby, hired specifically to look for bugs in Zcash’s protocol code, used a frontier model to uncover a critical flaw in Orchard, Zcash’s current shielded pool. The bug sat within the zero-knowledge circuit that proves that private transactions comply with Zcash’s monetary rules. In principle, an attacker could have used it to create counterfeit ZEC inside Orchard without making the inflation visible on-chain.

The flaw had persisted for years through development, audits, and expert review. Then AI helped a researcher find it almost immediately after a stronger frontier model became available.

The researcher found the bug, responsibly disclosed it to the relevant people, and a patch was deployed immediately. There is no evidence that the bug was exploited. Zcash is about to deploy a new shielded pool to demonstrate that it was, in fact, not exploited and that bugs like this will never happen again (more on that below).

Every “battle-tested” system is at risk

The lesson from Zcash is that critical protocols and software need AI to harden security.

Many systems are called battle-tested because nobody has broken them yet. Often, that just means the search was too expensive. AI makes the search cheap, including for people you’d rather not have running it.

The initial impact may seem chaotic as previously hidden bugs surface everywhere. Systems might appear less secure, but those flaws already existed. The difference is that scalable intelligence now makes them much easier to find.

The defensive phase

The same technology that makes attacks cheaper also makes defense cheaper.

Today, software is secured through code review, tests, audits, and production monitoring. All useful, but not enough. Tests only check the behaviors you thought of. Audits check certain components, sometimes. Production only reveals the failures that actually happen.

AI can make security continuous. Every change can be reviewed from several models, and old assumptions can be re-tested as better models come online. Auditing can stop being a one-off ritual before launch and become part of everyday development.

Beyond better testing, the bigger change is formal verification going mainstream.

Formal verification turns a security claim into math. Instead of “auditors didn’t find a flaw,” you state the property precisely and construct a proof that a machine checks, step by step, under stated assumptions.

It’s always been brutally expensive. Translating a protocol into precise math requires thousands of lemmas and mechanical proof steps, carried out over months or years by experts who barely exist.

AI collapses that cost. Models translate informal reasoning into formal statements, generate lemmas, automate repetitive steps, and try 100 approaches in the time it takes a human to try one. With modern proof assistants like Lean checking every step, human-guided models can now compress proofs that used to take years into weeks, even for complex cryptosystems.

And you don’t have to trust the model. AI can produce nonsense. But an invalid proof cannot talk its way past a proof checker. The model proposes; the checker verifies. The model can be wrong all day, but the errors get caught.

The remaining risk is proving the wrong thing. A proof only confirms the exact claim you gave it, and it’ll confirm a useless claim as happily as a useful one. You could prove beyond doubt that nobody can spend a coin twice and still say nothing about whether coins can be conjured from nothing, if that’s the part you forgot to check. The proof is correct and pointless. The machine checks your logic; it can’t tell you that you pointed it at the wrong danger. Choosing what to prove is still a human job, and so is making sure the math matches the software actually running. AI doesn’t remove that judgment. It just writes it all down where people can argue with it.

From fixing bugs to proving their absence

Zcash shows the whole arc, and there is more to the fix than “we patched it.”

Counterfeiting bugs are not unique to private money. Bitcoin had one early in its history: someone minted billions of coins out of thin air, and it was patched within hours. What saved Bitcoin was its transparency. On a public ledger, everything is visible, so you can replay history and check whether a bug was ever exploited. Zcash’s privacy removes that safety net. A counterfeiting bug in the encrypted pool could be exploited silently, and no one would ever know.

So the real enemy is undetectable counterfeiting.

Here’s the insight that makes the problem tractable. Every counterfeiting bug lives in one of two places: the specification (the math the protocol is supposed to follow) or the implementation (the software that follows it). And implementation bugs can only ever produce detectable counterfeiting. The chain permanently records every transaction and proof, so anyone can replay history through corrected software, and anything a buggy node wrongly accepted becomes public evidence forever. The only place a bug can hide forever is the specification itself.

That changes what you have to prove. You don’t need to formally verify millions of lines of software, which is nearly impossible. You need to formally verify the math, which is merely very hard. Prove the specification sound, and undetectable counterfeiting has nowhere left to live: any spec bug is ruled out by the proof, any software bug exposes itself in the chain history, and what remains are the explicit cryptographic assumptions everyone can see and judge.

That’s exactly what’s happening with Zcash’s new pool: Ironwood. The old Orchard pool is being sealed: funds can exit only through the turnstile—public accounting that stops more ZEC from exiting than entered legitimately—and payments inside the old pool are disabled to cap the circulating supply. As wallets migrate their users’ funds through the turnstile, the process itself gathers confidence that the old bug was never exploited. Meanwhile, engineers augmented by AI are formally verifying the one property that matters most: the system cannot be secretly tricked into creating counterfeit coins.

That’s a narrow claim. It doesn’t rule out all bugs. But it rules out the entire class that can hide, which is the catastrophic failure specific to private money.

The result puts the soundness of encrypted money essentially on par with Bitcoin. In both systems, counterfeiting is possible only if a bug manifests in public history or a stated cryptographic assumption fails. The difference is that Zcash gets there via proof and maintains privacy.

The end result is that AI strengthened Zcash’s security. And my guess is that it won’t be the last piece of critical infrastructure AI does this for.

The uncomfortable transition

The offense wins first.

Attackers need one overlooked path. Defenders need to cover everything. It seems as though AI initially leverages the attacker. The next few years might have more high-profile failures. Exploits that required nation-state resources in the past will be carried out by small teams or individuals. Critical infrastructure is most exposed because it runs old code written when scrutiny was rare.

People will blame AI, but AI isn’t creating these vulnerabilities. It’s merely collecting the debt of a software world that relied on bugs being expensive to find.

But once continuous auditing becomes standard and formal verification goes mainstream, the survivors will be stronger than anything built before.

A case study, not an exception

Zcash matters because the whole story played out in one place, start to finish. A subtle flaw sat in hard cryptography for years until AI amplified the researcher who found it. He disclosed it, the developers patched it, and a new pool was designed to trap whatever uncertainty the old one left behind. Now AI is helping prove, in mathematics, that a machine can check that this kind of failure has no way back in.

There is nothing special about Zcash that confines this story to Zcash. Other blockchains will go through it, and so will banks, browsers, identity systems, medical devices, and the software running physical infrastructure—anything whose failure is expensive enough to attract a serious search. Some institutions will respond by hoping the scrutiny passes them over. The ones that come out stronger will do what Zcash did instead, treating each failure as an error to be corrected: first, a test so it can’t silently return; then, a specification of what should have been true; and finally, where it matters enough, a proof.

All of software security has quietly depended on attackers having limited time and limited intelligence. AI is taking both limits away, and the early years of that will be genuinely frightening—systems that looked solid will fail, and bugs that hid for a decade will fall in an afternoon. But the same capability that runs the attacks can run them for the defenders, before launch instead of after, continuously instead of once. When that becomes normal, the security of critical systems will rest less on promises from institutions and more on arguments that anyone, or any machine, can check.

AI is the hacker today and the guardian tomorrow. For Zcash, tomorrow came early.

First published on X.


Ready to own some ZEC?

How to buy ZEC

Acquiring ZEC involves financial risk, including possible loss of all value.

How to buy ZEC