Many of you have heard the term Zero-Knowledge, or ZK, in relation to emerging blockchain technology, but what exactly is it?
A simple conceptual overview of what a ZK Proof is and why it is important (no math required!) π§΅ππΌ
1/x
This thread is part of an ongoing series covering ZK Proofs from basics to advanced topics. Make sure to check my page for more threads to come!
Now, let's dive in...
2/x
Simply put, Zero-knowledge proofs are a way for an individual to prove to another that a statement is true, without disclosing any information beyond the validity of the statement.
3/x
Let's start with a quick warmup:
Suppose I want to go into a bar. Before I am allowed entrance, I must first convince the bouncer that I am of legal drinking age. Thus, I hand the bouncer my ID Card that confirms my age > the minimum age required.
4/x
This system, however, is flawed.
By handing this stranger my ID Card, I in turn relinquish unnecessary personal information about myself, such as my name, home address, etc.
5/x
What if there was a way for me to prove my requirements for entrance while keeping all personal information secret, even my DOB?
Unfortunately, this scenario has not seen a practical solution just yet, but it is a good example to get us on track for the genius of ZK Proofs.
6/x
Let's jump into a scenario that, through ZK Proofs, allows for one party to convince another of the validity of a secret known as "The Cave of Ali Baba."
7/x
Consider two friends, Peter and Veronica, who find themselves at the opening of a ring-shaped cave with two distinct entrances to two separate paths, Path A and Path B.
Inside the cave, a locked door, opened only via secret code, blocks the two paths from connecting.
8/x
Peter claims to know the code to this door but, being a very private person, does not want to reveal the code to Veronica, nor let it be publicly known he possesses this knowledge in general.
Skeptical of his knowledge, Veronica proposes a system to verify this claim...
9/x
The system is as follows:
Peter instructs Veronica to stand outside the entrance of the cave. He enters one pathway at random without Veronica seeing which way he went. Once inside, Veronica can approach the entrance and call out the path she would like him to exit from.
10/x
Knowing the secret code that opens the door, Peter can exit the cave down the pathway he chooses; he can either return down the path he originally entered, or by unlock the door to gain access to the other path.
11/x
Upon returning out the exit of her choice, Veronica is still not convinced, as she suspects that Peter could have gotten lucky; she picked Path A or Path B at random, giving a 50% chance of guessing correctly.
12/x
Peter suggests they continue to iterate this trial another 20 times, as the chances of Peter guessing correctly each time would be very unlikely (1/2^20) if he could not travel through the locked door.
13/x
Peter successfully completes all of these trials correctly each time, convincing Veronica it is extremely probable that he does in fact know the secret code to open the door.
14/x
Peter has convinced Veronica he possesses this knowledge while providing Veronica with "Zero-Knowledge."
Veronica did not learn anything she did not previously know about Peter's secret, yet believes to a high degree of confidence that the secret is valid.
15/x
This example above is a great first step into the realm of ZK Proofs, more specifically an Interactive Probabilistic ZK Proof, and begins to highlight the role ZK Proofs can play in privacy.
16/x