Blockchain & Smart Contracts. Zero-Knowledge Proof (ZKP)
Blockchain's transparency is an advantage in many cases, but there are also a number of smart contract use cases that require privacy for various business or legal reasons, such as using private data as input to trigger the execution of a smart contract.
An increasingly common way to achieve privacy in blockchain networks is through zero-knowledge proof. Zero-knowledge proof is a method in which one party cryptographically proves that it knows a piece of information without revealing it to the other party. In blockchain networks, the only information revealed to the network by a zero-knowledge proof is that some private information is valid and verifiably known to the attestor.
Zero-knowledge proof was first defined in the 1985 paper “The Knowledge Complexity of Interactive Proof Systems” by Shafi Goldwasser and Silvio Micali. In this paper, the authors show that an attestor can convince a verifier of the truth of a particular statement about a data point without revealing any additional information about that data.
Zero-knowledge proof can be interactive, where the prover convinces a specific prover but must repeat the process for each prover, or non-interactive, where the prover creates a proof that can be verified by anyone using the same proof. There are several implementations of zero-knowledge proof, including zk-SNARKS, zk-STARKS, PLONK, and Bulletproofs, each with their transaction proof size, proof of proof, verification time, and more, working with different mechanisms in their systems.
The three key characteristics that define Zero-Knowledge Proof include:
Integrity: If the assertion is true, then an honest verifier knows the correct input and can be convinced by an honest verifier.
Strictness: If the assertion is false, then no dishonest verifier can unilaterally convince an honest verifier that he knows the correct input.
Zero-knowledge: If the assertion is true, then the verifier; nothing can be learned from the proof other than that the assertion is true.
At a general level, creating a zero-knowledge proof involves the verifier asking to perform a series of actions that can only be performed correctly if the verifier knows the basics. If the verifier only guesses at the results of these actions, then the validator’s eventual verification will prove the verifier wrong with high probability.
A conceptual example to intuitively understand a zero-knowledge proof is as follows: suppose there is a cave with paths A and B that share the same entrance but connect to a common door that is locked with a password. Alice wants to tell Bob that she knows the password to the door, but she is trying to prove this without revealing the code to Bob. To do this, Bob stands outside the cave, and Alice chooses one of two paths and walks through the cave, trying to decide which way to go. Bob then asks Alice to take one of the two paths to the cave entrance. If Alice initially chose path A to the door, but Bob asks her to return via path B, then the only way to complete the puzzle is for Alice to know the password to the locked door. Once this is done, Bob has a high degree of confidence that Alice knows the password to the door without revealing it to Bob. This is a conceptual example; a zero-knowledge proof applies the same strategy but uses cryptography to prove knowledge of a data point without revealing that data point.
Let a computational circuit output a value on a curve for a given input. Suppose any user consistently delivers the correct answer to a point on the curve. In that case, we can be confident that the user has some knowledge of the curve since, with each subsequent query, the probability of guessing the correct answer becomes greater and greater. Thinking of the circuit as the path Alice takes through the cave if she can get through the circuit to the input, it proves a high probability that she has some knowledge of the circuit’s password. The ability to prove knowledge of a data point without revealing any additional information and information about the data will provide several important benefits, especially in the context of blockchain networks.
The first benefit of Zero-Knowledge Proof is the ability to use privacy-preserving datasets on networks like Ethereum. While blockchain is designed to be highly transparent, where anyone running their blockchain node can see and download all the data stored on the ledger, the addition of Zero-Knowledge Proof technology allows users and businesses to use private data sets and underlying data when executing smart contracts without exposing it.
Ensuring privacy in blockchain networks is critical for traditional organizations such as supply chain companies, enterprises, and banks that want to interact and run smart contracts but must keep their trade secrets private to compete. Additionally, such organizations are often required to protect their customers' personally identifiable information (PII) and comply with regulations such as the European Union’s General Data Protection Regulation (GDPR) and the U.S. Health Insurance Portability and Accountability Act (HIPAA).
While blockchain networks emerged as a means for enterprises to protect transaction privacy, Zero-Knowledge Proof allows enterprises to securely interact with blockchain networks that often benefit users worldwide without giving up privacy control. Zero-knowledge-proof technology successfully addresses a wide range of enterprise use cases for previously inaccessible blockchain networks and drives innovation.
Zero-knowledge proof is used in blockchains like Zcash to allow users to create privacy-preserving transactions in which the amount of money, sender, and receiver addresses remain private. Decentralized oracle networks that provide smart contracts with access to off-chain data and computation can use Zero-Knowledge Proof to prove some truth about an off-chain data point without revealing the underlying data on the blockchain.
Zero-knowledge-proof solutions benefit users and allow traditional institutions and data providers to monetize their confidential data sets privately. Instead of publishing data directly to the blockchain network, only the proofs obtained through Zero-Knowledge Proof that prove facts about the data need to be published. This opens up new markets for data providers who can monetize existing data sets and increase revenue while ensuring zero data leakage. When combined with Chainlink Mixicles, privacy extends beyond the source data that enforces a contract to include the terms of the contract.
By combining blockchain networks' transparency with Zero-Knowledge Proof's privacy-preserving nature, businesses and institutions can enjoy the best of both ecosystems. This and more will be available in the future.
Feel free to drop a “Hi” at Pharos Production, where we bring software to life! 👋✨
“Join our exciting journey with Ludo — the reputation system of the Web3 world! 🌍✨”