What are Zero-Knowledge Proofs?

Written By
Erik
First Published
October 19, 2022
Last Updated
April 19, 2023
Estimated Reading Time
4 minutes
Zero-Knowledge Proofs
In this article...

A zero-knowledge proof is a way of proving to someone that you have certain data without revealing the data itself. When I unlock my phone, you can safely conclude I know the password, without me having to show you the actual password. Zero-knowledge proofs in crypto are important for two reasons: privacy and data compression.

It’s a remarkable and relatively novel type of tool in the cryptography toolbox, these zero-knowledge proofs (ZKP’s). Imagine that I can prove that I am the legitimate owner of a valid passport, without actually showing my passport to the clerk at customs, or to the car rental agency. Similarly, zero-knowledge proof technology enables cryptographic algorithms for verifying claims regarding the possession of data without having to reveal the data.

what are zero-knowledge proofs

Zero-knowledge proofs are not only used in blockchain technology but in a wide array of digital domains. Although in the works since the 80s, ZKP use cases are only now slowly being rolled out in finance and government services.

Cooking Recipes and Payment Balances

To explain the idea behind ZKP, let’s take an example from a completely different domain: cooking. Suppose I want to prove to my mother that I know her secret recipe for apple pie. She asks me to come up with proof, but without showing her the entire recipe. After I reveal step 7: ‘add 3.5 teaspoons of Strohrum’ and then step 11 ‘Lower oven temperature from 225 degrees to 200’, she can be reasonably confident I indeed know the recipe. Note that she can’t conclude this with 100% certainty: it’s probabilistic. For practical purposes, this is often enough.

Of course, cooking recipes are not the most likely domain where ZKP’s will be implemented. But consider more realistic domains of public life where I want to prove I am allowed to legally buy beer without wanting to reveal my exact age. Or me wanting to prove I have sufficient income without having to reveal my exact income… Now we are getting closer to crypto payment systems. For obvious reasons, the receiver of my transaction needs to know if I have sufficient funds. And for my part, I would rather keep it at that minimum requirement and not disclose my balance!

Zero-Knowledge Proofs in Privacy Coins and Mixers

At the time Satoshi was working on Bitcoin, zero-knowledge proof technology (ZK-tech) wasn’t advanced enough to incorporate it in the Bitcoin protocol. Some five years later, ZK-tech was mature enough to be used. Privacy coin Zcash jumped on the opportunity. It is based on the bitcoin protocol, with the important addition of privacy-preserving transaction data using zero-knowledge proofs. Zk-rollups (see below)  are used to restrict third-party access to recipient and sender information.

zcash

Zcash was the first project to implement zk-SNARKs, a novel form of zero-knowledge cryptography (see below). Zero-knowledge proofs in the case of Zcash mean that the protocol can know that you have enough funds to make a transaction without actually gaining access to the exact amount.

Zero-knowledge proofs in Tornado Cash

Tornado Cash is a (currently sanctioned) coin mixer for (mosty) Ethereum. Depositing your ETH in the smart contract, you have to provide a so-called commitment. Withdrawing your ETH on the other side, you have to provide a “nullifier” and a zero-knowledge proof. The nullifier is a unique ID. Taken together with the commitment and the ZKP, it proves the connection between deposit and withdrawal. But nobody except you knows which nullifier is assigned to which commitment.

tornado cash

What are ZK-Snarks?

As mentioned, ZCash uses ZK-snarks. That is an acronym that stands for “Zero-Knowledge Succinct Non-Interactive Argument of Knowledge.”

  • Zero-Knowledge: No need to see all the transaction data
  • Succinct: Short
  • Non-interactive: No need to deal with the people who verify the validity. A non-interactive zero-knowledge proof, the prover creates a proof that anyone can verify, also at a later stage.
  • Argument of Knowledge: The proof that is provided that the transactions are good

This means that in the case of Zcash, ZK-snarks can be verified nearly instantly, and the protocol does not require any interaction between the prover and the verifier.

Application of Zk-snarks in Rollups

ZK-snarks are also applied in rollups: the bundling of transactions that help Ethereum save data storage and hence scale. How do they work? A ZK-snark rollup runs a computation off-chain and then submits that computation as what is called a validity proof to the layer-1 blockchain. A validity proof means someone went through all the transactions in a rollup, did some work and found out that they were not fraudulent. They then submit their list transactions and their proof to layer-1, for example Ethereum. In summary, Ethereum has offloaded some of its work to the rollup mechanism. 

Zero-Knowledge Proofs in Trustless Authentication

