·4 min read

Zero Knowledge Proofs Foundations

What are Zero Knowledge Proofs ?

What if i tell you I am know a solution to a problem, without revealing the solution. you'll say it's impossible, but it is possible with Zero Knowledge proofs.

At high level Zero Knowledge Proofs or ZKPs are math magic which allow you to proof you have certain information without revealing the actual information

It is one of the best topic which i personally is very intrested, i am reading a lot about it and will be posting on this site about my learning.

Why we need ZKPs ?

ZKPs are one of most important thing for mass apdotion of Blockchains, Blockchains by default are open, their nature focuses on transparency, however we don't want everything to be transparent right ?

Thus introduction of ZKPs into the blockchain systems will do wonders, imagine sending crypto from your wallet to another wallet without anyone knowing who is the sender and who is the receiver it's a one part of privary

Blockchains like starknets, ZCash, Monero etc uses ZK Proofs as their base to overcome this part of the blockchains

Another area where ZKPs are usefull is the scalablity of blockchains, which is another thing required for mass adoption of this technology

If we can compute a very complex problem off-chain and present a proof on to the network it will be amazing since all the heavy lifting is done by of-chain computation and onchain will have much more space to breath

There are many ways ZKPs are usefull above were few of the examples we will cover more on to this series and this blog

Principals of ZKPs

These are the terminologies used in ZKPs although some people may use other words to explain the same thing but the context is same

Nature of ZKPs

ZKPs are the mathematical proof of a solution which convince the verifier that solution is real and valid

If you know password of a computer i must be 100% convinced that you know the password without revealing the actual password what you will do to prove that you will open the computer for me right, but i don't have any way to find the actual password

Hence for a ZKP to be correct it must satisfy 3 things

  1. Completeness: An honest prover can convince a verifier that a true statement is valid.
  2. Soundness: A false statement cannot convince an honest verifier, except with negligible probability.
  3. Zero-Knowledge: The verifier learns nothing beyond the validity of the statement, keeping the secret hidden.

Since we are dealing with Verifier and Prover let's understand what both of them stands for

  • Prover: Prover is an entity, it can be a human or a computer system which wants to prove a statement is true or it posses a certain secret ("witness", more on this on upcoming blogs)
  • Verifier: Verifier is an entity, which is responsible to check weather the claims / proofs from the prover is correct or not

Types of ZKPs

There are mainly 2 types of ZKPs, Interactive proofs and Non Interactive proofs

Intreactive Zero Knowledge Proofs

In Intreactive proofs there is constant communication between verifier and prover to determint the ZKP is valid or not which means there is constant communication between Verifier and Prover until Verifier is 100% conviced that the proof is valid

Post figure

Examples Interactive Zero Knowledge Proofs

1. Ali Baba Cave

Imagine two people Person P who is the prover and Person V who is the verifier

There is a cave with 2 entrance Entrance A and Entrance B in the middle of the cave there is a door locked with a passcode

Person V wants to prove to Person P that he knows the combination of the passcode and he doesn't want to reveal that passcode to P, P says that how can I believe that

V turns his back towards the cave, P enters from A, enters passcode and exit from the B

V asks how can I be 100% sure that you didn't entered from B and exit from B and there is 50% chance of that

So they repeat this process 30 times and V is now convinced that P indeed know the solution and valid

Ali baba cave

As you