This project implements the Anon-Aadhaar protocol using Noir.
Warning
It is not safe to use in production with real data. Please use the Circom implementation for production use.
/circuits: Noir Circuits/js: js sdk for proving noir circuits/scripts: Scripts for testing and benchmarking
Note: Ensure you have Noir version 0.38.0 and barretenberg backend verison 0.61.0
installed and . If not, set it specific version using the following command:
noirup -v 0.36.0
bbup -v 0.61.0cd circuits
nargo compileTo run the tests:
nargo test --show-outputTo run the tests with read data:
- Setup scripts:
cd scripts
yarn install-
Configure environment:
- Create
.envinscriptsdirectory with:
- Create
export REAL_DATA=true
export QR_DATA= <aadhar data (bigint)>- Generate test inputs:
yarn gen-test-inputsThis creates test inputs in circuits/testcases/test.toml
- Execute tests with real data:
nargo execute -p testcases/test.tomlBenchmarks via the Barretenberg Backend on M1 Macbook Pro 2020:
To run the benchmarks:
cd scripts
./benchmark.shCircuit Size: 237,811 gates
| Operation | Ultra Honk | Default BB |
|---|---|---|
| Proving | 2.672s | 6.878s |
| VK Generation | 1.799s | 6.551s |
| Verification | 0.042s | 0.044s |