Magic Wand of Web3 : Understanding Zero Knowledge Proof Before CryptIst

Barış Yurt
YTU Blockchain
Published in
8 min readNov 10, 2023

In today’s world, information Security and privacy are of paramount importance. Questions like “How can you prove what you know to someone else without revealing the information?” are being explored. This is where the concept of Zero-Knowledge Proof (ZKP) comes into play. ZKP is an algorithmic technique that allows one to prove the correctness of certain information without disclosing, transmitting, or sharing the information itself. First developed and discussed by MIT researchers Shafi Goldwasser, Silvio Micali, and Charles Rackoff in 1980, ZKP holds a significant place in the field of information security.

Pioneering researchers like Goldwasser, Micali, and Rackoff laid the foundations of ZKP while working on Interactive Proof Systems. Two parties are involved in these systems: the prover and the verifier. When the prover wishes to prove the validity of certain information, they must prove it to the verifier. However, the strength of ZKP lies in the prover’s ability to provide this proof without revealing the information.

While theoretical work on proving the correctness of information existed before, what sets ZKP apart is a fundamental question: “What if the verifier, the party conducting the verification, is not trusted?” ZKP is designed to address this challenge, allowing the prover to provide proof while preserving the confidentiality of the information, even when trust in the verifier is lacking.

Zero-Knowledge Proofs and Their Variants

Zero-knowledge proofs are designed to allow one party, known as the prover, to demonstrate the validity of certain information to another party, the verifier, without revealing the details of that information. A suitable zero-knowledge proof should meet three critical criteria:

1. Completeness: The verifier should accept the proof with high confidence when the proposition is true and both parties follow the protocol.

2. Soundness: If the assertion is false, the prover should not be able to convince the verifier otherwise, except under improbable circumstances.

3. Zero-Knowledge: Even after interacting with the prover, the verifier should gain no information about the secret other than its truth.

There are two main types of ZKPs: ZK-SNARKs and ZK-STARKs, each with its own characteristics and advantages.

  1. ZK-SNARKs (Zero-Knowledge Succinct Non-Interactive Argument of Knowledge):
  • ZK-SNARKs enable one party to prove the truth of a statement without revealing any additional information to another party.
  • They are used in cryptocurrencies like Zcash to protect transaction privacy.
  • ZK-SNARKs require a trusted setup, where a group of participants generates secret keys together, which can be a security vulnerability if compromised.
  • They are not transparent, meaning verifying the proof requires access to the secret key.
  1. ZK-STARKs (Zero-Knowledge Scalable Transparent Argument of Knowledge):
  • ZK-STARKs are a more recent development in ZKPs, designed to be more transparent and scalable while maintaining high security and privacy.
  • They do not require a trusted setup, enhancing security by eliminating this potential vulnerability.
  • They are transparent, allowing anyone to verify the proof without access to secret information.
  • ZK-STARKs are designed to be more scalable than ZK-SNARKs, making them suitable for larger-scale implementations.

ZK-SNARKs and ZK-STARKs are cutting-edge cryptographic techniques with the potential to transform the way we think about scalability and privacy in blockchain technology. While many experts consider ZK-STARKs as an advancement over ZK-SNARKs due to their quantum resistance, scalability, and transparency, there are some trade-offs to consider. The main drawback of STARKs is that they result in larger proof sizes and higher computational costs.

There are also various forms, each tailored to specific needs and requirements:

- Statistical ZK-proofs: These proofs offer computational soundness with a small error probability. While not absolute, they provide a high level of confidence in the validity of the information.

- Proof-of-knowledge (PoK): PoK is a subset of ZK-proofs demonstrating the prover’s possession of specific knowledge related to the statement. It goes beyond merely confirming the proposition’s truth and verifies the prover’s understanding of the underlying information.

- Proofs of shuffle and range: These specialized ZK-proofs find applications in electronic voting systems and privacy-preserving transactions, where it’s crucial to validate certain operations without disclosing sensitive details.

- Sigma protocols: Sigma protocols are a class of ZK-proofs that follow a structured three-step process: commitment, challenge, and response. They provide a robust mechanism for proving knowledge while maintaining confidentiality.

- Bulletproofs: Bulletproofs are designed to offer range proofs for large sets of values efficiently. They benefit blockchain and cryptocurrency applications, where privacy and efficiency are paramount.

Understanding How Zero-Knowledge Proofs Work: An Illustration

Zero-knowledge proofs (ZK-proofs) are a powerful cryptographic concept that allows a prover to convince a verifier of a statement’s truth without disclosing any information. This unique property makes ZK-proofs a valuable tool for enhancing privacy and security in various applications. Let’s explore how ZK-proofs function through the lens of a classic problem, Proof of Membership.

Consider verifying someone’s membership in a group using a locked safe as an analogy for zero-knowledge proofs. In this situation:

1. The verifier places a secret message in a locked safe.

2. The prover, who meets the group’s requirements and possesses the knowledge of the safe’s combination code, opens the locked safe.

