Zero-knowledge proof explained like you are 5 years old

Hi kids!So, you're interested in cryptocurrencies, and you've heard about those so-called "zero-knowledge proofs" (ZK) used by projects such as Loopring, zkSync and StarkWare.Now you're wondering : what are zero-knowledge proofs and why are they so important? Good news, champ, I am here for you!Let's say I found a cave with two distinct entrances, Left and Right. The two entrances are connected by a corridor, but a dragon prevents anyone from passing through the corridor. To make the dragon let you through, you need a magic stone. I have this magic stone, and I want to prove to you that I have it, but I don't want to show it to you, and I don't want to tell my secret to anyone but you.This is how it works. You close your eyes while I enter the cave, without telling you if I chose the Left or Right entrance. You open your eyes again, then ask me to come out on a particular side and I do so. You close your eyes, I go back into the cave, and we repeat the experience 100 times.If I have the magic stone, the dragon will let me through everytime and I can leave the cave through the entrance you tell me, 100 times out of 100. But if I don't have the stone, every other time I won't be able to get out through the chosen entrance - statistically, I will only have the good answer 50% of the time.So by using this method, I will prove to you that I have the magic stone, without ever showing it to you. Moreover, you will not be able to prove to anyone else that I have the stone, since an outside observer could always think that we have arranged it together in advance.This is what is called a zero-knowledge proof. In cryptocurrencies, the magic stone is the private key. Zero-knowledge proofs are used to show to a validator that you are indeed in possession of the private key, without revealing said private keys to the validator, and without letting the rest of the world know you have the key.Thank you for listening to my story. I hope you had fun today, my little friends!

Submitted January 05, 2022 at 10:28PM

No comments:

Post a Comment