What is ZK?

What is the Zero-Knowledge (ZK) protocol?

The Zero-Knowledge (ZK) protocol is a mathematical protocol that allows one party to prove that a certain claim is true to another party without revealing any information about it. This protocol is particularly important for privacy and data integrity in blockchain technology. For example, a person may want to prove to another person that they have a certain document, but the document holder may not want to share sensitive information. In this case, a ZK proof allows the document holder to prove that they have the document without showing it or sharing any sensitive information.

 

How does the ZK protocol work?

The ZK protocol demonstrates in an interaction between two parties that one party has a specific piece of information, while the other party can verify this information without possessing it. The ZK protocol uses a mathematical computation to achieve this. During the interaction between the two parties, the information to be proven is combined with a randomly selected number, and this number is sent to the other party. The other party uses this number to perform mathematical computations to check whether the claimed information is true. However, the results of these computations reveal nothing about what the claimed information actually is. A zero-knowledge protocol must satisfy the following criteria:

 

Completeness: If the input is valid, the zero-knowledge protocol always returns the “correct” value. Therefore, if the underlying statement is true and both the prover and verifier are honest, the proof is acceptable.

Soundness: If the input is invalid, it is theoretically impossible to deceive the zero-knowledge protocol into returning “true.” Therefore, a dishonest prover cannot deceive an honest verifier into believing that an invalid statement is valid (except with a small probability).

Zero-knowledge: The verifier learns nothing about the statement except for its validity or invalidity (i.e., they have “zero knowledge” about the statement). This requirement also prevents the verifier from deriving the content of the original statement from the proof.

Essentially, a zero-knowledge proof consists of three main elements: the witness, the challenge, and the response.

Witness: In a zero-knowledge proof, the prover wants to prove knowledge of some secret information. The secret information is the “witness” of the proof, and the prover’s assumed knowledge of the witness creates a set of questions that can only be answered by someone who knows the secret. Thus, the prover initiates the proof process by calculating the answer and sending it to the verifier.

Challenge: The verifier selects another question at random from the set and asks the prover to answer it.

Response: The verifier accepts the proving question, computes the answer and sends it back to the prover. The prover’s response allows the verifier to check if the prover really had access to the witness. To ensure that the verifier does not guess blindly and does not accidentally get correct answers, the verifier chooses more questions to ask. By repeating this interaction many times, the probability of the prover mimicking the witness’s knowledge decreases significantly until the verifier is satisfied.

 

How is the ZK protocol used in blockchain?

The ZK protocol plays a crucial role in privacy in the blockchain. For example, the complete transparency of transactions on a blockchain can lead to the disclosure of a user’s identity. However, using the ZK protocol, transaction privacy can be ensured, allowing transactions to be completed while protecting a user’s identity. Zero-knowledge proof protocols can be applied in several different ways, including:

 

zk-SNARKs: This protocol is used in cryptocurrencies like Ethereum. It speeds up the flow of data on the blockchain while protecting the privacy of transactions.

zk-STARKs: This protocol is designed for large data sets to speed up the flow of data on the blockchain.

Bulletproofs: This protocol performs the transaction verification process in a less resource-consuming way while using less storage space.

Leave A Comment