Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/vocdoni/zk-franchise-proof-circuit
zk-Snarks circuit for franchise proof
https://github.com/vocdoni/zk-franchise-proof-circuit
Last synced: about 1 month ago
JSON representation
zk-Snarks circuit for franchise proof
- Host: GitHub
- URL: https://github.com/vocdoni/zk-franchise-proof-circuit
- Owner: vocdoni
- License: lgpl-2.1
- Created: 2020-11-19T08:33:33.000Z (about 4 years ago)
- Default Branch: master
- Last Pushed: 2023-12-05T09:47:25.000Z (about 1 year ago)
- Last Synced: 2024-08-03T08:02:37.540Z (4 months ago)
- Language: TypeScript
- Size: 178 MB
- Stars: 12
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-circom - vocdoni/zk-franchise-proof-circuit - Census proof anonymous voting circuit (Projects using Circom / Cryptographic primitives in other languages)
README
# ZKSnark census circuit compiler & tester
This repo contains the required code to compile and test the [Vocdoni](https://vocdoni.io/) ZKSnark circuit to generate and verify a election census for anonymous voting.
It also contains the current version of the [circuit](circuit/census.circom) (designed using [Circom](https://github.com/iden3/circom)).
## Usage
### Requirments
To use this repo, the following requirements must be installed:
* [Go](https://go.dev/)
* [NodeJS & NPM](https://nodejs.org/en/)
* [Coreutils (GNU core utilities)](https://www.gnu.org/software/coreutils/)
* [Circom](https://docs.circom.io/)### Available commands
* **Install dependencies**
It installs required script dependencies. To get the full list of dependencies read the [package.json](./circuit/package.json) and [go.mod](./go.mod).
```sh
make install
```* **Compile the circuit and generate artifacts**
It compiles the circuit (read more [here](https://github.com/iden3/snarkjs#10-compile-the-circuit)), calculates the witness and export it (read more [here](https://github.com/iden3/snarkjs#14-calculate-the-witness)) and generates the zkey and export it (read more [here](https://github.com/iden3/snarkjs#15-setup)). The resulting artifacts will be at `./artifacts///`, check the checksums of the `dev` environment [here](./artifacts/dev/circuits-info.md).
```sh
make compile
```* **Test the proof generation and verification**
It generates a valid set of circuit inputs, generates a zk-proof with them and verify that proof. All this steps use the result of circuit compilation, so they must be performed after executing the `make compile` command.
```sh
make test
```