Can You Prove That You Know Something Without Revealing What It Is?

Table of Contents (click to expand)

With zero-knowledge proof, you can convince someone that you know something without revealing any additional information about it.

Do you remember the scene from Friends where Joey and Rachel both knew about Monica and Chandler’s affair, but both were afraid to say it out loud because they weren’t sure if the other person knew?

Rachel’s solution was to announce to Joey she was going over to the apartment where she knew Monica and Chandler were right at that moment. If Joey also knew, then his reaction to her statement would make it obvious.

With that move, she reveals to Joey that she knows about Monica and Chandler, and Joey reveals the same thing to Rachel, without either of them saying an explicit word about it.

This is a crude example of a much bigger concept called zero-knowledge proof—a way to prove to someone that you possess a piece of information, without revealing what that information is.


What Is Zero-Knowledge Proof?

How do you convince someone that you know something, without telling them what that ‘something’ is?

If you want to prove that you possess something to someone else, you can simply show the item to them. Or you can describe it. That’s easy… but we don’t do easy here.

In a zero-knowledge proof transaction, there is a ‘prover’ (P) and a ‘verifier’ (V). P has a piece of information, which we can call by a shorthand A. P needs to prove that P has A with them. V should be able to verify that P has A.

However, in this entire process of proof and verification, no single bit of information about A should be transferred from P to V. At the end of the process, V gains no additional knowledge about A at all.

The only thing V knows would be that P has A.

Hence the name zero-knowledge – the proof involves zero knowledge transfer.

I KNOW THEY KNOW BUT I DON'T KNOW WHAT THEY KNOW meme 

Also Read: How Does Science Help Solve Crimes? The Real Life Science Of Crime Scene Investigation And Forensics

Conceptual Examples Of Zero-Knowledge Proof

This all might sound like magic, but it isn’t. To better understand how all of it works, let’s look at two examples to illustrate this concept.

Ali Baba Cave

There is a cave with one entrance and two passageways. The two passageways—A and B—end at dead ends, but they are connected by a secret door that only opens if you say a secret word. Much like ‘Open Sesame.’

You, as the prover, know where the door is and the word that opens it. You want to prove to another person, the verifier, that you know how to open the secret door. But you don’t want to tell them where it is, or what the magic word is.

So you go into the cave, without letting the verifier see if you went in through A or B. Then the verifier comes and stands at the threshold and yells, “Come out through B!”

If you went in through B, you’ll simply come out the same way. But if you are in A, only if you know how to open the secret door can you go through it and come out at B.

Zero-knowledge cryptography
The Ali Baba Cave. (Photo Credit : Wikimedia Commons)

Now, you might’ve just gotten lucky. So we repeat the experiment forty times. You go in one way and come out the way that the verifier tells you to. The laws of probability say that you only have a 50% chance of getting it right by chance. If you come out the right way all forty times, that is pretty convincing.

A Red Ball And A Green Ball

You have two balls, one red and one green, but otherwise identical. With you is a friend who is color-blind. To them, both balls look the same and could very well be the same color.

your colorblind friend meme 

You need to convince them that both balls are different colors, without revealing to them which ball is red and which is green.

So how do you do it? You place the red ball in your friend’s right hand and the green ball in their left and ask them to hold both balls behind their back. Without you seeing, they can switch hands or let the balls stay as they are. They then bring the balls back out and ask you if they switched hands or not.

If you see that the red ball is still in their right hand and the green is still in their left, you can say that they didn’t switch hands. If it’s the other way, then they did.

So, in order for you to give the correct answer, the balls must be of different colors.

We do this over and over again to rule out the possibility that you might simply be guessing. At the end of the experiment, your color-blind friend must be convinced that the balls are different colors. Still, they walk away with no additional knowledge about the individual balls. Both balls still look identical to them and they still can’t tell them apart. Pretty cool, right?

Also Read: Münchhausen Trilemma: Is It Possible To Prove Any Truth?

Characteristics Of A Zero-Knowledge Proof

Let’s distill that into what makes up a zero-knowledge proof. For a proof to be called a zero-knowledge proof, it needs to tick three boxes on a checklist.

Completeness

This refers to the ability of the prover to completely convince the verifier of something. At the end of the experiment with the red and green balls, your friend is completely confident that you know the balls are different colors. Keep in mind also that we are taking for granted that the parties involved are ‘honest’. This means that they are following the correct protocol of the experiment.

Soundness

This is a kind of foolproof-ness. In the case of the Ali Baba cave, if you did not know how to open the door, would you be able to trick the verifier into believing you could? In the method of verification that we described, the probability of that being possible is so tiny as to be disregarded, if the protocol is maintained.

The chances of a cheating prover being able to convince an honest verifier should be very small.

Zero-knowledge

Last but certainly not least, there is zero knowledge transfer. Take what you’re trying to prove as a true or false statement. You know the balls are different colors. You know how to open the secret door. You’re trying to prove that these statements are true. At the end of the proof, the only piece of knowledge the verifier should have is that these statements are true.

Nothing else. They don’t know the color of the balls, they don’t know the location of the secret door, and they don’t know the secret word that opens it.

