Skip to content

A set of custom circuits writted in Gnark that are required to support anonymous voting on Vocdoni.

License

Notifications You must be signed in to change notification settings

vocdoni/gnark-crypto-primitives

Repository files navigation

Vocdoni Gnark Crypto Primitives

A set of custom circuits writted in Gnark that are required to support anonymous voting on Vocdoni.

Libs included

  1. Hash Poseidon (source code).
  2. SMT Verifier port from @iden3/circomlib (source code).
  3. Arbo (by @arnaucube) proof checker from @vocdoni/arbo (source code)
    • This is compatible with the SMT Verifier.
  4. Homomorphic Addition (using point reduction of TwistedEdwards curve to transform circom BabyJubJub points into Gnark BabyJubJub points) (source code) (helpers source code)
  5. Address derivation from ECDSA public key (hash the key coords with Keccak256 and take the last 20 bytes) (source code).

SMT Verifier vs. Arbo

SMT Verifier Arbo
Inputs 4 5
Constrains 42316 41373 (🏆)
Solver time 169.192292ms (🏆) 211.738333ms

DISCLAIMER

This repository provides proof-of-concept implementations. These implementations are for demonstration purposes only. These circuits are not audited, and this is not intended to be used as a library for production-grade applications.

About

A set of custom circuits writted in Gnark that are required to support anonymous voting on Vocdoni.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages