What are Zero Knowledge Proofs and why do they matter?

Yu Jiang Tham
5 min readJan 6, 2023

Introduction

This article is meant to be an overview and will skim over a large number of technical details so that the reader can get a better understanding of Zero Knowledge Proofs and how they fit in the blockchain landscape.

Zero Knowledge Proofs (ZKPs) are a large and ever-expanding class of proofs that allow a computer program (prover) to construct a proof that a computation has been done correctly. With that proof, any other computer running software that can read the proof (verifier) can check that this computation was done without needing to know all of the inputs of the computation and without needing to re-do the entire computation. This is a lot to ingest, so we’ll break down what all of this means further down.

Although they’ve been around since the mid-80’s, it wasn’t until the past few years that the field of Zero Knowledge Cryptography has really started to pick up steam due to finding product-market fit in blockchains. To see why, we have to take a small detour to understand what a modern blockchain does.

Replicated State Machines

A blockchain can be thought of as a replicated state machine across a number of nodes. A state machine is a computer science abstraction that allows a system to be thought of as a set of valid states, with valid inputs transitioning the system to a another set of valid states.

To gain a better intuition of how this applies to blockchains, let’s go through a quick example on the Ethereum blockchain. If you have 1 ETH and your drinking buddy Jimmy has 2 ETH at the beginning of the night, this is the starting state of the system. At the end of the night, you send 0.1 ETH to Jimmy since he bought a few rounds and you didn’t have your credit card with you (the input in this case is the 0.1 ETH transaction from you to Jimmy). Since this was a valid transaction, the new state of the system is that you have 0.9 ETH (minus gas fees), and Jimmy has 2.1 ETH. Now, scale this up a bunch and you have a blockchain. Kind of.

Sending ETH to Jimmy

The other part is that the state machine is replicated across some number of computers (called nodes). The network of nodes must come to agreement on the state of the system via a process called consensus. There are numerous ways that the network can achieve consensus, which is beyond the scope of this article, but two examples are the Bitcoin network, which uses proof-of-work, and the Ethereum network, which uses proof-of-stake.

In order for the state of the system to be replicated across all of the nodes, every node must replay each transaction to validate that the transaction leads to a valid state. For a large number of transactions in a large replicated system, this requires ever-increasing storage and compute requirements. The current requirements for running a full Ethereum node are not insignificant, and are as follows:

  • A fast CPU with 4+ cores
  • 16 GB+ of RAM
  • A fast SSD drive with at least 1 TB of space (storage capacity will grow over time)
  • 25 MBit/s bandwidth

Zero Knowledge Proofs and Blockchains

Zero Knowledge Proofs have gotten so much hype in the crypto world in the past few years because they really are a perfect fit for blockchains. Due to how they are constructed, ZKPs can be used to do two things that blockchains builders have desired for a long time:

  1. Private Data
  2. Verifiable Computing

Private Data

Because of the way ZKPs are constructed, a blockchain can advance the state of its system by receiving inputs that do not need to be revealed to anyone viewing or validating the chain. Data about an account or transaction can be trustlessly verified without the counterparty knowing anything about the actual content of the data.

One example that is thrown around a lot is that it’s like being able to prove that you are over the legal drinking age without having to show the bouncer at a bar your ID (which contains a lot of information other than your age).

This bouncer wants to read everything on your ID

The private data property of Zero Knowledge Proofs also allows for private transactions, which makes blockchains act more like current payment rails in which you’re not showing every transaction you make to the whole world.

Institutions also require private transactions for compliance purposes, so this may open up the crypto world to a whole new class of participants who were previously unable to utilize blockchains.

Verifiable Computing

Due to the fact that Zero Knowledge Proofs tend to imply privacy in their name, this subject gets less attention, but it is as — if not more — important than the ability for private transactions.

Verifiable Computing (VC) refers to the ability for a computation to be run on a different (usually significantly more powerful) computer and have the output be easily verifiable that it’s been done correctly. In this case, a computation could refer to one million blockchain transactions in a short period of time.

Because of the replicated state machine property of current blockchains that we discussed earlier, having each node in the network replay each of the one million transactions to verify that they are valid within the required timeframe would mean that the requirements for running a full node would be significantly higher, leading to less decentralization in the network.

Instead, with ZKPs, there could be a few extremely powerful computers in the network that process transactions, build blocks, and create proofs that all of these computations were done correctly. Then, the rest of the nodes in the network can quickly and easily verify that the computation was done correctly without having to replay all of the transactions.

The benefit of this is that the verification cost could be low enough that mobile phones could be verification nodes in the blockchain.

A mobile phone verifying the blockchain (in the background)

Conclusion

Hopefully this helps you understand why Zero Knowledge Proofs are so powerful and why they’ve been getting increasing amounts of attention. There’s a huge amount of very complex math behind why these proofs work, and I’ll be touching on some of this in future articles. For now, if you found this helpful, share it with a friend!

--

--