Anon-Aadhaar protocol implementation in Noir
The following modules work:
- SHA256 Hash
- RSA Signature Verification
- Conditional Disclosure of Secrets
- Computing the nullifier using the Poseidon Hash function
- Converting the IST timestamp to UTC UNIX timestamp
- SignalHash constraints for frontrunning atttacks
To run the entire circuit:
- cd aadhaar_qr_verifier
- nargo check --overwrite
- nargo test --show-output
To run the RSA-SHA256 circuit:
- cd rsa-sha256
- noirup -v 0.32.0
- nargo check --overwrite
- nargo test
And in each of the folders nullifier, timestamp, cds, signal:
- cd folder_name
- nargo check --overwrite
- nargo test
Benchmarks via the Barretenberg Backend:
Part of the Circuit | Proving Time | Verification Time |
---|---|---|
RSA-SHA256 | 0.502s | 0.064 |
Nullifier | 0.611s | 0.066s |
Conditional Secrets | 0.102s | 0.061s |
Timestamp | 0.401s | 0.057s |
Signal | 0.092s | 0.065s |
The Verification Cost of the Solidity Verifier of the entire Aadhaar_QR_Verifier circuit:
Total Gas Cost: 2904342 gas
Transaction Cost: 2525514 gas
Execution Cost: 2251848 gas