What is zero-knowledge proof

 4 minutes to read

Zero-Knowledge Proof was proposed by S. Goldwasser, S. Micali and C. Rackoff in the early 1980s.

Zero-knowledge proof is defined as: the prover can convince the verifier that a certain assertion is correct without providing any useful information to the verifier.

In order to understand the meaning of the above passage, a very classic example of zero-knowledge proof is given next:

Alibaba was caught by a robber. In order to save his life, he needed to prove to the robber that he had the password to open the stone gate, and at the same time he could not tell the robber the password. He came up with a solution, first let the robbers leave him with a stone’s throw, The distance is far enough so that the robbers can’t hear the password, and close enough so that Alibaba can’t escape under the robber’s bow and arrow. If the robber raises his left hand, Alibaba uses the password to open the stone gate, and if he raises his right hand, he closes the stone gate. Alibaba showed the robber the opening and closing of the stone gate at this distance. If the gate can be opened and closed correctly every time, it is confirmed that Alibaba does know the password of Shimen.

This entire process is zero-knowledge proof, that is, the prover can convince the verifier that a certain assertion (Alibaba knows the way to open the stone gate) is correct without providing any useful information (the password of Shimen) to the verifier.

From this we can summarize the three attributes of zero-knowledge proof:

If the statement is true, the honest verifier (that is, the verifier who follows the protocol correctly) will be assured of this fact by the honest prover.

If the sentence is false, it is not ruled out that the deceiver can convince the honest verifier that it is true.

If the statement is true, the purpose of the prover is to prove to the verifier and make the verifier believe that he knows or possesses a certain message, and during the certification process, it is not allowed to disclose any content about the certified message to the verifier.

Zero-knowledge proof is a verification method based on probability. The verifier asks questions to the prover based on a certain degree of randomness. If the prover can give the correct answer, it means that the prover has a high probability of possessing what he claims. “knowledge”. Zero-knowledge proof is not proof in the mathematical sense, because it has a small probability of error, and the deceived prover may deceive the verifier through false reports. In other words, zero-knowledge proofs are probabilistic proofs rather than deterministic proofs, but there are also technologies that can reduce the error to a negligible value.

According to the definition of zero-knowledge proof, it can be learned that zero-knowledge proof has the following three important properties:

Completeness: As long as the prover has the corresponding knowledge, it can be verified by the verifier, that is, the prover has a large enough probability to convince the verifier.

Soundness: If the prover does not have the corresponding knowledge, he cannot pass the verification of the verifier, that is, the probability that the prover deceives the verifier can be ignored.

Zero-Knowledge: The prover only reveals to the verifier whether he has the corresponding knowledge statement during the interaction, and will not reveal any additional information about the knowledge.

Zero-knowledge proof application scenario

Two key words can be extracted from the definition of zero-knowledge proof: “not leaking information” and “proving that the argument is valid”. Based on these two characteristics, two major application scenarios of zero-knowledge proof on the blockchain are expanded:

Privacy: In the privacy scenario, we can use the “non-disclosure of information” feature of zero-knowledge proof to prove that the asset transfer on the blockchain is effective without revealing the details of the transaction (receiver, sender, transaction balance) of.

Expansion: In the expansion scenario, we don’t need to pay much attention to the “non-disclosure of information” feature of zero-knowledge proof technology. A large number of calculations need to be migrated to off-chain, so there needs to be a technology that can prove that these off-chain actions are credible. Zero-knowledge proof can just help us to endorse trusted computing under the chain.