Zero-knowledge proof or zero-knowledge protocol is a technique/method where you prove to someone that you know something without revealing to them what you actually know. If that sounds a bit non-sensical, let me clarify.
Let us say that you know a secret about something. You wish to convince your friend that you know this secret without actually revealing the secret to them. How would you do this? This is where the business of zero-knowledge proofs comes in handy. It turns out that this concept finds very useful applications in the field of cryptography (including cryptocurrencies).
In this essay, I will be covering the intuition behind the notion of zero-knowledge proofs using a couple of illustrated examples. Following this, I will proceed to cover the formal requirements for establishing zero-knowledge proofs. At the end of this essay, you should ideally have an intuitive understanding of the concept as well as the formal requirements for implementing it. Let us begin.
Suppose that you know the combination to a state-of-the-art safe. This particular safe secures its contents using three different locking technologies. So, it is quite something to have access to.
Illustration created by the author
You now wish to prove to your friend that you know the safe’s combination without actually revealing the combination to her. Your method to do so is quite simple. You first ask your friend to write something down on a piece of paper and fold it without revealing the text to you.
Then, you ask your friend to place the folded piece of paper into the open safe (which features a jumbled combination when the door is open). Following this, you ask your friend to shut the safe close. At this point, both of you verify that the safe is locked and cannot be opened by force.
Now, you turn the safe to your point of view such that your friend cannot see you entering the combination. You enter the combination, open the safe, unfold the piece of paper, and read the text. Once you have noted the text in your mind, you fold the piece of paper back, place it inside the safe and lock it once again. You then go on to reveal to your friend the text that she had written on the piece of paper.
If your friend does not find this act convincing, you repeat the process with different pieces of paper/texts enough times to prove to her that you actually know the safe’s combination. Even though you prove your knowledge, note that your friend never got any information about the combination itself. This example is useful to build an initial intuition, but let us take it up a notch with the next example.
Zero-Knowledge Proof Using the Ali Baba Cave
The example we are about to cover now was originally published by Jean-Jacques Quisquater et al. in a paper titled “How to Explain Zero-Knowledge Protocols to Your Children” (linked in the reference section at the end of this essay).
In this hypothetical example, the old Ali Baba cave has been discovered in reality. It was not just fiction, all along! The cave features one entrance and two possible paths around a toroidal geometry with a magical door at the opposite side of the entrance. The door just completes the toroidal circuit when opened.
Illustration created by the author
Peggy has come to learn about the magic words that open the door, and wants to prove to Victor that she can perform the magic without revealing the magic words to him. To do this, she first goes inside the cave without Victor’s knowledge of which path (of the two) she took.
After this, Victor stands before the fork and shouts out “A” for the clockwise path and “B” for the anti-clockwise path. If Victor shouts “A” and Peggy took path “B”, all she needs to do is open the magic door, and appear from the other side. Assuming that Victor has a 50% chance of calling the same path that Peggy took, Victor needs more convincing.
Illustration created by the author
If the duo repeats this game 40 times in the honour of the 40 thieves, the probability that Peggy would get all of the instances right purely by luck would be 1 in 2²⁰. In other words, the duo can repeat the game as many times as necessary until Victor is convinced. With this example covered, let us now proceed to examine some of the formal requirements for establishing zero-knowledge proofs.
Formal Requirements for Zero-Knowledge Proof
By formal requirement, any zero-knowledge proof has to satisfy three conditions:
1. Completeness
2. Soundness
3. Zero-Knowledge
Completeness requires that both players stick to the protocol and no one cheats. One interesting thing to note here is that incomplete zero-knowledge proofs explain a lot of magic tricks. The prover (Peggy) uses some kind of deception to convince the verifier (Victor) to perform the magic trick. In an ideal zero-knowledge proof, deception and rule-breaking are not allowed (hence completeness).
Illustration created by the author
Soundness requires that it is improbable (not impossible!) for a cheating prover to convince an honest verifier. This is what Victor and Peggy achieved by repeating the same game 40 times to achieve a probability of pure luck of 1 in 2²⁰.
Finally, zero-knowledge requires that Victor would never get to know the secret albeit he is convinced that Peggy knows the magic words. Even if an eavesdropper were to listen in on their conversation, the eavesdropper would hear either “A” or “B”. This would give no useful information about the magic words themselves.
However, if Victor used coin-tosses to call out “A” or “B” (to ensure 50% chance of either), and recorded the whole adventure using a video-camera, it would break the zero-knowledge requirement. As to why this is the case, check out the paper I’ve linked at the end of this essay.
Final Remarks
Did you know that I did not choose the names “Peggy” and “Victor” just randomly? It is actually convention in the field of zero-knowledge proofs to refer to the prover as Peggy and to refer to the verifier as Victor.
Furthermore, it is important to note that zero-knowledge “proofs” are unlike mathematical proofs. They just aim to convince the verifier by ensuring that the probability of luck/cheating is negligible. To achieve this, a typical zero-knowledge proof would need to satisfy the formal requirements of completeness, soundness, and zero-knowledge.
This concept finds a wide array of both technological and ethical applications. Anything that requires an authentication system could benefit from zero-knowledge proofs, provided that it is possible to meet the three necessary conditions of completeness, soundness, and zero-knowledge.
We use cookies on our website to give you the most relevant experience by remembering your preferences and repeat visits. By clicking “Accept”, you consent to the use of ALL the cookies.
This website uses cookies to improve your experience while you navigate through the website. Out of these, the cookies that are categorized as necessary are stored on your browser as they are essential for the working of basic functionalities of the website. We also use third-party cookies that help us analyze and understand how you use this website. These cookies will be stored in your browser only with your consent. You also have the option to opt-out of these cookies. But opting out of some of these cookies may affect your browsing experience.
Necessary cookies are absolutely essential for the website to function properly. These cookies ensure basic functionalities and security features of the website, anonymously.
Cookie
Duration
Description
cookielawinfo-checkbox-advertisement
1 year
Set by the GDPR Cookie Consent plugin, this cookie is used to record the user consent for the cookies in the "Advertisement" category .
cookielawinfo-checkbox-analytics
11 months
This cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Analytics".
cookielawinfo-checkbox-functional
11 months
The cookie is set by GDPR cookie consent to record the user consent for the cookies in the category "Functional".
cookielawinfo-checkbox-necessary
11 months
This cookie is set by GDPR Cookie Consent plugin. The cookies is used to store the user consent for the cookies in the category "Necessary".
cookielawinfo-checkbox-others
11 months
This cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Other.
cookielawinfo-checkbox-performance
11 months
This cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Performance".
CookieLawInfoConsent
1 year
Records the default button state of the corresponding category & the status of CCPA. It works only in coordination with the primary cookie.
viewed_cookie_policy
11 months
The cookie is set by the GDPR Cookie Consent plugin and is used to store whether or not user has consented to the use of cookies. It does not store any personal data.
Functional cookies help to perform certain functionalities like sharing the content of the website on social media platforms, collect feedbacks, and other third-party features.
Performance cookies are used to understand and analyze the key performance indexes of the website which helps in delivering a better user experience for the visitors.
Cookie
Duration
Description
_gat
1 minute
This cookie is installed by Google Universal Analytics to restrain request rate and thus limit the collection of data on high traffic sites.
Analytical cookies are used to understand how visitors interact with the website. These cookies help provide information on metrics the number of visitors, bounce rate, traffic source, etc.
Cookie
Duration
Description
__gads
1 year 24 days
The __gads cookie, set by Google, is stored under DoubleClick domain and tracks the number of times users see an advert, measures the success of the campaign and calculates its revenue. This cookie can only be read from the domain they are set on and will not track any data while browsing through other sites.
_ga
2 years
The _ga cookie, installed by Google Analytics, calculates visitor, session and campaign data and also keeps track of site usage for the site's analytics report. The cookie stores information anonymously and assigns a randomly generated number to recognize unique visitors.
_ga_R5WSNS3HKS
2 years
This cookie is installed by Google Analytics.
_gat_gtag_UA_131795354_1
1 minute
Set by Google to distinguish users.
_gid
1 day
Installed by Google Analytics, _gid cookie stores information on how visitors use a website, while also creating an analytics report of the website's performance. Some of the data that are collected include the number of visitors, their source, and the pages they visit anonymously.
CONSENT
2 years
YouTube sets this cookie via embedded youtube-videos and registers anonymous statistical data.
Advertisement cookies are used to provide visitors with relevant ads and marketing campaigns. These cookies track visitors across websites and collect information to provide customized ads.
Cookie
Duration
Description
IDE
1 year 24 days
Google DoubleClick IDE cookies are used to store information about how the user uses the website to present them with relevant ads and according to the user profile.
test_cookie
15 minutes
The test_cookie is set by doubleclick.net and is used to determine if the user's browser supports cookies.
VISITOR_INFO1_LIVE
5 months 27 days
A cookie set by YouTube to measure bandwidth that determines whether the user gets the new or old player interface.
YSC
session
YSC cookie is set by Youtube and is used to track the views of embedded videos on Youtube pages.
yt-remote-connected-devices
never
YouTube sets this cookie to store the video preferences of the user using embedded YouTube video.
yt-remote-device-id
never
YouTube sets this cookie to store the video preferences of the user using embedded YouTube video.
Comments