Git Product home page Git Product logo
Anon Aadhaar photo

anon-aadhaar Goto Github PK

repos: 11.0 gists: 0.0

Name: Anon Aadhaar

Type: Organization

Bio: Anon Aadhaar is a zero-knowledge protocol that allows Aadhaar ID owners to prove their identity in a privacy preserving way.

Twitter: AnonAadhaar

Anon Aadhaar

Anon Aadhaar is a protocol for proving ownership of an Aadhaar identity (Indian Residence ID) in a privacy-preserving manner. It lets users generate a ZK proof of their identity by only revealing the information they want to share (to an application).

Developers can use the AnonAadhaar SDK to integrate this into their applications to verify the identity of users without asking them to reveal more personal data than necessary. The proof generated can also be verified on EVM-based blockchains making Anon Aadhaar suitable for on-chain applications.

Demo App: Anon Aadhaar Example | Source

Documentation: Anon Aadhaar Documentation


How it works

Aadhaar data is signed by the government. Anon Aadhaar uses zero-knowledge circuits to verify this signature and generate proof of it.

A "verifier" (an app or a smart contract) verifying the proof can be sure the "prover" had a valid Aadhaar containing the information (like age, state, gender) they revealed.

Anon Aadhaar works on the client side (browser, mobile app) and does not require the user to send their Aadhaar details to any server. Read more


πŸ“¦ Packages

This repo contains the core ZK circuits of Anon Aadhaar and JS/React SDKs for developers to integrate into their applications.

The following packages are available, and published to npm:

To build on top of Anon Aadhaar, read out documentation here and check out the boilerplate repo (Next.js)


Building and Running locally

Below steps are for building Anon Aadhaar circuits locally and generating proof with it.

For production, always use the published npm packages.

Requirements:

  • Node JS (v18 or higher)
  • Yarn

Install dependencies

yarn install

Build libraries

yarn build:libraries

Build circuit and generate zkey

# PWD = packages/circuits

yarn dev-install
yarn build-circuit
yarn dev-setup

This will generate the build folder with the compiled circuit and artifacts. The generated zkey is only meant for testing and should not be used in production.

⚠️ This will take a couple of minutes to finish.

Generate test data

# PWD = packages/circuits

yarn gen-test-data

This will generate dummy Aadhaar data and save it to packages/circuits/assets/test.json

The generated test data is verified using a test public/private key pair.

You can also use your real Aadhaar by setting env REAL_DATA=true and QR_DATA=<QR_DATA> (the large number in the Aadhaar QR code) in the gen-proof script in the next section.

Generate Witness and proof

# PWD = packages/circuits

yarn gen-witness
yarn gen-proof

This will generate and save the proof to packages/circuits/build/proofs/proof.json and the public signals to packages/circuits/build/proofs/public.json

Verify the proof

yarn verif-proof

This will verify the generated proof and print the result to the console.

Verify on-chain

You can also generate the solidity verifier contract using yarn gen-contracts and deploy it to a blockchain to verify the proof on-chain. You can use this method to convert the generated proof to a format that can be used in the contract.


Contributing

Contributions with fixes and general improvements are always welcome. Please check the PR template

New features are currently being developed internally, but if you would like to work on any open issues, please comment on them and it will be assigned to you if possible.


Our Community

  • PSE Discord server:
  • Twitter account:
  • Telegram group:

Please join our Telegram group to receive updates, ask questions, get support with integration, etc.


License

MIT

Anon Aadhaar's Projects

Anon Aadhaar doesn’t have any public repositories yet.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.