Cardano Foundation Show How to Verify Zero-Knowledge Proof for Cardano
The first installment of a five-part developer series shows how to build a 192-byte Groth16 proof and verify it in Aiken using cryptographic operations already available in Plutus V3.
By SongMarketCap
Updated:
Cardano smart contract fit check whether person sabi eight numbers wey satisfy one equation without to collect the numbers demself. Cardano Foundation use this example introduce their new series about zero-knowledge proofs. The first tutorial follow the whole process from how to write the equation as set of constraints to how to generate the proof off-chain and verify am for Aiken test.
Eight Private Numbers, One Public Result
The example group eight numbers into four pairs. The prover go multiply the two numbers inside each pair and add the four products. The sum must equal 100. That result na public, but the eight numbers go remain private.
The tutorial take the calculation turn to five mathematical constraints. Four dey check the individual products, and the fifth dey check say dem add up reach the public result. Valid proof go show say the prover sabi one set of numbers wey satisfy those constraints without to reveal which set dem use.
How Aiken Checks a 192-Byte Groth16 Proof
The tutorial generate the proof off-chain. The Groth16 proof get three elliptic-curve points wey take 192 bytes inside the compressed BLS12-381 format wey the example use. The verifier go check the proof against the public inputs and a verification key wey tie to the circuit.
The walkthrough end with Aiken test wey use the same BLS12-381 operations wey Plutus V3 scripts for Cardano mainnet dey offer. To make the example easy to reproduce, the tutorial use fixed, publicly known values for the part of the setup wey suppose remain secret normally. For production Groth16 setup, anybody wey hold those secret setup values fit forge proofs.
Why On-Chain Verification Matter for Cardano
Cardano developers fit build Groth16 verifier inside Aiken smart contract using existing Plutus V3 operations. Application fit generate the proof off-chain, then pass am give the contract so the validator fit decide whether transaction satisfy one condition. The proof and any public inputs wey dem need go dey available to the validator, while the private data fit remain off-chain.
For credential application, that separation go determine wetin user need disclose. Contract fit check whether credential holder meet age requirement without to receive their date of birth, as long as the circuit and credential design enforce the claim wey dem dey prove.
[NEWSBREAK]
Wetin the Next Four Installments Go Cover
The second installment go show how to speed up proof generation and how production setup ceremonies dey work. E go still compare Groth16 with other proof systems and explore how zero-knowledge virtual machines fit prove say program run correctly without need developers to design circuit by hand.
The third installment go show how proofs of key ownership fit tie to Cardano addresses. The fourth go focus on selective disclosure. For one planned example, credential holder go prove say dem be at least 21 without to reveal their date of birth or blockchain address.
The final installment go examine quantum-resistant proof systems, focus on lattice-based approaches wey fit replace the elliptic-curve assumptions wey Groth16 dey use.