Skip to main content

Intro to Zero-Knowledge Proofs

Updated on
Aug 4, 2023

4 min read

Overview

Privacy has always been regarded as a fundamental right. However, as governments and organizations store user data, it becomes more difficult to keep it private. This guide will discuss a cryptographic protocol, Zero-Knowledge Proofs, and how they can help secure user data. We will also cover the types of Zero-Knowledge Proofs and explore the benefits and use cases it provides.

Prefer a visual explanation? Here's a video explaining Zero-Knowledge Proofs with some analogies.
Subscribe to our YouTube channel for more videos!

What are Zero-Knowledge Proofs?

Zero-Knowledge Proofs, also known as a ZKP, is a type of cryptographic protocol that allows one party (i.e., the prover) to prove to another party (i.e., the verifier) that they know a certain piece of information without revealing what that information is.

With Zero-Knowledge Proofs, three components must be true.

  • Completeness: The prover must prove to the verifier that they possess the knowledge or information in question.
  • Soundness: The verifier must be convinced that the prover possesses the knowledge or information.
  • Zero Knowledge: The proof must not reveal any information about the actual knowledge or information being proven.

How do you prove something without revealing what that information is? Let's go over a common example.

Say that Alice (prover) and Bob (verifier) want to do business together, but Bob wants to know that Alice owns a particular blockchain address. Bob needs to verify that Alice owns a particular address, and Alice must prove that she owns that address. Bob can encrypt a message with Alice's public key, which only Alice can then decrypt with her private key and relay the decrypted message back to Bob. You may think that Alice could guess the private key. However, Bob and Alice can do the test multiple times (each time with a different message), where the probability of guessing the right message every time would be very low (as it is computationally very expensive).

Now, going back to the three components to see if Bob and Alice's setup of proving and verifying can be considered Zero-Knowledge Proof.

  1. Completeness - Since Bob encrypted the message with Alice's public key, only Alice should be able to decrypt the message. If Alice gives the correct message to Bob, it will persuade him that Alice owns that particular blockchain address.
  2. Soundness - Bob should only be persuaded if he receives a correct message. For example, if a 3rd party who could not decrypt Bob's message tried to give him an incorrect message, it would not persuade Bob.
  3. Zero-Knowledge - Alice never exposed her private key to Bob during this transaction. She only proved to Bob that she owned that particular blockchain address by verifying the message sent to that address.

In the next section, we will review the variations of Zero-Knowledge Proofs available today.

Types of Zero-Knowledge Proofs

zk-SNARKs: Also referred to as Zero-Knowledge Succinct Non-Interactive Argument of Knowledge, is a type of zero-knowledge proof designed to be as short and efficient as possible, allowing for scalable and efficient verification. This type of proof is useful when building applications where proof size and speed are important considerations. Additionally, with zk-SNARKs, only the trusted systems can verify the validity of a proof.

zk-STARKs: Also referred to as Zero-Knowledge Scalable Transparent Argument of Knowledge, is another type of Zero-Knowledge Proof considered transparent. This ZKP is useful for systems like blockchains and other public ledgers, with Zcash being one of the first blockchains to implement this technology. With zk-STARKs, anyone can verify the statement's validity without being the verifier; however, note that this ZKP requires a larger proof size (10-100x) than zk-SNARKs. zk-STARKs derive from a combination of mathematical techniques which work together to ensure the integrity of the proof.

Overall, both zk-STARKs and zk-SNARKs are powerful tools for securely verifying the truth of statements without revealing sensitive information. Still, they are best suited for different types of applications depending on the specific requirements and constraints of the system in question.

Note this isn't an extensive list of the types of Zero-Knowledge Proofs but the most popular ones to date.

Advantages of Zero-Knowledge Proofs

Zero-Knowledge Proofs do not require the parties involved to trust each other. Additionally, Zero-Knowledge Proofs are highly secure, as a ZKP relies on the underlying computational assumptions, which are generally considered very difficult to break (even with quantum computers). However, note that zk-SNARKs are vulnerable to quantum computing research, while zk-STARKs are more resistant. To learn more about cryptography and its security today, check out this link.

Limitations and Challenges of Zero-Knowledge Proofs

Although Zero-Knowledge Proofs have the potential to help the way we build systems, some limitations and challenges include the following:

  • Complexity: ZKP protocols can be difficult to set up and require expertise in building Zero-Knowledge systems
  • Limited Applicability: Zero-Knowledge protocols may not be suitable for all situations and may not be able to prove all types of knowledge or information.
  • Compute intensity: Zero-Knowledge protocols can be computationally intensive, requiring significant resources in energy.
  • Vulnerability to quantum computing: Some Zero-Knowledge protocols may be vulnerable to attacks from quantum computers, potentially exploiting the system's security.

Future of Zero-Knowledge Proofs

With the release of many blockchain systems built upon Zero-Knowledge Proofs such as Mina Protocol, Starkware, and Zcash, we should continue to see active development and research of ZKPs in the coming years.

Some areas where zero-knowledge technology could bring significant impact include privacy, data analytics, and blockchain systems. Overall, the potential future of zero-knowledge technology is very exciting, and it has the potential to have a significant impact on a wide range of applications.

Closing Thoughts

That's it! You now know about the basic concepts of Zero-Knowledge Proofs. Tell us your skills on Twitter or Discord. We'd love to know what you're building!

We ❤️ Feedback!

Let us know if you have any feedback or requests for new topics. We'd love to hear from you.

Share this guide