Skip to content

Verification of the gnark implementation of the Semaphore protocol using Reilabs' extractor to Lean.

License

Notifications You must be signed in to change notification settings

reilabs/gnark-lean-demo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

33 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Formal Verification of Gnark Circuits

This repository contains an example of using Reilabs' gnark-lean-extractor library to prove the correctness of a gnark reimplementation of the circuits necessary to implement and operate the Semaphore protocol.

Under the hood, this repository makes heavy use of Reilabs' proven-zk library. It is a lean library to aid in the formal verification of circuits produced by the extractor.

For guidelines on how to build these things for yourself, or to contribute to the repository, see our contributing guide. It also contains a guide to the structure of the repository.

Verified Properties

The main lean file contains formulations and accompanying proofs of the following properties for the circuit.

  1. Poseidon Equivalence: The equivalence of the Poseidon hash implementation to an implementation very closely based on the Poseidon reference implementation.
  2. No Censorship: A proof, given knowledge of secrets relating to an identity and that the identity commitment being included in the tree, that it is always possible to generate a valid proof.
  3. No Double Signalling: A proof that any attempt to signal twice using the same identity commitment will result in the equality of the corresponding nullifier hashes.
  4. No Unauthorized Signalling: A proof that it is not possible to have the circuit accept a proof where the identity commitment generating that proof is not already included in the tree of identity commitments.

About

Verification of the gnark implementation of the Semaphore protocol using Reilabs' extractor to Lean.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •  

Languages