A zero-knowledge proof lets you show one fact about yourself and nothing else. You can prove you’re over 18 without giving out your birthday, or that your income is above some line without sending anyone a pile of bank statements. The math isn’t new (the first papers came out in the 1980s). Hardly anyone uses it day to day, though, and I think a big part of the reason is boring: the proofs are too heavy for the phones most people actually have.
Outside a few rich markets, a lot of those phones are cheap Androids with 3 or 4 GB of memory, on mobile data that cuts out. Our own first attempt needed a huge download and half a gigabyte of memory before it could prove anything. On phones like that, it would only ever have protected the people who could afford a better phone.
We build zktls. It lets you prove things about websites you’re signed in to, and the site’s reply never leaves your phone. On a budget Android phone, the proof took 611 ms after the capture and used 117 MB of memory. It uploaded 246 KB.
Below is what the phone proves and why we ended up with a less famous kind of proof, called VOLE, instead of a SNARK. Most of the speed came from a few fairly plain changes, which I’ll get to.
What the phone has to prove
When you sign in to a site through zktls, your phone talks to the site over its own connection. Two secure enclaves sit in the middle and split the work of running it. (An enclave is a sealed machine in the cloud. We can’t see inside it either, and the hardware can prove that.) One holds the encryption keys and the other checks the encrypted reply, so neither of them ever gets to read what the site sent.
When the reply comes back, each enclave signs a fingerprint of what it saw. Then the phone reads the reply and proves three things about it without showing it to anyone. The reply it read is the same one both enclaves signed. The data the check cares about is where the check expects it. And that data passes, whether the rule is a status that has to say “active” or a number that has to be over some threshold.
A third enclave, the verifier, checks the proof. If it holds up, the verifier signs a short statement saying so, and anyone can check that signature.
Why we stopped using a SNARK
We started where most people start, with a SNARK. On an iPhone 14 Pro Max a proof took about 5 seconds, which we could have lived with. The setup was the problem. Before the first proof, the phone had to download 268 MB of data, which took 47 seconds, and then hold more than half a gigabyte in memory. You can get away with that on a flagship. On a 3 GB Android it was never going to work.
What a SNARK buys you is a tiny proof that anyone in the world can check on their own. We didn’t need that. Our verifier already checks every proof and signs the result, and everyone else relies on the signature. Dropping that requirement let us use a lighter kind of proof built on something called VOLE, which needs no big setup download and not much memory.
Then we went through the open-source VOLE libraries we could find. One crashed the entire app whenever the network dropped, which on mobile data means all the time. Others made proofs anywhere from 1 MB to more than 100 MB. We built on the one that kept proofs small and failed without taking the app down with it.
How a VOLE proof works, roughly
Before the proof starts, the phone and the verifier build up a big pile of shared random numbers. Each number is split in two: the phone holds one half, the verifier holds the other. The verifier also has one secret value that it never shares with anyone.
To lock in a piece of data, the phone sends one bit per value. The verifier learns nothing from those bits, and the phone can’t go back and change them later without getting caught. Simple steps in the computation cost nothing at all. The harder ones get checked together at the very end, and the phone’s answer to that check is 64 bytes. That’s the whole proof.
The catch is that only this one verifier can be convinced, since only it knows the secret. So it runs inside an enclave and signs the result for everyone else.
The expensive part is building the pile of random numbers in the first place, and it has nothing to do with the user’s data. Keep that in mind for later.

Where the time goes
Nearly all of the work in a proof goes into checking fingerprints, meaning confirming that the reply the phone is reading is exactly the reply the enclaves signed. Reading the reply and running the check’s rules barely shows up.
That’s why each check names only the parts of a page it needs, and the proof covers only those parts. Prove a whole long page instead of one section and you’re doing more than ten times the work.
There is a faster fingerprint function that would cut the work by about six times. We’ve built it, and it’s sitting there unused. Its security doesn’t have the track record of the one we use now, and I’d rather have an independent review before we bet anyone’s privacy on it.
Getting it onto a cheap phone
The change that helped most was also the simplest. Since the expensive setup doesn’t depend on the user’s data, there’s no reason to wait for the data. The phone starts the setup as soon as the user starts signing in, and by the time the website replies, the only thing left is the final proof.

On the budget phone, that took the wait after the page arrives from about 2 seconds down to 0.6. It does cost some download, about 0.5 MB instead of 0.25 MB, because the setup has to be big enough for the largest reply the site could send rather than the one it actually sends.
We also tuned one step of the setup, and the upload went from 395 KB to 246 KB. We couldn’t measure any slowdown from it.
Modern phone chips have a built-in instruction that does a lot of the math we need. Switching to it took one large proof on an iPhone from 832 ms to 393 ms, so a little better than twice as fast.
And because mobile connections drop constantly, the verifier keeps a proof session open for a minute. If the phone loses signal, it reconnects and carries on where it was instead of starting over.
Every phone we have measured
We’ve been running the proof system on real phones since September, from the first prototype all the way to production. This is every run we recorded.

The first VOLE proof on an iPhone took 386 ms. The SNARK, for comparison, took about 5 seconds and wanted 268 MB downloaded first. Using the phone’s crypto hardware cut proof times roughly in half, and starting the setup during sign-in got the wait after the page arrives well under a second.
For production we held ourselves to a budget for a low-end phone: under 15 seconds end to end, under 1.5 GB of memory, under 400 KB uploaded. Every phone came in well below it. The budget phone took 3.6 seconds from start to finish and used 117 MB.
Limitations
The big one is that only our verifier can check a proof directly. Everyone else is trusting its signature. We run it in an enclave and publish its key for exactly that reason, but it’s still a trade-off and I don’t want to pretend otherwise. Proofs that anyone can check on their own are still too big for us; the ones we tried came out over a megabyte.
The phone has to be online during the proof, because it and the verifier talk back and forth the whole time.
Proving more of a page means uploading more. Covering three sections of a page instead of one gets you close to 1 MB.
And nobody outside the team has audited the proof system yet.
What we’re working on
Upload is the number I most want to bring down. One of our enclaves could hand the phone its share of the setup directly, and we estimate that would get the upload to around 52 KB. It does change which parties would have to collude to read someone’s data, though, so it waits until an auditor has looked at it. The six-times-cheaper fingerprint function is waiting on a review too.
One smaller thing we’ve just added: a proof can now reveal exactly the values a check needs, and nothing else from the page.
I don’t think privacy should depend on which phone you could afford. If you’re working on zero knowledge for ordinary devices, I’d like to compare notes, so reply to this post or leave a comment.
Further reading
The papers we built on:
- Weng, Yang, Katz, Wang. Wolverine: Fast, Scalable, and Communication-Efficient Zero-Knowledge Proofs for Boolean and Arithmetic Circuits. IEEE S&P 2021.
- Yang, Sarkar, Weng, Wang. QuickSilver: Efficient and Affordable Zero-Knowledge Proofs for Circuits and Polynomials over Any Field. CCS 2021.
- Yang, Weng, Lan, Zhang, Wang. Ferret: Fast Extension for Correlated OT with Small Communication. CCS 2020.
- Roy. SoftSpokenOT: Quieter OT Extension from Small-Field Silent VOLE in the Minicrypt Model. CRYPTO 2022.
Originally published at jamescr3dentials.substack.com.