Free 30-min Web3 Consultation
Book Consultation
Smart Contract Security Audits
View Audit Services
Custom DeFi Protocol Development
Explore DeFi
Full-Stack Web3 dApp Development
View App Services
Free 30-min Web3 Consultation
Book Consultation
Smart Contract Security Audits
View Audit Services
Custom DeFi Protocol Development
Explore DeFi
Full-Stack Web3 dApp Development
View App Services
Free 30-min Web3 Consultation
Book Consultation
Smart Contract Security Audits
View Audit Services
Custom DeFi Protocol Development
Explore DeFi
Full-Stack Web3 dApp Development
View App Services
Free 30-min Web3 Consultation
Book Consultation
Smart Contract Security Audits
View Audit Services
Custom DeFi Protocol Development
Explore DeFi
Full-Stack Web3 dApp Development
View App Services
LABS
Glossary

Semaphore Protocol

A zero-knowledge protocol enabling anonymous signaling and group membership verification without revealing individual identities.
Chainscore © 2026
definition
PRIVACY PROTOCOL

What is Semaphore Protocol?

Semaphore is a zero-knowledge protocol for anonymous signaling and identity management on Ethereum, enabling users to prove membership in a group and send verifiable signals without revealing their personal identity.

The Semaphore Protocol is a privacy-preserving framework built on Ethereum that allows users to prove they are members of a specific group and send signals—such as votes, endorsements, or attestations—without revealing which member they are. It leverages zero-knowledge proofs (ZKPs), specifically zk-SNARKs, to generate cryptographic proofs of group membership and signal validity. This enables anonymous participation in decentralized applications (dApps) where identity must be verified but privacy is paramount, such as anonymous voting, decentralized anonymous organizations (DAOs), and privacy-focused reputation systems.

At its core, Semaphore manages identity commitments and nullifiers. Users generate a private identity and register a commitment to a Merkle tree, which represents the group. To send an anonymous signal, a user creates a zero-knowledge proof that demonstrates: 1) they possess a valid identity in the tree, 2) the signal is properly formatted, and 3) they have not already used this identity for the same purpose (via a unique nullifier). The proof is verified by a smart contract, which confirms its validity without learning anything about the prover's identity. This mechanism prevents double-signaling and Sybil attacks while preserving anonymity.

Key technical components include the Semaphore smart contracts for group management and verification, and client-side libraries for generating proofs. A common application is anonymous voting: members of a DAO can cast votes on proposals where the tally is public, but individual votes remain completely private. Other use cases include anonymous feedback systems, whistleblowing platforms, and private attestation networks. By decoupling proof of legitimacy from personal identity, Semaphore provides a critical privacy primitive for the decentralized web, enabling trustless systems where actions are verifiable but actors are not identifiable.

how-it-works
MECHANISM

How Does Semaphore Work?

An explanation of the core cryptographic and smart contract mechanisms that power the Semaphore privacy protocol for anonymous signaling on Ethereum.

