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

Semaphore is a zero-knowledge gadget that allows users to prove membership in a group and send signals, such as votes, without revealing their specific identity within the group.
Chainscore © 2026
definition
ZERO-KNOWLEDGE PROOF PROTOCOL

What is Semaphore?

Semaphore is a decentralized protocol that enables users to prove membership in a group and send signals—such as votes or endorsements—without revealing their specific identity.

Semaphore is a zero-knowledge proof protocol built on Ethereum that allows users to prove they are a member of a specific group and can send a signal (e.g., a vote or attestation) without revealing which member they are. It provides anonymous authentication by leveraging zk-SNARKs (Zero-Knowledge Succinct Non-Interactive Arguments of Knowledge). The core mechanism involves users generating a secret identity and registering a commitment to it in an on-chain Merkle tree, which defines the group. To signal, a user generates a proof that they possess a valid secret for a leaf in that tree, without disclosing the leaf's index.

The protocol's architecture is built around three main components: the identity (a user's private key pair), the group (a Merkle tree of identity commitments), and the signal (the anonymous message or vote). A user's ability to generate a valid proof depends on their knowledge of a secret and their inclusion in the latest state of the tree. This allows for selective disclosure: a user can prove group membership and the validity of a signal, while maintaining unlinkability between their on-chain actions and their off-chain identity.

Key applications of Semaphore include private voting in DAOs, anonymous attestation systems (like proving humanity without doxxing), and privacy-preserving reputation. For example, a DAO could use it to allow token holders to vote on proposals anonymously, preventing bribery and coercion because votes cannot be traced to specific wallets. Its design also supports external nullifiers, which prevent double-signaling in a specific context, such as voting twice in the same poll.

Developers integrate Semaphore via its circuit—a pre-defined zk-SNARK logic that verifies Merkle tree membership and signal validity. Teams like Privacy Pools and Unirep have built upon its foundation. While initially deployed on Ethereum, its trustless setup and circuit design are chain-agnostic, enabling deployment on other EVM-compatible networks. The protocol represents a fundamental primitive for constructing privacy layers in public, transparent blockchain ecosystems.

how-it-works
MECHANISM

How Does Semaphore Work?

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

Semaphore operates by enabling users to join a Merkle tree-based group as an anonymous member. Each user generates a zero-knowledge proof (ZKP) using their private identity commitment. This proof cryptographically demonstrates two things: that the user is a valid member of the known group, and that they have not already used their identity for this specific action (preventing double-signaling). The proof reveals no information about which member they are.

The core technical components are the Identity Commitment, the External Nullifier, and the Signal. A user's identity is represented by a hash of a secret and a public key. The External Nullifier defines the context of an action (e.g., a specific poll or forum), ensuring proofs are bound to that context. The Signal is the arbitrary data or message being broadcast, such as a vote or attestation. The ZKP links these elements together without exposing the underlying identity.

To verify a proof, a smart contract, known as the Semaphore verifier contract, checks the proof's validity against the public parameters: the root of the group's Merkle tree and the External Nullifier. If valid, the contract accepts the signal. This allows for trustless, anonymous voting systems, anonymous feedback, and privacy-preserving reputation systems where participation is proven without individual identification.

A key innovation is the use of incremental Merkle trees, which allow for efficient, on-chain management of group membership. New members can be added without rebuilding the entire tree, and the contract only needs to store the latest root. This makes the system scalable for large, dynamic groups where members may join over time, a common requirement for decentralized applications.

In practice, developers integrate Semaphore by deploying its verifier contract and managing group membership off-chain or via a relayer. Users generate their proofs client-side using libraries like @semaphore-protocol/proof. This architecture ensures the user's anonymity is preserved from the application itself, as the dApp only ever sees the anonymous proof and signal, never the user's original identity credentials.

key-features
SEMAPHORE

Key Features

Semaphore is a zero-knowledge protocol for creating anonymous signaling and identity systems on Ethereum. Its core features enable private group membership and anonymous proof of membership.

01

Zero-Knowledge Group Membership

Semaphore allows users to prove they are a member of a group without revealing their specific identity. This is achieved using zero-knowledge proofs (ZKPs). A user can generate a proof that they possess a valid identity commitment registered in the group's Merkle tree, while keeping their underlying identity secret.

02

Anonymous Signaling

The protocol enables anonymous signaling, where a group member can broadcast a vote, endorsement, or attestation (a "signal") without being linked to their identity. The proof verifies two things: 1) The sender is a valid group member, and 2) The signal is linked to that specific proof, preventing double-signaling.

03

Identity & Commitment Scheme

A user's identity is a private tuple: (identityNullifier, identityTrapdoor, identityCommitment). The public identity commitment is stored in the group's Merkle tree. The private keys (nullifier and trapdoor) are used to generate proofs and create a unique nullifier hash for specific actions, enabling privacy-preserving Sybil resistance.

04

Merkle Tree Management

Group membership is managed via an incremental Merkle tree. Each leaf is a member's identity commitment. The tree's root represents the current state of the group. Adding or removing members updates the root. Proofs are generated relative to this root, allowing for efficient verification on-chain.

05

External Nullifier & Uniqueness

To prevent a user from signaling multiple times in the same context, Semaphore uses an external nullifier. This is a public identifier for a specific poll or action. Combined with the user's private identityNullifier, it generates a unique nullifier hash. If the same hash appears twice, it proves double-signaling.

06

On-Chain & Off-Chain Verification

Semaphore proofs are verified using a verification key and a verifying contract. The heavy computation of proof generation happens off-chain. The lightweight proof verification occurs on-chain, making it gas-efficient. This separation is critical for scalability and usability in dApps.

core-components
SEMAPHORE

Core Components

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

01

Identity Commitment

The core cryptographic element of Semaphore is the Identity Commitment. Each user generates a secret identity (a private key) and publishes a one-way hash of it to a smart contract. This commitment acts as a pseudonymous identifier within a group, allowing users to prove membership without linking the commitment back to their off-chain identity.

02

Nullifier

A Nullifier is a unique hash generated for each action (or 'signal') a user makes. Its primary function is to prevent double-signaling—ensuring a single group member cannot vote twice or perform the same action more than once. The nullifier is derived from the user's secret and the specific context of the action, making it verifiably unique without revealing who produced it.

03

Zero-Knowledge Proof (zk-SNARK)

Semaphore uses zk-SNARKs (Zero-Knowledge Succinct Non-Interactive Arguments of Knowledge) as its proving mechanism. A user generates a proof that demonstrates:

  • They possess a valid secret identity for an existing Identity Commitment in the group's Merkle tree.
  • They correctly computed the Nullifier for this specific action.
  • They have not revealed their identity. The proof is verified on-chain, confirming the statement's truth without exposing any underlying private data.
04

Merkle Tree & Group Management

Group membership is managed via an on-chain Merkle tree, where each leaf is a member's Identity Commitment. The tree's root serves as the public, concise representation of the entire group. Users can join by adding their commitment, and the smart contract updates the root. To generate a proof, a user must provide the Merkle path (siblings) proving their commitment is part of the current root, enabling efficient verification of membership.

05

External Nullifier & Signal

These two components define the context and content of an action.

  • External Nullifier: A public identifier for a specific polling event or context (e.g., "Proposal #5 Vote"). It ensures nullifiers are scoped, so a user can vote in multiple polls without conflict.
  • Signal: The arbitrary data being broadcast anonymously, such as a vote (e.g., "1" for yes), an endorsement, or a message. The signal is hashed and included in the proof generation.
06

Verifier Contract

The Verifier Contract is a smart contract containing the zk-SNARK verification key. Its sole function is to verify the cryptographic proof submitted by a user. It checks that the proof is valid for the given public inputs: the current Merkle root, the nullifier, the external nullifier, and the signal hash. If verification passes, the contract can execute a trusted action (like recording a vote) based on this anonymous, valid signal.

