What is Zero-Knowledge Proof?

A Cryptographic Scheme

Bahuguna
Math Simplified
4 min readFeb 23, 2022

--

https://images.app.goo.gl/FyHKakuHdkVLDwJK7

A zero-knowledge proof is a procedure in which one person (the PROVER) proves something (it may be anything) to another person (the VERIFIER) without revealing any information to the verifier. The verifier will only know that the statement made by the prover is true. He/She (Verifier) will not know anything else about the thing which has been proved.

For example, suppose there is a piggy bank with a lock on it. This lock opens with a 4-digit pin. Now, suppose you are having this piggy bank with you. I come to you and tell you that I know the pin to open the lock of this piggy bank. How do I prove it to you without revealing any information (the pin to open the lock)?

I will tell you to write a quote on a small piece of paper, fold it, and put it in the piggy bank. Then I will take the piggy bank from you, secretly open it by using the pin, read what you have written, and then tell you the same quote. Now, you will be convinced that I know the pin but at the same time, I did not reveal any information about the thing I just proved. In the end, you just know that the statement “I know the pin to open the lock of the piggy bank” is true. I did not tell you the pin or any information which you can use to tell how I opened the piggy bank.

Let me give you another example. Suppose I have two pens, one blue and one red. But you are not able to differentiate them because you are colorblind (just for the sake of example). Even if I tell you that these pens have different colours, you are not ready to believe me. How do I prove it to you without actually telling you that this particular pen is blue and this one is red, and make you realize that you cannot spot the difference because of your colorblindness?

I will tell you to pick up one pen in each hand and take them behind your back. Now, I will give you the choice of swapping them or keeping them as they are. It completely depends upon you, either you swap them behind your back or not. It’s just that I will not be able to see what you did behind your back. Now I will tell you to show your hands.

If I tell you correctly whether you swapped the pens behind your back or not, it means that I can clearly distinguish between two colours. But you can say that you just guessed which is a genuine option here because there is a 50% chance that even if I guessed, the answer will be right. So I tell you to take your hands behind the back and repeat the same process.

If I again tell you correctly whether you swapped the pens or not, you will be a little bit convinced that I can perceive two different colours. But still, there is a 25% chance that I guessed and it was right. If we repeat the activity once again, the chances of me guessing and the answer is correct is 12.5%. So every time we repeat the activity, the probability reduces by half.

Hence, after some n trials, you will be fully convinced that I am not doing the guesswork. Also, I proved to you the fact that I can tell which pen is blue and which is red without revealing any information to you.

These examples will give you a basic idea of how Zero-Knowledge Proof works. But keep in mind that there is a lot more to know about this concept and we have barely scratched the surface today (which should be enough to get your attention and create interest within you).

One interesting fact about Zero-Knowledge Proof you should know is that “every proof has a Zero-Knowledge Proof”. It means that anything which can be proved in an ordinary way (by revealing information about the thing being proved) can be proved without revealing any information i.e., by Zero-Knowledge. Isn’t that something?

In my next articles, I will try to build on this. But for now, I will end this article with

Zero-Knowledge is probably the most useful technology we have got, and we have barely begun to use it. — Matthew Green, Cryptographer, John Hopkins University

--

--