project screenshot 1
project screenshot 2
project screenshot 3

Semaphore in Mina

Semaphore in Mina deals with Anonymous interactions. Using zero knowledge, users can prove their group membership without revealing their original identity. Our inspiration is https://semaphore.pse.dev/ but rewriten in o1js in order to be native to Mina blockchain.

Semaphore in Mina

Created At

ETHOnline 2024

Project Description

Semaphore on the Mina Protocol is a privacy-centric framework that uses zero-knowledge proofs, specifically zk-SNARKs, to enable anonymous yet verifiable interactions on the blockchain. It allows users to prove group membership without revealing their identities, supporting privacy-sensitive applications like voting and whistleblowing. Utilizing zero-knowledge proofs, users can anonymously signal or perform transactions that are verifiable by the network without linking actions to their real-world identities. Built on the Mina Protocol, the world's lightest blockchain, Semaphore leverages its constant blockchain size (~22 KB) and zk-SNARK technology for scalable, privacy-preserving applications. The implementation uses o1js, a JavaScript library for developing zkApps on Mina, enabling the creation and verification of zero-knowledge proofs in JavaScript. Key features include anonymous group membership proofs, scalability and efficiency due to Mina's succinct blockchain design, and versatility for various use cases requiring anonymity and verifiability. Rewritten in o1js for seamless integration with other zkApps on Mina, it enhances interoperability and security, making it accessible for developers familiar with JavaScript to build and deploy privacy-preserving applications. Use cases include anonymous voting systems, whistleblowing platforms for anonymous reporting, and credential verification where users can prove qualifications without revealing personal information.

How it's Made

The Semaphore project on the Mina Protocol uses cryptographic techniques and blockchain technology for privacy and scalability. Mina Protocol, a blockchain with a constant size using zk-SNARKs, forms the base for decentralized applications needing minimal data processing on user devices. o1js, a JavaScript SDK from O(1) Labs, supports the development of zkApps by enabling smart contract interactions on Mina. zk-SNARKs ensure transaction privacy and verifiability without exposing data, crucial for Semaphore to allow anonymous group membership proofs.

In the development process, Semaphore logic is encoded into a zkApp using o1js, managing zero-knowledge proofs for user identities and group memberships. Merkle Trees prove membership anonymously, with each identity commitment added to a tree and the root stored on-chain. Users generate zk-SNARK proofs off-chain, verified on-chain by the Semaphore zkApp, ensuring anonymous, verifiable actions.

The project optimizes data storage and retrieval, maintaining a lightweight and fast zkApp regardless of user or transaction volume. It combines on-chain verification with off-chain proof generation to balance computational load and maintain privacy. Dynamic updates to Merkle Trees as members change ensure verifiable, consistent proofs.

Mina Protocol provides the infrastructure for a scalable blockchain solution, with zk-SNARKs essential for privacy. o1js and SnarkyJS simplify zero-knowledge proof development and blockchain interaction, enabling complex cryptographic operations in JavaScript.

background image mobile

Join the mailing list

Get the latest news and updates