Zero-Knowledge Proofs - ZKPs Explained!

Zero-Knowledge Proofs - ZKPs Explained!

Ever wished you could tell a secret without actually telling the secret? Seems impossible, right? Well, what if I told you it's not? Let's talk about Zero-knowledge proofs

In this article, we’ll walk through the what, why, and how of Zero-knowledge proofs.

What is Zero-Knowledge Proofs

Zero-knowledge proofs, often referred to as ZKPs is a cryptographic technique that allows someone to verify the authenticity of the data without revealing the data.

That doesn't make any sense right?

Well basically, zero-knowledge proof is a way of proving something without realving the actual thing. Let’s take an example, Sarah wants to prove to John that she knows the “PASSWORD” to a secure vault but instead of just saying the “PASSWORD”, she demonstrates how she opened the vault and what she found inside.

Zero Knowledge Proofs is used to improve privacy, security, and blockchain scalability.

Why is it important?

There are three main reasons why ZKPs exist:

  1. Privacy Protection: They allow transactions without giving away sensitive details, especially handy for financial stuff when you prefer to keep things under the covers.

  2. Enhanced Security: ZKPs add an extra layer of security by allowing participants to prove knowledge of certain information without disclosing that information. This prevents unauthorized access to sensitive data and reduces the risk of malicious activities.

  3. Scaling solution: ZKPs can contribute to scalability by reducing the amount of data that needs to be processed and stored on the blockchain. This is particularly important as Web3 applications aim to handle larger volumes of transactions and computations.

How Does Zero-Knowledge Proofs Work

In every zero-knowledge proof, there are two parties involved, the “PROVER” and the “VERIFIER”. Where the prover shows some secret to the verifier without actually revealing it. The verifier here is meant to ensure that the prover is not an imposter sending some fake proofs.

PS: the prover and verifier can be a person, entity, or software.

Every ZKP must pass the following requirements:

  • Completeness: If an input provided by the prover is valid, the verifier must check and ensure that the input, without a doubt is valid.

  • Soundness: The return can only be true because the verifier cannot be fooled into believing a false proof is true. Hence both parties are to be completely honest.

  • Zero-knowledge: This implies that the verifier doesn’t receive additional information about an input apart from its validity and falsity. The input and its specifics will be kept hidden

Types of ZKPs

There are two main types of zero-knowledge proofs, they are:

Interactive ZKPs

An interactive ZKP session has to do with multiple back-and-forth communication between the prover and the verifier. Here the verifier tries to validate an input by giving mathematical challenges that only the prover can solve. The session keeps going until the verifier is 100% sure the input and its proof match the values provided by the prover.

Non-Interactive ZKPs

With non-interactive ZKP, there is only a one-time communication happening. Here the prover sends an input to a special algorithm that computes ZKPs. The returned value from the special algorithm is now sent over to the verifier who validates the truthiness of the input.

The non-interactive Zero-Knowledge Proofs uses the following algorithms:

  • ZK-SNARKS:- stands for Zero-Knowledge Succinct Non-Interactive Argument of Knowledge. ZK-SNARKS are small in size and are easy to verify. They use a cryptographic method called elliptical curves which makes them gas efficient.

  • ZK-STARKS:- Zero-Knowledge Scalable Transparent Argument of Knowledge. These require little interaction between the prover and verifier as compared to ZK-SNARKS. They are also a lot faster.

Zero Knowledge Proofs Use Cases

You must be wondering, in what area of web3 is zk proof used? Here are three use cases of ZK Proofs on web3 projects:

  • Private transactions: ZKPs allow users to make private transactions where no information regarding the people involved or the amount being sent is displayed. Projects like zCash and Monero are a good example.

  • Blockchain Scalability: Blockchain uses methods such as ZK-Rollups and Validiums to verify transactions while keeping the process speedy and highly secure. Scroll and Aleo, amongst the others, are some blockchains that utilize the power of ZK Proofs.

  • Decentralized Identity(DID): ZKPs provide the bigger vision of decentralization where your data is controlled by you alone. With ZKPs, you don’t have to verify your identity by revealing your personal information. Some projects taking advantage of ZK Proofs with DID are polygonId and iden3.

Conclusion

Zero-knowledge proofs bring to life the full potential of the decentralized world by enabling privacy-focused applications.

We have seen the rise of ZKPs in some blockchains like polygonZKEVM, StarkNet, and zkSync Era which tend to improve privacy and security.

Further Info:

I hope this was informative. Please do drop a heart and share it with your network. Thank you!