In cryptography, a zero-knowledge proof is a method of proof whereby one party (the prover) convinces another party (the verifier) that a statement is true, without revealing any information beyond the fact that the statement is true.
Proofs in everyday life are not zero-knowledge. For example, when a buyer must prove they are over 21 to purchase alcohol, they show an ID with their date of birth. However, this method has flaws because, while proving the age requirement is met, it also discloses other sensitive information that is not relevant, such as their name and address.
Compared to this, zero-knowledge proofs are superior because they do not require the prover to reveal details about the statement itself or how they discovered the truth. Suppose Alice is color-blind and cannot distinguish between blue and red balls. Alice believes the two balls are the same, but Bob wants to prove to Alice, in a zero-knowledge manner, that the two balls are different. Bob can rely on the following mechanism.
Bob asks Alice to hold one ball in each hand and place her hands behind her back, with the left hand holding a blue ball and the right hand holding a red ball. Alice can decide whether to swap the balls between her hands. Then, Alice shows the two balls to Bob again, and Bob tells Alice whether she swapped the balls or not.
Alice: Did I swap the balls? (Left hand changes from blue to red)
Bob: Yes.
Alice: Did I swap the balls? (Left hand remains red)
Bob: No, I didn’t swap them last time.
Alice and Bob repeat this process multiple times until Alice is convinced that the two balls are indeed different; otherwise, Bob would not be able to consistently and accurately determine what Alice did behind her back. Note that during this process, Bob does not need to tell Alice which ball is blue, nor does he need to explain how he knows.
The above zero-knowledge proof example is interactive. While it is easy to understand, it is not very practical as a real-world solution because it requires multiple rounds of communication between both parties before establishing proof.
Researchers have invented non-interactive zero-knowledge proofs to address these issues. Non-interactive proofs only require one round of communication between the prover and the verifier. The prover inputs the information into a special algorithm to compute the zero-knowledge proof. Then, the verifier can check the proof to ensure the validity of the secret information. Another advantage of non-interactive proofs is that once the proof is generated, anyone can verify it.
In the blockchain field, zero-knowledge proofs are mainly used in rollup scenarios. They enable the underlying blockchain to outsource computation while ensuring the verifiability of the results. Off-chain computers execute transactions and then submit the results along with proofs of correct execution. This reduces on-chain network congestion and increases transaction speed.
Zero-knowledge proofs allow the underlying blockchain to verify off-chain transactions without re-executing them. Although zero-knowledge proofs are technically superior, research around this topic is still in its early stages. It will likely take several more years before zero-knowledge proof technology is practically adopted. $ZENT **$ZEREBRO **
This page may contain third-party content, which is provided for information purposes only (not representations/warranties) and should not be considered as an endorsement of its views by Gate, nor as financial or professional advice. See Disclaimer for details.
What is Zero-Knowledge Proof Zero-Knowledge Proof
In cryptography, a zero-knowledge proof is a method of proof whereby one party (the prover) convinces another party (the verifier) that a statement is true, without revealing any information beyond the fact that the statement is true.
Proofs in everyday life are not zero-knowledge. For example, when a buyer must prove they are over 21 to purchase alcohol, they show an ID with their date of birth. However, this method has flaws because, while proving the age requirement is met, it also discloses other sensitive information that is not relevant, such as their name and address.
Compared to this, zero-knowledge proofs are superior because they do not require the prover to reveal details about the statement itself or how they discovered the truth. Suppose Alice is color-blind and cannot distinguish between blue and red balls. Alice believes the two balls are the same, but Bob wants to prove to Alice, in a zero-knowledge manner, that the two balls are different. Bob can rely on the following mechanism.
Bob asks Alice to hold one ball in each hand and place her hands behind her back, with the left hand holding a blue ball and the right hand holding a red ball. Alice can decide whether to swap the balls between her hands. Then, Alice shows the two balls to Bob again, and Bob tells Alice whether she swapped the balls or not.
Alice: Did I swap the balls? (Left hand changes from blue to red)
Bob: Yes.
Alice: Did I swap the balls? (Left hand remains red)
Bob: No, I didn’t swap them last time.
Alice and Bob repeat this process multiple times until Alice is convinced that the two balls are indeed different; otherwise, Bob would not be able to consistently and accurately determine what Alice did behind her back. Note that during this process, Bob does not need to tell Alice which ball is blue, nor does he need to explain how he knows.
The above zero-knowledge proof example is interactive. While it is easy to understand, it is not very practical as a real-world solution because it requires multiple rounds of communication between both parties before establishing proof.
Researchers have invented non-interactive zero-knowledge proofs to address these issues. Non-interactive proofs only require one round of communication between the prover and the verifier. The prover inputs the information into a special algorithm to compute the zero-knowledge proof. Then, the verifier can check the proof to ensure the validity of the secret information. Another advantage of non-interactive proofs is that once the proof is generated, anyone can verify it.
In the blockchain field, zero-knowledge proofs are mainly used in rollup scenarios. They enable the underlying blockchain to outsource computation while ensuring the verifiability of the results. Off-chain computers execute transactions and then submit the results along with proofs of correct execution. This reduces on-chain network congestion and increases transaction speed.
Zero-knowledge proofs allow the underlying blockchain to verify off-chain transactions without re-executing them. Although zero-knowledge proofs are technically superior, research around this topic is still in its early stages. It will likely take several more years before zero-knowledge proof technology is practically adopted. $ZENT **$ZEREBRO **