Key Questions Answered
Blockchain technology and decentralization have provided us a window where we can transact and interact without oversight. To further secure this, several consensus mechanisms and protective layers are being incorporated. One such cryptographic mechanism is called the zero-knowledge proof.
Simply put, zero-knowledge proof allows someone to authenticate a piece of information or a transaction without the need to reveal any sensitive details. For instance, if you knew a secret about Adam, zero-knowledge proof will allow you to convince Adam that you know the secret without actually telling it to him. Or, if you sent $1,000 to one of your friends over a blockchain network, you can prove to the network that it was in fact you who sent that amount without revealing any details of the transaction.
What is Zero-Knowledge Proof (ZKP)?
MIT researchers Silvio Micali, Shafi Goldwasser, and Charles Rackoff proposed Zero-Knowledge Proof as an interactive proof system. Their theory allowed a ‘Prover’ to prove that a specific statement is true to a ‘Verifier’ without disclosing any details regarding the statement.
How Does the Zero-Knowledge Proof Algorithm Work?
Let’s imagine John and Julia are coworkers, and they recently received raises. Both of them want to know whether or not their salary hike is equal or not, but they do not want to reveal the specific numbers. Also, both of them know that the percentage hike an employee generally gets is an even number and ranges between 2% to 10%.
For this example, let us assume that John received a 4% hike and Julia received 10%.
Now, John brings five lockable piggy banks and labels them with 2%, 4%, 6%, 8%, and 10%. He locks all the piggy banks and only keeps the key of the piggy bank labeled ‘4%’ (his raise). And he places all the five piggy banks in front of Julia and leaves.
Julia takes five paper notes and writes ‘Yes’ on one of them and ‘No’ on the rest. She slips the ‘Yes’ paper note into the piggy bank labeled ‘10%’ (her pay raise) and slips the paper note saying ‘No’ in the other four piggy banks.
John returns and unlocks the piggy bank with a ‘4%’ label and sees the ‘No’ note inside it. He learns that his raise is not equal to that of Julia’s. Similarly, looking at the note in John’s hand, Julia understands John received a different pay raise than her.
Here, neither of them revealed the exact numbers but they have communicated to each other that they received different salary hikes. This is a classic example of zero-knowledge proof in action.
For an example application, let’s assume that Alice’s employer (the verifier) requests her bank (the prover) to share Alice’s statement of credit history and score in order to issue a home loan. Instead of sharing the entire details with the employer, a zero-knowledge proof plug is constructed between her company and the bank. Through this, her company places a custom request for her personal data with the bank.
The bank furnishes the information along with the proof of correct computation and shares it with the employer. Now, the employer applies the zero-knowledge proof algorithm to ensure the accuracy of the information. Once the accuracy is achieved, the information is ‘verified’ and Alice’s home loan is sanctioned by her employer.
If you want to learn the usage of zero-knowledge proof in greater detail, here is a distinct example — Ali Baba and the Cave story.
Applications of Zero-Knowledge Proof in Blockchain
Privacy and data sovereignty can be preserved using zero-knowledge proof-based solutions with anonymous credential validation. Applications can extend to voting, whistleblowing, private documentation, healthcare, etc.
Cryptocurrency transactions can be made truly anonymous using exchanges that are powered by zero-knowledge proof. In the traditional finance space, Finland-based ING Bank uses zero-knowledge proof to prove a number is within a range without revealing the actual numbers.
Zero-knowledge proof allows platforms to conduct auctions in a decentralized manner. Lending and borrowing in DeFi can be protected with zero-knowledge proof-based smart contracts that track financial behavior.
Zero-Knowledge Proof Advantages and Disadvantages
Basic advantages of ZKP
- Completeness: The verifier is convinced that the prover truly knows what they say they know.
- Soundness: If the statement is false, no information provided by the prover will be accepted by the verifier.
- Zero-Knowledge: If the statement is true, no other relevant information should be shared with the verifier.
Basic disadvantages of ZKP
- Scalability: Every transaction using the zero-knowledge proof mechanism involves several interactions and translations, thereby consuming a lot of computing power. This acts as an inherent limitation to the scalability of zero-knowledge proof-based solutions.
- Absolute Secrecy: Zero-knowledge proof gives back the power of data to the user, but if the user forgets or loses the data, it is lost forever. If an insurance policy or will is signed on a smart contract using the zero-knowledge proof mechanism, there is a chance that the accessibility to the contract could be nullified.
- Standards: Currently, there are no benchmarks or native language for zero-knowledge proof-based solutions. Most initiatives have been built on siloed systems with limited functionalities. Hence, mass adoption of zero-knowledge proof is still a fair distance away.
Privacy and security will remain the ultimate goal in this digital era. With blockchain technology and its applications turning mainstream, the adoption of zero-knowledge proof can be an ideal alliance to provide absolute privacy and security to users, their personal data, and transactions. The scope of zero-knowledge proof is diverse and with the right application, it will be a matter of ‘when’ rather than ‘if’ they can smoothen the transition to a user-friendly Web3.