Online authentication is a mess. Every year, millions of usernames and passwords are compromised. Whenever you log to apps using a password or your handle at Facebook or Google, you rely on a central authority to not misuse or leak your password. And let’s be honest, most of us are guilty of reusing the same password.

With ZKP technology, no central authority requires you to trust them with your password. Instead, ZKP’s can be used to cryptographically derive from someone’s password a set of public tokens. It’s not possible to tell the original password only knowing these tokens, but they can be used to prove the knowledge of the password – and thus prove your identity. These public tokens are stored on the blockchain so it won’t be possible to mess around with them. 

Services like NuID (‘New ID’) are already implementing these techniques.

Dapps Using Zero-Knowledge Proofs

What will the future look like? Assume that in a decade or so, many everyday services run on-chain as decentralized applications. In such a world, zero-knowledge proofs can be used whenever such a service asks you for a certain combination of information that can be verified on-chain, without being complete enough to reveal too much about you. For example: when you sign up for a rental car, you, the user (prover), apply a ZKP to prove to the rental agency (the verifier) that you are indeed at least 18 years old – without sharing your passport. Instead, you might share a QR code or a public address that hosts unique key information like your birth year.

Will Governments Allow it?

It remains to be seen if privacy coins using zero-knowledge technology will be sanctioned, which would create a much higher threshold to use them. On the other hand, institutional interest to use privacy tech would pull at regulators from the other direction. There are reasons to believe institutions would welcome privacy tech using ZK-tech. Like individuals, financial institutions don’t want transparency of transaction histories. In fact, governments are already using ZKP-tech.

Erik started as a freelance writer around the time Satoshi was brewing on the whitepaper.
As a crypto investor, he is class of 2020. More of a holder than a trader, but never shy to experiment with new protocols.

Discussion on "What are Zero-Knowledge Proofs?"
You must Subscribe or Login to post a comment.
Additional Resources
Subscribe Today!
Join Thousands Getting Free Insights

Join 190,000+ Investors Getting Free Insights

Privacy Policy

Who we are

Our website address is: https://larkdavis.org.

Comments

When visitors leave comments on the site we collect the data shown in the comments form, and also the visitor’s IP address and browser user agent string to help spam detection.

An anonymized string created from your email address (also called a hash) may be provided to the Gravatar service to see if you are using it. The Gravatar service privacy policy is available here: https://automattic.com/privacy/. After approval of your comment, your profile picture is visible to the public in the context of your comment.

Media

If you upload images to the website, you should avoid uploading images with embedded location data (EXIF GPS) included. Visitors to the website can download and extract any location data from images on the website.

Cookies

If you leave a comment on our site you may opt-in to saving your name, email address and website in cookies. These are for your convenience so that you do not have to fill in your details again when you leave another comment. These cookies will last for one year.

If you visit our login page, we will set a temporary cookie to determine if your browser accepts cookies. This cookie contains no personal data and is discarded when you close your browser.

When you log in, we will also set up several cookies to save your login information and your screen display choices. Login cookies last for two days, and screen options cookies last for a year. If you select “Remember Me”, your login will persist for two weeks. If you log out of your account, the login cookies will be removed.

If you edit or publish an article, an additional cookie will be saved in your browser. This cookie includes no personal data and simply indicates the post ID of the article you just edited. It expires after 1 day.

Embedded content from other websites

Articles on this site may include embedded content (e.g. videos, images, articles, etc.). Embedded content from other websites behaves in the exact same way as if the visitor has visited the other website.

These websites may collect data about you, use cookies, embed additional third-party tracking, and monitor your interaction with that embedded content, including tracking your interaction with the embedded content if you have an account and are logged in to that website.

Who we share your data with

If you request a password reset, your IP address will be included in the reset email.

How long we retain your data

If you leave a comment, the comment and its metadata are retained indefinitely. This is so we can recognize and approve any follow-up comments automatically instead of holding them in a moderation queue.

For users that register on our website (if any), we also store the personal information they provide in their user profile. All users can see, edit, or delete their personal information at any time (except they cannot change their username). Website administrators can also see and edit that information.

What rights you have over your data

If you have an account on this site, or have left comments, you can request to receive an exported file of the personal data we hold about you, including any data you have provided to us. You can also request that we erase any personal data we hold about you. This does not include any data we are obliged to keep for administrative, legal, or security purposes.

Where we send your data

Visitor comments may be checked through an automated spam detection service.

Boom! You're on the shortlist.

You just took the first step toward getting your project in front of one of the most engaged communities in crypto.
We're already diving into your details to see how we can best showcase your vision to our audience. You should hear from us within 2 business days to discuss strategy, availability, and next steps.
Let's build something legendary.

Join 190,000+ Investors Getting Free Insights