primary-use-cases
SEMAPHORE

Primary Use Cases

Semaphore is a zero-knowledge protocol enabling anonymous signaling and identity proofs on Ethereum. Its core applications leverage its ability to prove group membership and generate anonymous votes or endorsements without revealing the prover's identity.

01

Anonymous Voting

Enables private, sybil-resistant governance where users can prove they are a member of a DAO or token-holder group and cast a vote without revealing their identity or how they voted. This protects voter privacy and prevents coercion.

  • Key Mechanism: Uses a nullifier to prevent double-voting while keeping the voter's identity secret.
  • Example: A DAO can conduct a sensitive treasury allocation vote where members' choices remain confidential.
02

Privacy-Preserving Airdrops

Allows projects to distribute tokens or NFTs to a verified group (e.g., early users) while recipients can claim them anonymously. Users prove they are on the eligibility list without linking their claim transaction to their original identity.

  • Prevents: Chain analysis that could deanonymize wealth or activity.
  • Benefit: Separates proof of past action from current on-chain identity.
03

Anonymous Authentication

Websites or applications can grant access or features to users who prove membership in a group (e.g., "holders of a specific NFT") without requiring them to connect a wallet that would reveal their entire asset portfolio.

  • Use Case: Gated content for a subscriber group where anonymity among members is desired.
  • Technology: Relies on generating a zero-knowledge proof of group membership.
04

Whistleblowing & Feedback

Provides a secure channel for members of an organization to submit verifiable feedback or reports. The system can prove the submitter is a legitimate employee or member, but the submission is untraceable to their individual identity.

  • Guarantees: Authenticity of source (is a member) with anonymity of the actor.
  • Application: Internal DAO reporting mechanisms or anonymous suggestion boxes.
05

Reputation & Anonymous Endorsements

Users can build a private reputation by accumulating Semaphore signals (e.g., positive reviews, completions) linked to their anonymous identity. They can later prove a reputation score or history of actions without exposing the details of each action.

  • Core Concept: Decouples identity from verifiable credentials.
  • Example: Proving you have completed 50 tasks on a platform without revealing which specific tasks.
06

Mixers & Privacy Pools

Serves as a foundational primitive for privacy pools or mixer alternatives. Users can prove they have "clean" funds (e.g., not from a known hack) and deposit them into a pool, then withdraw to a new address with broken on-chain links, all while providing a compliance-friendly proof.

  • Advantage over traditional mixers: Can include exclusion proofs to blacklist illicit funds.
ANONYMITY SETS

Comparison with Related Concepts

How Semaphore's privacy mechanism compares to other zero-knowledge and cryptographic privacy schemes.

FeatureSemaphoreTornado Cashzk-SNARKs (General)Ring Signatures

Primary Purpose

Anonymous signaling & voting

Private token transfers

General-purpose proof generation

Untraceable transactions

Core Mechanism

ZK proofs of Merkle tree membership

ZK proofs of deposit/withdrawal

Succinct non-interactive arguments

Ring of possible signers

Anonymity Set

Dynamic, global, and unbounded

Fixed per pool (e.g., 100 ETH)

Defined by circuit constraints

Fixed ring size (e.g., 11)

Linkability Prevention

Nullifier prevents double-signaling

Nullifier prevents double-spend

Application-specific

Possible with repeated key use

On-Chain Verification Cost

~500k gas

~450k gas

~300k - 1M+ gas

< 100k gas

Requires Trusted Setup?

Supports Arbitrary Data?

ecosystem-usage
SEMAPHORE

Ecosystem Usage

Semaphore is a zero-knowledge protocol enabling anonymous signaling and identity proofs on Ethereum. Its primary use cases center on private voting, anonymous authentication, and reputation systems without revealing user identity.

security-considerations
SEMAPHORE

Security & Trust Assumptions

