Skip to content

Semaphore

Semaphore is an open-source zero-knowledge protocol from Ethereum's PSE team. It lets users prove membership in a group and send a signal, such as a vote, without revealing which member they are.

Overview

Semaphore is a building block for developers, not an end-user app. It answers one question privately: “is this person a member of this group?” A user can cast a vote, post an endorsement or claim something on behalf of a group, and others can verify the action came from some member without learning which one. A built-in nullifier stops the same member from signaling twice in the same context.

It is developed under Privacy & Scaling Explorations (PSE), the Ethereum Foundation-supported research team. The current major version is Semaphore V4. Its specification is published in the zkspecs repository. Use cases named in the docs include private voting, whistleblowing, anonymous DAOs and mixers. The project site lists apps built on it, such as Bandada for managing anonymous groups.

Semaphore contracts are deployed on Ethereum mainnet and on Arbitrum, Optimism, Base, Polygon, Linea and Gnosis, plus their testnets.

Key features

  • Semaphore identities — a user-held secret from which a public identity commitment is derived.
  • Groups as Merkle trees — identity commitments are added to onchain or offchain groups, and anyone can create a group.
  • Anonymous proofs — a zero-knowledge proof shows membership in a group and binds a message to it.
  • Double-signal prevention — nullifiers tied to a scope, such as a poll ID, reject a second signal from the same identity.
  • Modular stack — Circom circuits, Solidity contracts for groups and verification, JavaScript libraries, a CLI and a subgraph.
  • Audited releases — v2.0 and v4.0 were audited by PSE’s security team, v3.0 by Veridise, and the original version by ABDK.

How the privacy works

A user creates an identity and publishes only its commitment, which gets added to a group’s Merkle tree. To signal, the user proves in zero knowledge that they know the secret behind one of the tree’s leaves, without saying which leaf. The proof also outputs a nullifier, computed from the identity secret and the scope. The nullifier is the same every time that identity signals in that scope, so duplicates are caught, but it cannot be linked back to the commitment. Verification runs offchain in JavaScript or onchain in the Semaphore contract.

Trade-offs and things to know

  • Anonymity set = group size — a proof hides you only among the group’s members. Small groups give weak privacy.
  • Membership itself is visible — who was added to a group is often public, even if their signals are not.
  • Transaction senders can leak identity — if you submit the proof onchain from your own address, the transaction links you to the signal. Apps usually need a relayer.
  • Developer effort — Semaphore is a library. Group management, relaying and the user interface are up to the app.

Getting started

Install the CLI and scaffold a project with the getting-started guide at docs.semaphore.pse.dev, or add the JavaScript packages to an existing app. Create identities, add their commitments to a group, then generate and verify proofs offchain or against the deployed Semaphore contract on your chosen network.

Sources and audits

Primary sources: official website, documentation and source code. Checked against these on . How we review listings.

Mechanism notes

ZK proofs

Hides: Inputs to a statement, such as amounts, balances or which note you spend, while still proving the rules were followed.

You trust: Cryptography; some proof systems also need a trusted setup ceremony.

Read the guide

Impersonators are common. Check links against the official website before connecting a wallet.

Alternatives to Semaphore

All 6 in private identity