Imagine a world where you can prove you're over 18 without showing your ID, or verify your identity without revealing personal details.
This is the power of Zero-Knowledge Proofs (ZKPs), a technology revolutionising both the traditional web and the emerging decentralised web (We3).
Let's dig into ZKPs, how they work, and why they are needed in web3.
What is a ZK Proof
It’s pretty impressive that Zero Knowledge Proofs (ZKPs) were first introduced nearly four decades ago! In 1985, Shafi Goldwasser, Silvio Micali, and Charles Rackoff published their groundbreaking paper, “The Knowledge Complexity of Interactive Proof Systems,” laying the foundation for this revolutionary technology.
The OG definition of a ZK proof aged well and we still use it today:
A zero-knowledge proof is a method by which one party (the prover) can prove to another party (the verifier) that something is true, without revealing any information apart from the fact that this specific statement is true.
Let’s use an analogy to demonstrate this:
Imagine Jason has the world's best chocolate cake recipe and wants to sell it to Marta. Marta needs to verify that Jason truly has the recipe, but if Jason shows it to her, she’ll see the secret recipe and all its ingredients.
A ZKP allows Jason to prove he has the recipe without revealing the actual details to Marta, ensuring the deal goes through without Jason losing his secret.
How do ZK Proofs Work
At a high level, a zero-knowledge proof works by having the verifier ask the prover to perform tasks that can only be done correctly if the prover knows the secret information. If the prover is just guessing, they will likely fail the verifier's test eventually.
The three fundamental characteristics that define a ZKP include:
- Completeness: When an honest provider provides the correct input, an honest verifier can be convinced of their knowledge.
- Soundness: A dishonest provider cannot unilaterally convince a truthful verifier he or she knows the correct information.
- Zero-knowledge: The verifier learns nothing more from the provider than that the statement is accurate.
To ensure accuracy, the challenge and response steps can be repeated several times, providing a high level of confidence in the proof's authenticity
Types of ZK proofs
There are multiple types of zero-knowledge proofs but we’re going to look at the most popular ZKPs in blockchain: ZK-SNARKs and ZK-STARKs (they even sound similar!)
- ZK-SNARKs
A Zero-Knowledge Succinct Non-Interactive Argument of Knowledge (ZK-SNARK) is a type of zero-knowledge proof where the prover and verifier don’t need to interact.
The proofs are concise because they are short and easy to verify. ZK-SNARKs typically use elliptic curve cryptography and require a trusted setting to generate the parameters. They are one of the most widely used zero-knowledge proof types in the crypto world.
- ZK STARKs
STARK stands for “scalable transparent argument of knowledge”. STARK-based proofs require minimal interaction between the prover and the verifier, making them much faster than SNARKs.
While STARKs are more scalable than SNARKs, they require more gas fees.
Why Do We Need Zero-Knowledge Proofs?
Various use cases explain why we need zero-knowledge proofs. Let’s take a look at some of the most important.
- Security and privacy: The pseudonymity of Web3 fails to guarantee complete privacy since the transaction history is available on public blockchains. With ZKPs, information verification is possible without revealing personal identifiable information (PII), thus maintaining anonymity.
- Identity verification: Proving one’s identity does not have to include sharing sensitive information. ZKPs offer an avenue to carry out the identity verification process privately and securely.
- Scalability: With ZKPs, blockchain networks can verify transactions without revealing the underlying data. The network’s efficiency improves since the information stored on the blockchain reduces significantly.
- Compliance: Organizations can comply with regulatory requirements regarding money laundering, KYC, and other relevant laws. ZKPs allow organizations to comply without storing users’ personal information on centralized databases.
ZK Proof Chains that SubQuery supports
- zkSync Era: zkSync Era is an Ethereum layer-2 scaling solution utilizing ZK-rollup technology for enhanced speed, cost-efficiency, and security in transactions
- Astar zkEVM: Astar is a decentralised blockchain platform that aims to provide scalable and secure infrastructure for Web3 applications. It focuses on enabling developers to build and deploy dApps with high throughput and low latency.
- Citrea: Citrea is the first rollup that enhances the capabilities of Bitcoin blockspace with zero-knowledge technology, making it possible to build everything on Bitcoin.
- Immutable zkEVM: Immutable zkEVM is a groundbreaking gaming chain that merges EVM compatibility, affordability, scalability, and Ethereum-grade security. It's at the forefront of gaming tech within web3's extensive ecosystem.
- Linea: Linea is a zkEVM chain launched by Consensys that leverages the power of zero-knowledge proofs to validate transactions off-chain and submit a cryptographic proof to the Ethereum mainnet, achieving high throughput and low gas fees.
- Taiko: Taiko is a decentralised Layer 2 blockchain protocol that uses a Zero Knowledge Ethereum Virtual Machine (ZK-EVM). It is designed to be the most Ethereum-equivalent and general-purpose Zero Knowledge Rollup (ZK-Rollup).
- Polygon zkEVM: Polygon zkEVM is a decentralized Layer 2 scalability solution for Ethereum. It utilizes cryptographic zero-knowledge proofs to provide validity and fast finality to off-chain computations.
- Scroll zkEVM: We’ve been supporting Scroll since their mainnet launch October last year. Scroll Quick Start guide here.
What’s next for ZK proofs
As we move towards a more decentralised web, where data ownership and privacy are paramount, ZKPs provide a way to verify transactions and interactions without compromising on privacy.
But why should you care about ZKPs? Well, in a world where data breaches are common and privacy concerns are high, ZKPs offer a solution that's both secure and user-friendly. They're not just for tech enthusiasts or early adopters; they're for everyone who values their privacy and security online.
It's evident that ZKPs are the key to a future where privacy reigns supreme, and digital interactions are secure, efficient, and transparent. The promise of ZKPs is not just a vision—it's an imminent reality that will transform our digital world.
About SubQuery
SubQuery Network is innovating web3 infrastructure with tools that empower builders to decentralise the future. Our fast, flexible, and open data indexer supercharges dApps on over 200 networks, enabling a user-focused web3 world. Soon, our Data Node will provide breakthroughs in the RPC industry, and deliver decentralisation without compromise. We pioneer the web3 revolution for visionaries and forward-thinkers. We’re not just a company — we’re a movement driving an inclusive and decentralised web3 era. Let’s shape the future of web3, together.
Linktree | Website | Discord | Telegram | Twitter | Blog | Medium | LinkedIn | YouTube