The Semaphore protocol enables anonymous signaling by leveraging zero-knowledge proofs (ZKPs) and a decentralized identity commitment system. A user first generates a secret identity and publishes a cryptographic hash of it, called an identity commitment, to an on-chain smart contract. This commitment is added to a Merkle tree, which acts as a public, anonymous registry of members. To send a signal—such as a vote or endorsement—the user generates a zk-SNARK proof that cryptographically demonstrates three things without revealing their identity: they possess a valid secret corresponding to a leaf in the Merkle tree, the leaf is currently in the tree, and they have not already used this identity for the specific external nullifier (a unique identifier for the signal's context).

The protocol's core components are managed by a set of Semaphore smart contracts. The Semaphore.sol contract handles group management—storing identity commitments and maintaining the Merkle tree—while verifier contracts validate the submitted zk-SNARK proofs. When a user submits a valid proof and signal to the verifier contract, the contract checks the proof against a public verification key. If valid, it emits an event containing the signal and the external nullifier, completing the anonymous broadcast. This architecture ensures unlinkability; observers see a valid signal from a verified group member but cannot determine which specific member sent it, even the group administrator.

A critical mechanism for preventing double-signaling is the nullifier. For each signal context (defined by an external nullifier), a user derives a unique nullifier hash from their secret identity. This hash is published with the proof. The smart contract records it, preventing the same user from signaling twice in the same context, all while keeping their identity secret. This makes Semaphore ideal for use cases like anonymous voting (one vote per member), anonymous feedback, and whistleblowing within a designated, permissioned group.

Developers integrate Semaphore by deploying the contracts, managing group membership, and having users generate proofs client-side using libraries like @semaphore-protocol/proof. The protocol's flexibility allows the signal to be any arbitrary data, and the external nullifier to define any application-specific scope, enabling diverse applications from DAO governance to anonymous attestations on social media or credential systems, all inheriting Ethereum's security.

key-features
SEMAPHORE PROTOCOL

Key Features

Semaphore is a zero-knowledge protocol enabling anonymous signaling and identity proofs on Ethereum. Its core features provide the cryptographic primitives for private group membership and anonymous attestations.

01

Identity Commitment

A user's identity is represented by a cryptographic hash, or Identity Commitment, derived from their private identity secret and a random nullifier. This commitment is published to a smart contract's Identity Tree, a Merkle tree structure, to prove group membership without revealing the underlying identity.

02

Nullifier Hash

A unique, deterministic hash generated for each action (e.g., a vote or attestation). The Nullifier Hash prevents double-signaling within a group while preserving anonymity. The protocol ensures the same user cannot generate the same nullifier hash twice for the same external nullifier (the action context).

03

Zero-Knowledge Proof

The core privacy mechanism. To signal, a user generates a zk-SNARK proof that proves:

  • They possess a valid identity secret for a commitment in the current Merkle tree.
  • They correctly computed the nullifier hash.
  • They have not revealed their specific identity. The proof is verified on-chain, confirming valid group membership and action uniqueness with zero knowledge.
04

External Nullifier

A public identifier for a specific action or context (e.g., "Poll #123"). The External Nullifier is combined with a user's identity secret to generate the unique nullifier hash. This allows the same user to signal anonymously in multiple contexts (different external nullifiers) without being linkable across them.

05

Merkle Tree Management

Group membership is managed via an append-only Merkle tree (the Identity Tree) stored in a smart contract. Members can:

  • Register: Add their identity commitment as a new leaf.
  • Prove Membership: Generate a proof of inclusion for their leaf.
  • Update: The tree root is updated with each new member, requiring proofs to always reference the latest valid root.
06

Broadcast Signal

The final, anonymous action. A user broadcasts a signal (which can be arbitrary data or simply a presence proof) alongside their zero-knowledge proof and nullifier hash to a verifier contract. The contract verifies the proof and records the nullifier, enabling private voting, anonymous authentication, or reputation systems.

examples
SEMAPHORE PROTOCOL

Use Cases & Examples

Semaphore is a zero-knowledge gadget enabling anonymous signaling and identity aggregation on Ethereum. Its core use cases leverage its ability to prove group membership and send signals without revealing the prover's identity.

02

Privacy-Preserving Airdrops

Allows projects to distribute tokens to a set of eligible users (e.g., early contributors) without publicly linking wallet addresses to real-world identities or revealing the full recipient list. Users generate a Semaphore identity and prove membership in the Merkle tree of eligible addresses to claim tokens anonymously, preventing front-running and privacy leaks.

03

Anonymous Feedback & Signaling

Enables users within a group (e.g., employees, community members) to send verifiable signals—like attestations, reviews, or whistleblowing—without fear of reprisal. The signal (e.g., an on-chain message hash) is published, and a zk-SNARK proof confirms it came from a legitimate group member, protecting the sender's anonymity while ensuring the signal's authenticity.

05

Anonymous Authentication

Allows users to authenticate to applications (e.g., web2 services, gated content) by proving they belong to a specific group (like university alumni or NFT holders) without revealing which specific member they are. This provides selective disclosure, replacing traditional login systems with privacy-preserving, group-based credentials.

06

Related Concept: Semaphore Groups

The foundational data structure for all Semaphore use cases. A Semaphore group is an on-chain Merkle tree where each leaf is a commitment to a member's identity commitment (derived from their private identity). The group manager can add members, and any member can generate a zero-knowledge proof of membership against the latest Merkle root without revealing their leaf index.

technical-details
PRIVACY TECHNOLOGY

Semaphore Protocol

A zero-knowledge protocol enabling anonymous signaling and membership proofs on Ethereum, allowing users to prove membership in a group and send verifiable signals without revealing their identity.

The Semaphore Protocol is a privacy-preserving system built on Ethereum that allows users to prove membership in a group and send signals—such as votes, endorsements, or attestations—without revealing their specific identity. It leverages zero-knowledge proofs (ZKPs), specifically zk-SNARKs, to generate cryptographic proofs of group membership and action authorization. A user's identity is represented by a secret identity commitment, which is added to a Merkle tree representing the group. To signal, a user generates a zero-knowledge proof that demonstrates: (1) they possess a valid secret identity, (2) their identity is a leaf in the current group Merkle tree, and (3) they are generating a unique signal for a specific external nullifier (a context identifier, like a poll).

The core components of Semaphore include the identity commitment, the external nullifier, and the signal. The identity commitment is a public hash of a user's private identity keys. The external nullifier acts as a scope or topic for signals, preventing double-signaling within the same context. The signal is the arbitrary data being broadcast, which could be a vote, a message hash, or a simple boolean. The protocol's smart contracts manage the group Merkle tree and verify the submitted zk-SNARK proofs. This architecture ensures unlinkability: an observer cannot determine which group member sent a signal or link multiple signals from the same user across different contexts.

A primary use case for Semaphore is anonymous voting within decentralized autonomous organizations (DAOs). Members can join a voting group by submitting an identity commitment. When a proposal is created, it is assigned a unique external nullifier. Each member can then cast a private vote by submitting a zero-knowledge proof, ensuring the tally reflects legitimate member votes without exposing individual choices. Other applications include anonymous feedback systems, whistleblowing platforms, and privacy-preserving reputation systems where users need to prove a credential (e.g., "I am a verified customer") without exposing their account history.

Semaphore distinguishes itself from other privacy systems like Tornado Cash (which focuses on anonymous transactions) by specializing in anonymous signaling and attestation. It is designed to be a modular, reusable primitive. Developers can deploy their own Semaphore contracts or use existing instances to add privacy layers to their applications. The protocol's security relies on the soundness of the underlying zk-SNARK circuit and the trusted setup ceremony that generated its proving and verification keys. As a foundational privacy primitive, Semaphore enables a new class of applications where trust and verification are required, but public identity linkage is undesirable.

ecosystem-usage
SEMAPHORE PROTOCOL

Ecosystem & Adoption

Semaphore is a zero-knowledge protocol enabling anonymous signaling and identity proofs on Ethereum. It allows users to prove membership in a group and send signals (e.g., votes, endorsements) without revealing their specific identity.

01

Core Mechanism: Anonymous Group Membership

Semaphore's foundation is its ability to manage anonymous group membership. Users generate a zero-knowledge proof to demonstrate they belong to a specific group (like a DAO or a voting pool) without revealing which member they are. This is achieved through a Merkle tree where each leaf is a member's identity commitment. The proof verifies the prover knows a valid secret for one of the leaves, preserving anonymity.

02

Primary Use Case: Private Voting

The most prominent application of Semaphore is private, on-chain voting. It enables systems where:

  • Voters prove they are eligible members of a group.
  • They cast a vote (the "signal")—such as a yes/no ballot or a governance proposal selection.
  • The vote is recorded on-chain, but the link between the voter's real identity and their vote is cryptographically severed.
  • This prevents bribery and coercion while ensuring verifiable, tamper-proof results.
03

Key Technical Components

The protocol is built from several cryptographic primitives:

  • Identity Commitment: A user's public identity, derived from a private identity nullifier and trapdoor.
  • Merkle Tree: Stores identity commitments; the root acts as the public group identifier.
  • Nullifier Hash: A unique hash generated for each signal, preventing double-signaling (e.g., double-voting) while keeping the actor anonymous.
  • Zero-Knowledge Proof (zk-SNARK): Generates the proof of group membership and correct signal/nullifier computation.
05

Ethereum Integration & Tooling

Semaphore is designed as a set of Ethereum smart contracts and circuit libraries. Developers use:

  • Semaphore.sol: The core contract for managing groups and verifying proofs.
  • @semaphore-protocol JavaScript/TypeScript libraries for client-side proof generation.
  • Circom circuits that define the logic for the zero-knowledge proofs. This stack allows developers to embed anonymous signaling into dApps without building the cryptography from scratch.
06

Limitations & Considerations

While powerful, the protocol has specific constraints:

  • Gas Costs: Verifying zk-SNARKs on-chain incurs gas fees, though these are relatively constant.
  • Group Management: Adding/removing members requires updating the Merkle tree, which can be gas-intensive for large, dynamic groups.
  • Trusted Setup: The original circuits required a trusted setup ceremony, introducing a potential trust assumption (though this is common in zk-SNARK systems).
  • Signal Scope: It proves membership and a signal, but not the content of complex logic about that signal.
security-considerations
SEMAPHORE PROTOCOL

Security & Privacy Considerations

Semaphore is a zero-knowledge protocol enabling anonymous signaling and identity proofs on Ethereum. Its security and privacy guarantees are built upon cryptographic primitives and a decentralized trust model.

01

Zero-Knowledge Proofs

The core privacy mechanism uses zk-SNARKs (Zero-Knowledge Succinct Non-Interactive Arguments of Knowledge). A user can prove they are a member of a group and have performed an action (e.g., voted or sent a signal) without revealing their specific identity within the group. This provides strong anonymity and unlinkability between actions.

02

Identity Commitment & Nullifiers

User identity is represented by a cryptographic commitment (e.g., hash(identityNullifier, identityTrapdoor)). To signal, a user generates a nullifier hash from their secret nullifier and the external nullifier (e.g., a poll ID). This prevents double-signaling in the same context while keeping the user's core identity secret. The system ensures unforgeability of group membership proofs.

03

Trusted Setup Ceremony

The zk-SNARK circuits require a trusted setup to generate proving and verification keys. A malicious setup could compromise privacy. Semaphore and related applications typically use ceremonies (like the Perpetual Powers of Tau) with multiple participants to decentralize trust. The security assumption is that at least one participant was honest and destroyed their toxic waste.

04

On-Chain Verification & Gas Costs

Privacy comes with computational cost. Verifying a Semaphore proof on-chain requires a fixed gas cost for the elliptic curve pairing operations. While efficient for a zk-SNARK, this cost must be factored into application design. The public verification key is stored on-chain, and anyone can verify a proof's validity against the correct group.

05

Group Management & Sybil Resistance

Semaphore provides anonymity within a set, but does not inherently define group membership. The security of the application depends on how the group (merkle tree) is managed:

  • Permissioned Groups: A central administrator adds members, creating a trust assumption.
  • Permissionless Groups: Members join via a token or proof-of-personhood, requiring external Sybil resistance mechanisms (like Proof of Humanity).
06

Relayer Privacy & Censorship

To hide a user's Ethereum address, transactions can be submitted by a relayer. This introduces considerations:

  • Meta-Transaction Privacy: The relayer sees the proof data but not the user's identity.
  • Censorship Risk: A relayer could refuse to submit a valid proof.
  • Payment for Gas: Users must pay relayers, often via stealth addresses or other privacy-preserving payment channels to avoid linking payments to actions.
ANONYMITY SETS

Comparison with Related Protocols

A technical comparison of zero-knowledge proof protocols for anonymous signaling and group membership.

Feature / MetricSemaphoreTornado Cashzk-SNARKs (Generic)

Primary Use Case

Anonymous signaling & group membership

Private token transfers

General-purpose computation

Anonymity Set Structure

Persistent, managed Merkle tree

Ephemeral, fixed-size pools

N/A (circuit-dependent)

Identity Linkage Prevention

âś… Full dissociation

âś… Full dissociation

Depends on circuit design

Selective Disclosure

âś… Via external nullifier

❌ Not applicable

âś… Via proof statements

Gas Cost (approx. verification)

< 200k gas

~500k gas

~450k - 1M+ gas

Trusted Setup Required

âś… Per group (circuit)

âś… Universal (original pools)

âś… Per circuit

Native Support for Batching

âś… (via Merkle tree updates)

❌

❌ (circuit-specific)

etymology-history
PROTOCOL ORIGINS

Etymology & History

The Semaphore protocol, a cornerstone of privacy in decentralized systems, derives its name and core concept from a classic method of secure communication.

The Semaphore protocol is named after the historical flag-based signaling system used for long-distance communication. In that system, a sender's identity was obscured, with only the message's content being legible to the receiver. This metaphor perfectly encapsulates the protocol's primary function in the blockchain context: enabling users to broadcast a signal—such as a vote or endorsement—while cryptographically proving their membership in a group without revealing their individual identity. The core innovation, zero-knowledge proofs (ZKPs), allows a user to generate a proof of valid group membership and signal, which is then verified on-chain without disclosing which specific member created it.

The protocol was first introduced in a 2019 research paper by Barry Whitehat, Kobi Gurkan, and Koh Wei Jie. Its development was significantly advanced by the Privacy & Scaling Explorations (PSE) team at the Ethereum Foundation, which has been instrumental in refining its cryptography and implementing practical applications. Semaphore represents a critical evolution from simpler privacy coins, focusing instead on providing selective disclosure and anonymous authentication for arbitrary signals within defined groups, making it a versatile primitive for decentralized applications (dApps) rather than just a transaction-hiding mechanism.

A major milestone in its history was the deployment of Semaphore's smart contracts on the Ethereum mainnet, providing a public good for developers. This established it as a foundational privacy layer upon which various applications could be built. Its architecture is built around a Merkle tree of identity commitments, where users can prove membership by demonstrating knowledge of a secret corresponding to a leaf in this tree. The protocol's design is chain-agnostic, with implementations and communities forming around networks like Gnosis Chain and zkSync, further expanding its utility beyond its Ethereum roots.

The historical trajectory of Semaphore showcases the shift in blockchain privacy from obfuscating financial flows to enabling trustless, anonymous participation in decentralized governance, credential systems, and social networks. Its development continues to be driven by both academic research and real-world testing through applications like anonymous voting platforms and decentralized anonymous reputation systems, cementing its role as a key infrastructure for privacy-preserving Web3.

SEMAPHORE PROTOCOL

Frequently Asked Questions

Semaphore is a zero-knowledge protocol for anonymous signaling and group membership on Ethereum. This FAQ addresses common technical questions about its architecture, use cases, and implementation.

Semaphore is a zero-knowledge (ZK) protocol that enables users to prove membership in a group and send signals (e.g., votes, endorsements) without revealing their individual identity. It is a foundational privacy primitive built on Ethereum, allowing for anonymous participation in decentralized applications. The core mechanism involves users generating a zero-knowledge proof (specifically a zk-SNARK) that cryptographically demonstrates two things: 1) they possess a valid secret identity credential for a specific group, and 2) they have not used that credential to send a signal before (preventing double-signaling). This proof is verified by a smart contract, which accepts the anonymous action without learning who performed it.

