Skip to main content

Crate voting_circuits

Crate voting_circuits 

Source
Expand description

Governance ZKP circuits for the Zally voting protocol.

Contains three circuits:

  • Delegation (ZKP #1): Proves delegation of voting rights.
  • Vote Proof (ZKP #2): Proves a valid, authorized vote.
  • Share Reveal (ZKP #3): Proves a revealed share belongs to a registered vote commitment.

Modules§

delegation
Delegation ZKP circuit.
share_reveal
Share Reveal ZKP circuit (ZKP #3).
vote_proof
Vote proof ZKP circuit (ZKP #2).

Enums§

ProveError
Error returned when Halo2 proof creation fails.

Constants§

VOTE_COMM_TREE_DEPTH
Depth of the Poseidon-based vote commitment tree. Shared by ZKP #2 (vote_proof) Merkle membership and ZKP #3 (share_reveal) Merkle membership.

Functions§

share_commitment
Native per-share blinded commitment:
shares_hash
Native full two-level shares hash:
shares_hash_from_comms
Native counterpart of [compute_shares_hash_from_comms_in_circuit].
spend_auth_g_affine
Returns the SpendAuthG generator point (used as G in El Gamal).