In this article we are going to talk about Zero-knowledge Proofs For Example ZK Proof, ZK Protocol,
A ZK proof is a way of proving the validity of a statement, but without revealing the statement itself. There is a 'prover' and a 'verifier'. The prover tries to prove a claim.
The verifier is responsible for the validation of the claim.
What is a ZK protocol?
It's a method by which the prover can prove the verifier that something is true This is without revealing any information apart from the fact that this specific statement is true.
Let's see how this is possible.
What are ZK proofs useful for?
It's the promise to improve individuals' information security. To prove a claim, you usually need proof, like claiming you are that person by showing your ID. But with this approach, there's a lack of privacy (e.g your identity might be stolen).
The solution
ZK proofs solution: eliminate the need to reveal information to prove the validity of claims. ZK protocol uses the statement as input to generate proof of its validity, providing strong guarantees that a statement is true, without exposing the information.
How do ZK proofs work?
A ZK proof allows you to prove the truth of a statement without sharing the statement’s contents or revealing how you discovered the truth. ZK protocols rely on algorithms that take some data as input and return true or false.
ZK protocol criteria:
Completeness: If the input is valid, it always returns true.
Soundness: If the input is invalid, it is theoretically impossible to fool the ZK protocol to return true.
ZK: The verifier learns nothing about a statement beyond its validity/falsity.
ZK elements
Witness: The prover creates questions only those who know can answer. It starts by answering one.
Challenge: The verifier picks another question and asks to answer it.
Response: The prover calculates the answer, and returns it to the verifier.
Types of zero-knowledge proofs
ZK-SNARKs
ZK: verifier can validate without further knowledge
Succinct: it can be verified quickly. it's smaller than the witness
Non-interactive: prover & verifier interact once
Argument: cheating is unlikely
Knowledge: it can't be constructed without access to witness
ZK-STARKs
Similar to ZK-SNARKs, but:
Scalable: faster when the witness' size is larger
Transparent: they rely on publicly verifiable randomness to generate public params for proof verification They produce larger proofs and they usually have higher verification overheads
Use cases for zero-knowledge proofs
· Anonymous payments
· Identity protection
· Authentication
· Verifiable computation
Let's see them one by one in detail.
Anonymous payments
Credit card payments are often visible to many parties. Most cryptocurrency transactions are openly visible on public blockchains.
With ZK technology, privacy-focused blockchain networks allow nodes to validate transactions without access to transaction data
Identity protection
Current identity management systems put personal information at risk.
ZK proofs:
Can help individuals validate identity whilst protecting sensitive details. Are useful in the decentralized identity context.
Authentication
Using online services requires proving your identity ZK proofs can simplify this: once ZK proof has been generated, the user can just present it to authenticate their identity.
It improves UX. It frees organizations from the need to store data.
Verifiable computation
It allows outsourcing computation, maintaining verifiable results. The entity submits the result with proof verifying that the program was executed correctly
It's critical to improve scalability on blockchains without reducing security.
On-chain/Off-chain scaling solutions
On-chain: they require extensive modification of the base layer. This is complex, errors in implementation can undermine the security model
Off-chain: rely on an outsourced computation model to improve throughput on Ethereum’s base layer
Drawbacks of using zero-knowledge proofs
Hardware costs
Proof verification costs
Trust assumptions
Quantum computing threats
Hardware costs
Generating ZK proofs involves very complex calculations best performed on specialized machines. These machines are often out of the reach of regular individuals. Also, apps that want to use ZK technology must factor in hardware costs.
Proof verification costs
Verifying proofs requires computation & increases the costs of app implementation This cost is particularly relevant in the context of proving computation ZK-rollups pay ~500k gas to verify a single ZK-SNARK proof on Ethereum, higher for ZK-STARKs
Trust assumptions
ZK-SNARK: Common Reference String is generated with a trusted Ceremony, available for re-use, but there's NO WAY to tell the participants were honest. ZK-STARKs: free from trust assumptions, the randomness used in generating the string is publicly verifiable.
Quantum computing threats
ZK-SNARK uses ECDSA for encryption. 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. src: Ethereum docs.