The Concept of Zero Knowledge Proof
Companies like Facebook (now Meta), Google, Microsoft, etc., collect the personal data you generate on their sites and use it to improve their services and generate more revenue. Data collection means that your information isn't very private, and there might exist some data that you don't want to share with everyone, but these big tech companies own it. Over the years, the voice against private companies accessing private data from the net has increased, while there have been <i>cases of misuse of personal data</i> from companies like Facebook.
In recent years, blockchain technology has offered a solution regarding safeguarding the data on the internet. Another technique that can protect your online information is <strong>Zero Knowledge Proof</strong>. It was made famous through its application in blockchains though it was invented in 1982. Today we will discuss Zero Knowledge Proofs and some of their use cases.
<strong><h2><center>Zero Knowledge Proof</strong></h2></center>
In cryptography, a zero-knowledge proof is a method by which one party can prove the validity of a given statement. While proving the statement is true, the prover must avoid conveying additional data. <i>Proving the DEFINITE validity of a statement without providing any extra information is quite impossible, but there is a turnaround</i>. Let's say you have two balls in your hand of different colors. But a color-blind or a blind person cannot distinguish between those colors, and you must prove that the balls have different colors. What can you do in this case?
One solution is you give the balls to the color-blind person and ask them to hide the ball behind, and they can either switch the balls in their hands or not. After they show you the ball, you have to tell if the balls were interchanged or not. Now cause you can see the balls' actual colors, you should be able to say the correct answer. But doing this experiment one time wouldn't tell for sure if you are lying about the colors of the ball or not because the chances of giving the correct answer are 50%. Now, if we repeat the same experiment, say ten times, and you answer every time correctly, that should provide confidence in your statement because the chances of answering wrong and getting it correct ten times in a row are less than 9%.
The above is an example of a Zero Knowledge Proof. Now with the help of probability, we could prove our statement is correct, and we didn't need to give any extra information about the balls like their color, size, etc. But in the above "proof," there is still a 9% chance that prover was telling a lie. Even if we repeat the experiment a thousand times or a million times, we cannot be 100% sure that the prover is not lying, and that's the drawback of this proof. But as we know, telling a lie 1000 times and getting it correct every time is quite impossible.
<strong><h2><center>Types of Zero Knowledge Proofs</strong></h2></center>
There are two types of ZKPs, interactive and non-interactive. <strong>Interactive zero-knowledge proof</strong> requires live interaction of verifier and prover like in the above case. But Interactive ZKPs have <b><i>limited transferability and are not highly scalable</b></i> because both prover and verifier need to be online for the proof to happen. One of the essential applications of Interactive ZKPs comes in <b>Nuclear disarmament verifications</b>. Powerful countries possessing nuclear weapons agree that they are dangerous and should reduce the number of atomic weapons. To verify whether a government has disarmed its nuclear weapons or not would create some problems.
These countries want to keep the design of their nuclear-powered technology a secret. Hence, they wouldn't allow verifiers from other countries to see the design of their nuclear weapons to verify if they have destroyed them. In 2016, Princeton Plasma Physics Laboratory and Princeton University demonstrated techniques that may have applicability. It will allow inspectors to confirm if an object is a nuclear weapon without recording, sharing, or revealing internal workings which might be secret.
Another type of ZKP is <b>Non-interactive ZKP</b>. Non-Interactive ZKPs are <b><i>transferable and scalable</b></i>. They do not require both parties to be present at the same time to be able to verify the validation of a statement. It allows you to provide proof that anyone can verify by themselves. Non-Interactive ZKP has more applications than IZKP because of its contrasting properties. One of the main <b>applications comes in blockchains</b>. Traditional blockchain systems like Bitcoin provide all the information of a transaction online for anyone to verify if the transaction is valid or not.
Doing so gives hashed sender and receiver IDs, amongst other details like the amount of the transaction, etc. But newer blockchain systems like ZCash use non-Interactive ZKPs to verify the validation of a transaction. ZCash and other blockchain technologies use <b>SNARKs (Succinct Non-Interactive Arguments of Knowledge)</b>. They hide all the personal information of the sender and receiver and allow anyone to verify the transaction's validity.
Criteria For ZKP
Mathematically speaking, there are 3 criteria for a proof to be Zero Knowledge Proof.
The first one states that both, <strong>the prover and the verifier must be truthful about their answers</strong>. With respect to our two balls example, the prover must tell the truth if he or she thinks the balls have been swapped or not and the verifier shall tell the truth if they have swapped the balls or not.
The second criterion states that the <strong>prover must know the statement they are trying to prove</strong>. Again in our ball swap example, if the prover is color blind as well, they wouldn't be able to prove the statement.
The third criterion states that the <strong>prover must not provide any additional information</strong> apart from proving the statement. Hence your proof must be in such a way that you do not give away any information about the "environment" of the statement.
If your proof satisfies all these criteria, it can be called a Zero Knowledge Proof.
- Ojas Srivastava, 12:55 AM, 28 Jul, 2022