So you want to be able to understand Zero-Knowledge proofs so you can show off to your friends how smart you are? Well, you’re in the right place. You’re going to have this logic problem down in the next five minutes. For those of you who are impatient, here is a TLDR.
TLDR: The main idea of Zero-Knowledge Proof is the ability to confirm the reliability of any data without using passwords, logins, and any information with the risk of its further inception by a third party.
Now for those of you who are willing to give this new exciting information 5 minutes of your time, we are going to be working from a popular example of the proof, but we are going to slightly adapt it.
In this story, there are two participants, the first person is Homer, and the second is his wife Marge. Homer and Marge have discovered the entrance to a cave after a walk in the woods. Homer upon discovering this cave has discovered a magic word that opens up a magic door within this cave. The cave itself is ring shaped, with the entrance on one side of the cave and the magic door on the other. Marge wants to know whether Homer actually knows this supposed magic word, but Homer being himself, does not want to share this magical information with his wife or even reveal the fact of his knowledge to the world in general.
To make things simple, they label the right and left paths from the entrance A and B. Marge then waits outside the cave as Homer goes in. Homer decides which path he wants to take either A or B; Marge is not allowed to see which path he takes. Afterward, Marge enters the cave and shouts the name of the path she wants him to use to return, either A or B, which she chooses at random. Providing Homer does know the magic word, this should be easy. He opens the door, if necessary, and returns along the desired path.
But what if he didn’t know the magic word. Then, he would only be able to return by the named path if Marge were to shout the name of the same path by which he entered. Since Marge is choosing A or B at random, Homer would have a 50% chance of guessing it correctly, but if they repeated this 10 times in a row, his chance of successfully guessing the path his wife shouts goes down to 0.09%.
So if Homer is repeatedly appearing at the exit Marge names, she can then conclude that it is extremely probable that Homer does, in fact, know what the secret word is.
To further it along if Marge chooses A or B based on the flipping of a coin on camera, the protocol loses its zero-knowledge property; the on-camera coin flip would probably be convincing to any person watching the recording later. Thus, although this does not reveal the secret word to Marge, it does make it possible for Marge to convince the world in general that Homer has the knowledge.
So with this example, you now have a basic knowledge of how Zero-Knowledge proofs work and a great example that you can use with friends. This example can be applied to many situations. But for now, we have reached our 5 minutes!
Check out our new platform 👉 https://thecapital.io/
How to understand Zero-Knowledge Proofs in 5 minutes? was originally published in The Capital on Medium, where people are continuing the conversation by highlighting and responding to this story.
Post fetched from this article