There is no exchange of knowledge—only of a knowledge about knowledge.

A,Man,Holds,A,Red,Check,Mark,Over,Word,True.
The verifier walks away with no additional knowledge. They are simply verifying that it is true that the prover possesses a particular piece of knowledge. (Photo Credit : Andrii Yalanskyi/Shutterstock)

The verifier also cannot transfer this true/false proof to anyone else. The prover is only convincing the verifier. In both examples we talked about, the proof becomes useless if the switching of the balls or the choice of path is not completely random. Anyone watching could put forth an accusation that it was not random, and that you both were in cahoots to stage the entire thing.

Even if the verifier recorded and distributed the entire proof, the video could be edited as far as a random viewer is concerned.

So you, as the prover, have the power over who you want to share even your ‘knowledge of knowledge’ with. An eavesdropper will not be able to get even that from your proof performance.

Why Do We Need Zero-Knowledge Proofs?

Zero-knowledge proofs find a lot of applications in cryptography, which is basically the study of how to keep things secret. Zero-knowledge proof has the potential to unravel security and privacy concerns.

A lot of our world runs on trust. When we take out a loan, the bank trusts that we will pay it back. Why? Because the bank has access to our credit score and other personal details. Here, and in most other transactions, trust is driven by data. However, data is a valuable currency in our world, and all of us want to minimize the amount of personal data that we put out.

With a  zero-knowledge proof, it becomes possible to establish trust without the exchange of data. You can provide only what is absolutely required. We don’t need to provide any data to support our claim.

Let’s look at some particular uses.

Authentication

To access a website, we need to enter our username and password. Even if the site doesn’t store your password, it isn’t really that secure. What if we put a zero-knowledge proof into this equation? We could make it so that you can authenticate yourself without giving away personal info. You can prove to the website that you have the authority to access this particular account, without needing to give away anything else.

Login,And,Password,,Cyber,Security,Concept,,Data,Protection,And,Secured
Why give away your personal data every time you want access? (Photo Credit : Song_about_summer/Shutterstock)

Thus, zero-knowledge finds use in authentication—helping you prove that you’re you without telling anyone who you are.

Blockchain

Blockchain is a revolutionary technology, but it does suffer sometimes in ensuring the privacy of its transactions. Incorporating zero-knowledge proof would go a long way in making sure transactions are legitimate, without going into the details. It wouldn’t need the details of the sender or the receiver, or anything else involved, to perform that verification.

Age Authentication

Several websites and services require a user to be over 18. However, to prove that, you might need to provide some proof of identity, which also includes other personal details. For instance, if you want to buy alcohol at a shop, you have to prove that you are 21. For this, you might show the shop personnel your driver’s license, but that ID also has your name and other personal details. This is not info that you need to, or want to, give away to just anyone.

Us,Driver,License,Isolated,On,White,Background.
Do you want to be giving away your name and address just to prove that you’re legally old enough for something? (Photo Credit : Mega Pixel/Shutterstock)

With technology backed by zero-knowledge proofs, you could prove that you are over a certain age without revealing anything else about yourself—not even your exact age.

E-voting

Wouldn’t it be great to completely ensure anonymity in voting systems all over the world? Electronic voting systems supported by zero-knowledge proof is an area quite worth looking into. No one will know who voted for who, while voters will also get a verifiable assurance that their vote has been counted. Zero-knowledge proofs also find a similar use in e-auctions.

Trust Without Data

Knowingly or unknowingly, we interact with many strangers during the course of a day. Our worlds are too big and interconnected today to avoid that. We are asked to trust too many websites and services. We are asked to prove our trustworthiness to strangers by giving them data about ourselves, but none of us want more of our personal information out in the world than is absolutely necessary.

With zero-knowledge proofs, trust can be established between such strangers, while giving away minimal unnecessary data. Transactions can be made without the exchange of personal information. You prove your authority without giving away who you are!

How well do you understand the article above!

Can you answer a few questions based on the article you just read?

References (click to expand)
  1. (PDF) Overview andApplications of Zero Knowledge Proof (ZKP). ResearchGate
  2. Goldreich, O., & Oren, Y. (1994, December). Definitions and properties of zero-knowledge proof systems. Journal of Cryptology. Springer Science and Business Media LLC.
  3. Morais, E., Koens, T., van Wijk, C., & Koren, A. (2019, July 31). A survey on zero knowledge range proofs and applications. SN Applied Sciences. Springer Science and Business Media LLC.
  4. Quisquater, J.-J., Quisquater, M., Quisquater, M., Quisquater, M., Guillou, L., Guillou, M. A., … Guillou, S. (n.d.). How to Explain Zero-Knowledge Protocols to Your Children. Advances in Cryptology — CRYPTO’ 89 Proceedings. Springer New York.
Help us make this article better
About the Author

Kavya has a Bachelors degree in Mechanical Engineering from APJ Abdul Kalam Technological University, Kerala, India. She loves to read and draw in her spare time. A firm believer that a jack of all trades is better than a master of one. She wants to explore the world, learn new things, and write about them.

.