3. The prover retrieves the secret message and shows it to the verifier.

4. The verifier becomes convinced that the prover is indeed a trusted member of the group because they demonstrated knowledge of the combination code.

In essence, if the stranger is truly a member of the group, they would be able to open the locked safe using the combination code as proof, thus establishing their trustworthiness without revealing any additional information. This analogy illustrates the principles of interactive zero-knowledge proofs in a simple and understandable way.

How can zero-knowledge proofs improve blockchain scalability?

Blockchain scalability concerns a blockchain network’s capacity to handle more transactions and users efficiently. Complex transactions can hinder scalability, but Zero-Knowledge Proofs (ZKPs) mitigate this issue. ZKPs enable nodes to validate transactions without revealing details, reducing data and computation requirements. This enhances blockchain speed, efficiency, security, privacy, and user anonymity. Here’s how ZKPs can contribute to this improvement:

1. Enhanced Privacy and Security: ZKPs allow participants to prove knowledge of a specific piece of information without revealing it. This enhances privacy on the blockchain, as sensitive data can be kept confidential. With improved privacy, more users may be willing to transact on the blockchain, increasing its usage and scalability. For instance, Aleo promises us private applications with the power of ZK on layer 1.

2. Reducing On-Chain Data: ZKPs can be used to compress data on the blockchain. Creating succinct proof that transactions are valid without revealing their content reduces the amount of data that needs to be stored and transmitted on the blockchain. This reduces the storage and bandwidth requirements, making it more efficient and scalable.

3. Faster Verification: Zero-knowledge proofs can speed up the verification process for transactions and smart contracts. Instead of executing complex computations or running extensive checks, nodes can quickly verify succinct proofs, reducing the time required for transaction validation. This results in faster confirmation times and higher throughput.

4. Batch Verification: ZKPs enable batch verification, allowing multiple proofs to be verified simultaneously. This is particularly useful when processing a large number of transactions. By aggregating and verifying multiple transactions in a single batch, the blockchain can handle more transactions per block, improving overall scalability.

5. Off-Chain Scaling Solutions: ZKPs can be used in off-chain scaling solutions, such as Layer 2 solutions (e.g., zk-Rollups and Optimistic Rollups). These solutions enable most transactions to occur off-chain, with only a summary of those transactions periodically settled on the main blockchain. ZKPs ensure the integrity and validity of these off-chain transactions, enhancing the overall scalability of the blockchain.

6. Proof-of-Stake (PoS) Enhancements: In PoS blockchains, ZKPs can be used to prove ownership and eligibility for block validation without revealing the validator’s private keys. This can help reduce the computational overhead and improve the scalability of PoS-based blockchains.

7. Cross-Chain Interoperability: ZKPs can be used to verify transactions and state changes across multiple blockchains. This enables interoperability between different blockchain networks, reducing the need for intermediary chains and enhancing the scalability of the entire blockchain ecosystem. Let me give you an example, RedStone promises to deliver the data you need at high frequency and inherited security of the destination chain.

ZK Projects which are Cryptist participants

These are some notable Cryptist participants leveraging Zero-Knowledge Proofs (ZKPs) and related technologies to enhance scalability and functionality :

  1. ZkSync: zkSync is an Ethereum Layer 2 scaling solution powered by ZK-Rollup technology. It offers high transaction processing capacity, reduced gas costs, and maintains Ethereum Layer 1 security levels.
  2. Scroll: Scroll is advancing with zkEVM Equivalence technology, offering a fully compatible ZK-Rollup solution with EVM. It prioritizes code consistency and seamless dApp migration between Ethereum’s Layer 1 and Layer 2, aiming to simplify blockchain development for developers.

3. Aleo: Aleo platform utilizes zkSNARK technology, allowing developers to build decentralized applications (dApps) that provide customized Web3 services to users while ensuring users retain control of their personal data.

4. Panther Protocol: A zero-knowledge, cross-protocol layer protecting your on-chain data and enabling compliant DeFi access.

5. Clave: Clave, which is an ETHGLOBAL Winner, is an easy-to-use non-custodial smart wallet powered by Account Abstraction and the Hardware Elements (e.g. Secure Enclave, Android Trustzone, etc.), offering a unique onboarding process.

6. Protokit: Protokit enables developers to build zero-knowledge, interoperable, and privacy-preserving application chains with a minimal learning curve.

7. Herodotus: Storage proofs provide smart contracts with synchronous access to current, historical, and cross-chain data across Ethereum layers.

References:

· https://www.linkedin.com/advice/0/how-can-zero-knowledge-proofs-improve-blockchain-scalability-bojxf

· https://cointelegraph.com/explained/zero-knowledge-proofs-explained

· https://ethereum.org/en/zero-knowledge-proofs/

· https://101blockchains.com/zksnarks-vs-zkstarks/

· https://quillaudits.medium.com/zero-knowledge-proof-in-blockchain-explained-quillaudits-83e828d77724

· https://www.circularise.com/blogs/zero-knowledge-proofs-explained-in-3-examples

--

--