Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/anon-aadhaar/anon-aadhaar-noir
Anon-Aadhaar protocol implementation in Noir
https://github.com/anon-aadhaar/anon-aadhaar-noir
Last synced: 2 months ago
JSON representation
Anon-Aadhaar protocol implementation in Noir
- Host: GitHub
- URL: https://github.com/anon-aadhaar/anon-aadhaar-noir
- Owner: anon-aadhaar
- License: mit
- Created: 2024-08-05T08:10:16.000Z (6 months ago)
- Default Branch: main
- Last Pushed: 2024-09-10T04:21:08.000Z (5 months ago)
- Last Synced: 2024-09-10T13:52:42.342Z (5 months ago)
- Language: Noir
- Size: 2.62 MB
- Stars: 2
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-noir - Anon-Aadhaar - privacy-preserving verification of Aadhaar (Indian residence ID) through proofs revealing only selected identity information (Projects / Identity)
README
# Anon-Aadhaar Protocol Implementation in Noir
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.## Modules
- `/circuits`: **Noir Circuits**
- `/js`: **js sdk for proving noir circuits**
- `/scripts`: **Scripts for testing and benchmarking**## Setup
### Prerequisites
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:```sh
noirup -v 0.36.0
bbup -v 0.61.0
```### Build circuits:
```sh
cd circuits
nargo compile
```### Testing
To run the tests:
```sh
nargo test --show-output
```### Testing with Real Data
To run the tests with read data:
1. Setup scripts:
```sh
cd scripts
yarn install
```2. Configure environment:
- Create `.env` in `scripts` directory with:
```sh
export REAL_DATA=true
export QR_DATA=
```3. Generate test inputs:
```sh
yarn gen-test-inputs
```This creates test inputs in `circuits/testcases/test.toml`
4. Execute tests with real data:
```sh
nargo execute -p testcases/test.toml
```## Benchmarks
Benchmarks via the Barretenberg Backend on M1 Macbook Pro 2020:
To run the benchmarks:
```sh
cd scripts
./benchmark.sh
```Circuit 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 |