{"id":20194805,"url":"https://github.com/reilabs/gnark-lean-demo","last_synced_at":"2026-03-07T05:32:58.781Z","repository":{"id":185313116,"uuid":"667372710","full_name":"reilabs/gnark-lean-demo","owner":"reilabs","description":"Verification of the gnark implementation of the Semaphore protocol using Reilabs' extractor to Lean.","archived":false,"fork":false,"pushed_at":"2024-03-03T23:36:35.000Z","size":114,"stargazers_count":14,"open_issues_count":2,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-03T07:45:52.477Z","etag":null,"topics":["formal-verification","gnark","lean","lean4","zero-knowledge"],"latest_commit_sha":null,"homepage":"https://reilabs.io","language":"Lean","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/reilabs.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-07-17T11:03:29.000Z","updated_at":"2024-08-02T12:14:24.000Z","dependencies_parsed_at":"2024-03-04T00:29:03.029Z","dependency_job_id":"e69b91db-3e2a-4fc5-843c-186dfb284e16","html_url":"https://github.com/reilabs/gnark-lean-demo","commit_stats":null,"previous_names":["reilabs/gnark-lean-demo"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/reilabs/gnark-lean-demo","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/reilabs%2Fgnark-lean-demo","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/reilabs%2Fgnark-lean-demo/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/reilabs%2Fgnark-lean-demo/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/reilabs%2Fgnark-lean-demo/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/reilabs","download_url":"https://codeload.github.com/reilabs/gnark-lean-demo/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/reilabs%2Fgnark-lean-demo/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30208731,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-07T05:23:27.321Z","status":"ssl_error","status_checked_at":"2026-03-07T05:00:17.256Z","response_time":53,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["formal-verification","gnark","lean","lean4","zero-knowledge"],"created_at":"2024-11-14T04:14:20.385Z","updated_at":"2026-03-07T05:32:58.699Z","avatar_url":"https://github.com/reilabs.png","language":"Lean","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003ca href=\"https://reilabs.io\"\u003e\n\u003cpicture\u003e\n  \u003csource width=\"150\" media=\"(prefers-color-scheme: dark)\" srcset=\"https://github.com/reilabs/gnark-lean-extractor/assets/35899/c04bdb7f-4c31-4264-acb6-a96f32c6cc29\"\u003e\n  \u003csource width=\"150\" media=\"(prefers-color-scheme: light)\" srcset=\"https://github.com/reilabs/gnark-lean-extractor/assets/35899/fc11280b-e3e5-4a6f-83da-788884083c36\"\u003e\n  \u003cimg width=\"150\" src=\"https://github.com/reilabs/gnark-lean-extractor/assets/35899/fc11280b-e3e5-4a6f-83da-788884083c36\"\u003e\n\u003c/picture\u003e\n\u003c/a\u003e\n\n# Formal Verification of Gnark Circuits\n\nThis repository contains an example of using Reilabs'\n[gnark-lean-extractor](https://github.com/reilabs/gnark-lean-extractor) library\nto prove the correctness of a [gnark](https://github.com/ConsenSys/gnark)\nreimplementation of the circuits necessary to implement and operate the\n[Semaphore](https://semaphore.appliedzkp.org) protocol.\n\nUnder the hood, this repository makes heavy use of Reilabs'\n[proven-zk](https://github.com/reilabs/proven-zk) library. It is a\n[lean](https://leanprover.github.io) library to aid in the formal verification\nof circuits produced by the extractor.\n\nFor guidelines on how to build these things for yourself, or to contribute to\nthe repository, see our [contributing guide](./CONTRIBUTING.md). It also\ncontains a guide to the structure of the repository.\n\n## Verified Properties\n\nThe [main lean file](lean-circuit/Main.lean) contains formulations and\naccompanying proofs of the following properties for the circuit.\n\n1. **Poseidon Equivalence:** The equivalence of the\n   [Poseidon hash implementation](./go-circuit/poseidon.go) to an\n   [implementation](./lean-circuit/LeanCircuit/Poseidon/Spec.lean) very closely\n   based on the Poseidon\n   [reference implementation](https://extgit.iaik.tugraz.at/krypto/hadeshash).\n2. **No Censorship:** A proof, given knowledge of secrets relating to\n   an identity and that the identity commitment being included in the tree, that\n   it is _always_ possible to generate a valid proof.\n3. **No Double Signalling:** A proof that any attempt to signal twice using the\n   same identity commitment will result in the equality of the corresponding\n   nullifier hashes.\n4. **No Unauthorized Signalling:** A proof that it is not possible to have the\n   circuit accept a proof where the identity commitment generating that proof is\n   not already included in the tree of identity commitments.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Freilabs%2Fgnark-lean-demo","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Freilabs%2Fgnark-lean-demo","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Freilabs%2Fgnark-lean-demo/lists"}