Understanding: Zero knowledge proofs

6 min read

Understanding: Zero knowledge proofs

Bartick

Understanding: Zero knowledge proofs

What are zero-knowledge proofs?

A zero-knowledge proof is a way of proving that validity of a statement without revealing the statement itself. The prover is the party trying to prove a claim, while the verifier is responsible for validating the claim. The prover demonstrates to the verifier that they have knowledge of a secret without revealing the secret itself. The verifier is convinced that the prover knows the secret, but does not learn anything about the secret itself.

Why do we need zero-knowledge proofs?

Zero-knowlege proofs promises to improve security of information for individuals and organizations. It is a powerful tool for enhancing privacy and security in digital transactions. It can be used to prove that a party has knowledge of a secret without revealing the secret itself. This is useful in a variety of applications, such as authentication, digital signatures, and secure communication.

Consider how you might prove a claim (e.g., “I am a citizen of X country”) to another party (e.g., a service provider). You’d need to provide “evidence” to back up your claim, such as a national passport or driver’s license. But there are problems with this approach, chiefly the lack of privacy. Personally Identifiable Information (PII) shared with third-party services is stored in central databases, which are vulnerable to hacks. With identity theft becoming a critical issue, there are calls for more privacy-protecting means of sharing sensitive information.

Zero-knowledge proofs solve this problem by eliminating the need to reveal information to prove validity of claims. The zero-knowledge protocol uses the statement (called a ‘witness’) as input to generate a succinct proof of its validity. This proof provides strong guarantees that a statement is true without exposing the information used in creating it.

How do zero-knowledge proofs work?

Zero-knowledge protocols rely on algorithms that take some data as input and return ‘true’ or ‘false’ as output. And to acheive this, it must satisfy the following criteria:

  1. Completeness: If the statement is true, the honest verifier (one following the protocol) will be convinced of this fact by an honest prover.

  2. Soundness: If the statement is false, no cheating prover can convince the honest verifier that it is true, except with some small probability.

  3. Zero-knowledge: If the statement is true, no cheating verifier learns anything other than the fact that the statement is true.

Zero-knowlege proof is made up of three elements:

  1. Witness: The secret information that the prover wants to prove knowledge of.

  2. Challenge: The verifier randomly picks another question from the set and asks the prover to answer it.

  3. Response: The prover answers the verifier’s question using the witness.

Practical applications of zero-knowledge proofs

Zero-knowledge proofs have a wide range of applications in the digital world. Here are a few examples:

  1. Authentication: Zero-knowledge proofs can be used to authenticate users without revealing their passwords. This is useful in scenarios where users need to prove their identity to access a service.

  2. Digital signatures: Zero-knowledge proofs can be used to sign documents without revealing the signer’s private key. This is useful in scenarios where the signer wants to prove that they signed a document without revealing their private key.

  3. Secure communication: Zero-knowledge proofs can be used to establish secure communication channels between two parties. This is useful in scenarios where parties need to exchange sensitive information without revealing it to third parties.

  4. Privacy-preserving data sharing: Zero-knowledge proofs can be used to share sensitive information without revealing it to third parties. This is useful in scenarios where parties need to prove that they have certain information without revealing the information itself.

Non-interactive zero-knowledge proofs

In the traditional zero-knowledge proof, the prover and verifier engage in multiple rounds of interaction. This can be impractical in some scenarios, such as when the prover and verifier are located in different time zones. Non-interactive zero-knowledge proofs solve this problem by allowing the prover to generate a proof that the verifier can verify without any interaction. This is useful in scenarios where the prover and verifier need to prove a claim without being online at the same time.

Non-interactive zero-knowledge proofs are used in a variety of applications, such as digital signatures and secure communication. They provide a way to prove the validity of a claim without revealing any information to the verifier. This makes them a powerful tool for enhancing privacy and security in digital transactions.

Types of zero-knowledge proofs

There are several types of zero-knowledge proofs, each with its own strengths and weaknesses. Some of the most common types include:

  1. ZK-SNARKs (Zero-Knowledge Succinct Non-Interactive Argument of Knowledge): These are used to prove that a statement is true without revealing any information about the statement itself. They are used in a variety of applications, such as privacy-preserving data sharing and secure communication.

  2. ZK-STARKs (Zero-Knowledge Scalable Transparent ARguments of Knowledge): These are used to prove that a statement is true without revealing any information about the statement itself. They are used in a variety of applications, such as digital signatures and secure communication.

  3. Bulletproofs: These are used to prove that a statement is true without revealing any information about the statement itself. They are used in a variety of applications, such as privacy-preserving data sharing and secure communication. Compared to ZK-SNARKs and ZK-STARKs, bulletproofs are more efficient and scalable.

Drawbacks of zero-knowledge proofs

While zero-knowledge proofs offer many benefits, they also have some drawbacks. Some of the most common drawbacks include:

  1. Proof: Verifying proofs also requires complex computation and increases the costs of implementing zero-knowledge technology in applications. This cost is particularly relevant in the context of proving computation.

  2. Trust: Zero-knowledge proofs require the verifier to trust the prover. If the prover is dishonest, they can generate a false proof that the verifier will accept as true. This can lead to security vulnerabilities in applications that rely on zero-knowledge proofs.

  3. Hardware costs: Generating and verifying zero-knowledge proofs can require specialized hardware, which can be expensive to acquire and maintain for regular individuals and small organizations. Additionally, applications that want to use zero-knowledge technology must factor in hardware cost which may increase cost of end-users.

  4. Quantam computing: ZK-SNARK uses elliptic curve cryptography (ECDSA) for encryption. While the ECDSA algorithm is secure for now, the development of quantum computers could break its security model in the future. ZK-STARK is considered immune to the threat of quantum computing, as it uses collision-resistant hashes for encryption. Unlike public-private key pairings used in elliptic curve cryptography, collision-resistant hashing is more difficult for quantum computing algorithms to break.