Introductory Explanation of Zero Knowledge Proof


One of the biggest advantages of blockchain technology is the degree of information transparency it offers. All transactions can be traced, and the details are visible to anyone on the network, not just the parties involved.

But depending on the domain of application and the mechanics implemented, blockchain can also maintain a high level of privacy. Zero-knowledge proof (ZKP) is one of the ways to verify data input while maintaining anonymity.

This article will provide a high level introductory explanation on what Zero-Knowledge Proof is with a real-world example to help understand How it works.

What is Zero-Knowledge Proof

Zero-knowledge proof is a mathematical model that is applied to verify information without sharing or exposing it. It is a probabilistic assessment: two parties validate the data using indirect signs and a set of queries. That’s why the result may not provide the level of complete certainty that revealing the information would but it proves that the data is overwhelmingly probable.

Advantages Zero-Knowledge Proofs Offer

  • A ZKP oddly simplifies the process of information exchange and verification. Since no party receives the underlying data, there is no need for complicated encryption methods. That, in turn, shortens the transactions on blockchains and solves the issue of information storage.
  • A zero-knowledge proof method also improves security. The less information a company knows, the lower the likelihood is that it will be stolen if the platform is exploited.

Disadvantages of Zero-Knowledge Proofs

  • The biggest shortcoming of the ZKP method is the amount of computing capacity it requires to validate the information. The verification process is lengthy and can’t be easily scaled.
  • The algorithm is in an early stage of adoption. There’s no common standard for interacting with the apps and platforms that have adopted the ZKP model, which further limits its number of use cases.

How Zero-Knowledge Proof Works

Proving the Existence of Differently Colored Balls through Interactive Zero-Knowledge Proofs

Lt’s dive into a scenario between two friends, Peggy and Victor. Victor wants to prove to Peggy that he holds two balls of different colors, but Peggy is colorblind. To us, it may seem impossible to prove this to Peggy, but to Victor, it can be done. This scenario is similar to how ZKPs work in reality: through an interactive series of events between the prover and verifier, which increases the probability of the outcome of the proof. This is known as interactive ZKP, which will be discussed further in future articles. There is also non-interactive ZKP, which is more computational. In this type of ZKP, the prover only needs to prove to the verifier once that a statement is accurate.

Today’s topic is about Peggy wanting to prove to the color-blind Victor that he has two balls of different colors. He will do this through an interactive series of events known as Interactive ZKP. Let’s take a closer look.

On a sunny Sunday, Peggy and Victor went out for some fun. They played table tennis with two balls, a white one and a red one. However, because Victor is colorblind, he can only see the two balls as white. Peggy kept winning even when they used both the white and red ball, but Victor became angry, thinking the white ball was faulty. He asked Peggy to change the ball. Peggy explained to him that there were a white and red ball, and that at least one of them wouldn’t be faulty. Victor didn’t believe him, so Peggy had to show him that the two balls were different colors.

Peggy’s task is to prove to Victor (the verifier) that the two balls are different colors and nothing else. He will not reveal which one is white and which one is red.

Here’s how the proof works:

  1. Peggy gives the two balls to Victor.
  2. Victor places them behind his back, brings one out, and displays it, then places it back and randomly reveals one of the two balls.
  3. Victor asks Peggy if he has switched the ball.

Peggy will use his ability to see the difference in color to correctly guess whether or not Victor switched the balls with a higher than 50% probability; this means that if the two balls were the same color and indistinguishable, Peggy would only be able to guess correctly 50% of the time by chance alone. However, since Peggy can see the difference in color, his chances of guessing correctly are higher than 50%.

This is a way to prove that the balls are differently colored without revealing which one is white and which one is red. By repeatedly doing this process, the probability of guessing correctly by chance decreases while the probability of guessing correctly based on the color difference increases. This will convince Victor that the balls are differently colored even though he can’t see the color difference.

The above is a Zero-Knowledge proof because it exhibits the following three properties of ZKP:

  1. Completeness: if this process is repeated to Victor multiple times, he becomes convinced.

  2. Soundness: there’s a 0% chance that Peggy guessed correctly at all times by chance alone.

  3. Zero-Knowledge: Victor gains no knowledge of which ball is white or red.

In Conclusion, ZKPs allow for a verifier to be convinced of a statement’s accuracy without revealing any additional information, and interactive ZKPs, such as the scenario between Peggy and Victor, demonstrate this concept in a real-world example. This scenario shows how Peggy was able to prove to Victor that he had two differently colored balls without revealing which one was white and which one was red, using an interactive series of events, increasing the probability of the outcome of the proof.


Data privacy and security are important subjects, and the zero-knowledge proof method has much to offer the discussion. To see a greater number of use cases and general adoption of this verification process, we first need to resolve the problem of scalability. The blockchain industry is already struggling with network congestion. Prolonging the verification process on the blockchain would only aggravate the problem.