further-reading
SEMAPHORE PROTOCOL

Further Reading

Explore the core components, related technologies, and practical applications of the Semaphore zero-knowledge privacy protocol.

04

Nullifier & Double-Signaling Prevention

To prevent a single identity from signaling multiple times for the same purpose (e.g., voting twice), Semaphore uses a nullifier. This is a unique hash generated from the user's secret and the specific external Nullifier Hash.

  • Function: The nullifier is published on-chain with the proof. If the same nullifier appears twice for the same context, the second proof is rejected.
  • Key Property: The nullifier reveals nothing about the user's identity but is deterministic for a given action, enabling Sybil resistance within a specific application context.
05

Related Protocol: Tornado Cash

Tornado Cash is a privacy solution for anonymizing Ethereum transactions, while Semaphore is a generalized signaling framework. Both use zk-SNARKs but for different purposes.

  • Tornado Cash: Focuses on breaking the on-chain link between deposit and withdrawal addresses for transaction privacy.
  • Semaphore: Focuses on proving group membership and broadcasting anonymous signals or votes, enabling identity privacy and anonymous authentication.
ENQUIRY

Get In Touch
today.

Our experts will offer a free quote and a 30min call to discuss your project.

NDA Protected
24h Response
Directly to Engineering Team
10+
Protocols Shipped
$20M+
TVL Overall
NDA Protected Directly to Engineering Team
Semaphore Protocol: Anonymous Signaling on Blockchain | ChainScore Glossary