Summary: Zero-Knowledge on Cardano & ZK Tooling
In the 68th Developers Office Hour, host Darlisa speaks with Agustín Salinas, a Cardano smart contract developer at Modulo-P. The session explores the journey of bringing zero-knowledge (ZK) cryptography to Cardano, transitioning from early off-chain hurdles to building production-ready privacy applications on the layer 1 mainnet.
The ZK Journey: Plutus V2 to V3 The journey started in 2023 during the Plutus V2 era, which lacked native ZK primitives. Early attempts resulted in massive, slow-compiling validators (up to 500 kilobytes), forcing the team to run early experiments like their “mastermind” game off-chain using Hydra. However, the release of Aiken and Plutus V3 was a massive game-changer, unlocking native on-chain primitives and allowing developers to verify ZK proofs efficiently directly on the layer 1 ledger.
Privacy Applications in Action With the foundational tools in place, the team focused on privacy applications to address Cardano’s natively transparent ledger. They successfully ported the Ethereum Semaphore protocol to Cardano, enabling anonymous on-chain messaging, which serves as a base for mixers, identity verification, and voting. Using this, they built a decentralized anonymous voting app. They also co-developed a “Proof of Innocence” application. This acts as a compliance tool for private DeFi, allowing users to cryptographically prove their funds are not linked to malicious activities without revealing their actual identity.
PTAU Ceremonies & Security ZK cryptography involves a strict trade-off: highly performant proofs (like Groth16 and Plonk) require a “trusted setup” (a multi-party computation), whereas trustless proofs (like Halo 2) are too large and resource-intensive for Cardano’s current layer 1 computational limits. To securely enable these performant proofs, Modulo-P coordinated a community-driven “Powers of Tau” (PTAU) ceremony involving 40 participants over 20 days. This established a secure perpetual foundation, meaning Cardano developers can now use Groth16 and Plonk without having to bootstrap their own phase 1 cryptographic setups.
Top Five Q&A (FAQ) about ZK Cryptography on Cardano
Question 1: What were the early challenges of building ZK proofs on Cardano? Answer: Under Plutus V2, there were no native ZK primitives available. This meant early validator scripts were massive, highly inefficient, and took days to compile. Developers had to rely on off-chain solutions like Hydra until Plutus V3 introduced native primitives, making on-chain verification possible.
Question 2: What is the Semaphore protocol? Answer: Semaphore is a powerful privacy protocol ported from the Ethereum ecosystem that allows anonymous messages to be sent to the blockchain. It can be used as a foundational layer to build mixers, private voting applications, and decentralized identity verification.
Question 3: How does the “Proof of Innocence” application work? Answer: Proof of Innocence is a compliance tool designed for private DeFi. It allows a user interacting with a protocol (like a mixer) to cryptographically prove that their transaction is not part of a known set of malicious or illicit activities, all while keeping their true identity completely hidden.
Question 4: Why did the community conduct a “trusted setup” ceremony? Answer: Because of Cardano’s strict layer 1 computational limits, developers must use highly efficient ZK proving systems like Groth16 or Plonk. However, these systems require a preliminary multi-party computation “trusted setup” to securely generate cryptographic keys. The team organized a 40-person community ceremony to establish this secure foundation so that developers can now easily build ZK applications.
Question 5: Are the current ZK implementations quantum-resistant? Answer: No, the currently deployed schemes rely on elliptic curve cryptography, which is not inherently quantum-resistant. While trustless lattice-based or hash-based cryptography could eventually solve this, they face technical resource limitations on Cardano today, though Input Output is actively researching these avenues for future upgrades.