Semaphore is a zero-knowledge protocol for anonymous signaling and identity in decentralized applications. Its security model relies on cryptographic primitives and specific trust assumptions.

01

Core Cryptographic Primitives

Semaphore's security is built on zero-knowledge proofs (ZKPs), specifically zk-SNARKs, and Merkle tree accumulators. The protocol uses a decentralized identity commitment tree where users prove membership and generate a signal proof without revealing their identity. The soundness of the system depends on the computational hardness of the underlying cryptographic assumptions, such as the discrete logarithm problem.

02

Trusted Setup Ceremony

A critical trust assumption is the secure generation of the zk-SNARK proving and verification keys via a trusted setup ceremony (e.g., the Perpetual Powers of Tau). If this ceremony is compromised, an adversary could generate false proofs. The protocol mitigates this by using a multi-party computation (MPC) ceremony with many participants, where only one honest participant is needed for security, making it 'trust-minimized' but not trustless.

03

Identity & Nullifier Security

User anonymity relies on the secrecy of the identity nullifier and identity trapdoor. If these are leaked, an identity can be de-anonymized. The protocol ensures:

  • Unlinkability: Different signals from the same user cannot be linked.
  • Double-signaling prevention: A user cannot vote twice in a poll, enforced by the public nullifier hash.
  • Selective disclosure: Users can optionally reveal their identity with a nullifier for specific applications.
04

External Dependencies & Oracles

Applications built with Semaphore often depend on external data or services, introducing additional trust vectors. For example:

  • Group Management: Trust in the entity that adds/removes members from the Merkle tree (could be a smart contract or a committee).
  • Data Feeds: If a proof verifies off-chain data (e.g., "prove you are a citizen"), trust in the oracle or attestation service is required.
  • Relayer Networks: To preserve privacy, users may rely on third-party relayers to pay gas fees, trusting them not to censor transactions.
05

Smart Contract & Blockchain Risks

The on-chain Verifier contract is a critical component. Its security depends on:

  • Correct implementation: Bugs in the verification logic could accept invalid proofs.
  • Upgradability: If the contract is upgradeable, trust in the upgrade mechanism (e.g., a multisig) is required.
  • Blockchain consensus: The protocol inherits the security of the underlying blockchain (e.g., Ethereum) for finality and censorship resistance.
06

Practical Attack Vectors

Beyond cryptography, real-world deployments face other risks:

  • Sybil Attacks: While identities are anonymous, cheap identity creation can spam a system. This is mitigated by requiring proof of personhood or stake to join a group.
  • Timing & Metadata Analysis: Network-level metadata or the timing of transactions could be used for correlation attacks.
  • Front-running: In blockchain applications, a malicious actor could observe a pending anonymous transaction and front-run it with their own.
SEMAPHORE

Common Misconceptions

Semaphore is a zero-knowledge gadget for anonymous signaling on Ethereum, but its capabilities and limitations are often misunderstood. This section clarifies frequent points of confusion.

No, Semaphore is not a private messaging application. It is a zero-knowledge proof protocol and a set of smart contracts that enables users to prove membership in a group and send signals (like votes or endorsements) without revealing their individual identity. The "signal" is a generic piece of data, often just a hash, that is broadcast on-chain. While this can conceptually represent a message, Semaphore provides anonymity and privacy for the sender's identity within a group, not end-to-end encryption for message content. Building a full messaging layer requires additional application logic on top of the core Semaphore protocol.

SEMAPHORE

Frequently Asked Questions

Common questions about Semaphore, a zero-knowledge protocol for anonymous signaling and identity on Ethereum.

Semaphore is a zero-knowledge protocol that enables users to prove membership in a group and send signals (like votes or endorsements) without revealing their specific identity. It works by allowing users to generate a zero-knowledge proof that attests to two facts: 1) they possess a valid secret identity credential for a specific Semaphore group, and 2) they have not used this credential to send a signal before (preventing double-signaling). The proof is verified by a smart contract, which records the signal while preserving the user's anonymity within the group.

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