Coder Social home page Coder Social logo

anon-aadhaar / anon-aadhaar Goto Github PK

View Code? Open in Web Editor NEW
109.0 3.0 15.0 3.51 MB

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

Home Page: https://anon-aadhaar-documentation.vercel.app

License: MIT License

JavaScript 0.38% Shell 2.15% TypeScript 76.73% Circom 12.75% Solidity 7.99%
aadhaar pcd privacy zk

anon-aadhaar's Issues

Explore new Aadhaar endpoints

What is the bug?

It seems that the Aadhaar pdf cars is not the main way to handle the Indian citizenship. We need to explore new ways to interact with the Indian Identity that feets more with the actual user journey.

Update RSA verify circuit: Use circuit in zk-email-verify

Motivation

After benchmark a few circuits open source implemented on Github(check the issue #16) , The RSA circuit in zk-email-verify have a good performance more than another circuit. We should replace current circuit to zk-email-verify.

Plan

  • Clone circuit from zk-email-verify.
  • Modify circuit and support RSA signature use sha1 hash function.

Prove user know a pdf password

Motivation

In current version, prover only need provide a pdf file, however prover must provide password of pdf also to ensure he have permission on this pdf file.

Solution

Researching...

Miss depenency qpdf

What is the bug?

We miss auto install qpdf for command yarn gen-pdf in pcd packkage

How can it be reproduced? (optional)

Run yarn gen-pdf in pcd package.

feat: Enable test vs staging in react lib

What is the feature?

The main flow for now is to extract the modulus (RSA public key) from the PDF, which enables us to test with a random RSA signature. But to check Aadhaar authenticity the inputted modulus must be the official public key.

The feature will consist of boolean parameters initialized in the react context provider, if true it will take the modulus from PDF, if false it will take the official modulus.

Can't use Big int in Zupass

For now we can't verify a proof using the SDK in the Zupass repo, because it's not compatible with es2015.

When importing the verify function I have these errors:

✘ [ERROR] Big integer literals are not available in the configured target environment ("es2015")
@pcd/passport-interface:dev: 
@pcd/passport-interface:dev:     ../../../anon-aadhaar/node_modules/wasmcurves/src/bigint.js:107:15:
@pcd/passport-interface:dev:       107 │     return n - 1n;
@pcd/passport-interface:dev:           ╵                ~~

Create new test PDF

What is the bug?

As we are changing the way to compute the witness, we will to generate a new test PDF that support the same signature type as the original PDF.
This is needing to enhance our unitary tests and enable users to test our tool without an Aadhaar card.

Generate a PDF with the following specs:

  • adbe.x509.rsa.sha1
  • Signature length: 128
  • V = 2
  • Password encrypted (optional)

Prove proof not created by user functionability

Motivation

We should support selective disclosure on anon aadhaar. Users/Prover can prove they don't create exist proof, without review her/his(their) all information of him. However, Users/Prover can do it if they hold some private information. Malicious parties can not create this proof because they don't know this information.

We can use this to handle a lot of illegitimate action/transaction.

Solution

Researching...

Proof is not working anymore

What is the bug?

Proof is not being created , trapped in error

How can it be reproduced? (optional)

Simple try logging in with Aadhar

Additional context (optional)

This is the error Uncaught (in promise) Error: Not all inputs have been set. Only 96 out of 97

and i think its become zkey json was changed

Nullifier: double proof preventing mechanism

Problem

We use zkp protocol to create proof for signature. This mean one user can create the proof from his data and share it for other people. We don't know who create this proof but this proof still valid. They can use this proof to cheat our systems. We should think the mechanism to avoid this case.

One time/limited use pcd argument.

Relate with #28

Motivation

We can limited number proof user can create. This is useful for avoid spam and DOS attack

Research

We can add RLN circuit to our circuit or think about another solution.

Test web prover in pcd packages

With web prover we can fetch proving key data from Web server. For testing web prover we should:

  • Create mock server to store key.
  • Test fetch key from server
  • PCD flow should run successfully.

feat: React Native Support

Feature

Currently anon-aadhaar-react doesn't support with react-native. I'm happy to work package for anon-aadhaar-react-native

Error

image

Create test vectors

What is the feature?

These test vectors are needed to directly test our circuit, they make abstraction of the PCD and the typescript implementation.

Additional context (optional)

These vectors will enable testing new frameworks.
Check the following example

feat: package proving flow to deliver it in a web-worker

What is the bug?

For now, the proving flow is working on browsers but as it is running in the main thread it can cause freezes or even an overflow on not powerful computers/mobiles.

How can it be solved? (optional)

We can try to package the proving flow in a web-worker using this lib.

zk-regex research

Motivation

We should proof data we extract from identity sources(from pdf file, website, xml data). The zk-regex is one of good direction we should try.

Plan and expect outcome.

  • Understand zk-regex constructions
  • Build a few playground examples
  • Think how we can apply it to anon-aadhaar project.

Artifacts import in pcd.ts/getVerifyKey() doesn't work when using the package

As the path is the relative path from the root src folder, when building the package this path is not relevant anymore.

function getVerifyKey() {
  // eslint-disable-next-line @typescript-eslint/no-var-requires
  const verifyKey = require('../artifacts/verification_key.json')
  return verifyKey
}

There is some solutions to this problem:

  • Change the way the path is implemented, so the relative path works in src and in build
  • Implement a bundler

Research about CP SNARK

Motivation

CP-SNARK help we modular prove system on same witness input. This can be good for compose and exchange credential between parties based on same witness about one people without lack privacy.

This also another direction research to improve performance/

UI fixes

What is the bug?

  • Title and Label font color to black
  • Add disclaimer and explanation in model
  • Improve input file button UI
  • Proof component size and display

How can it be reproduced? (optional)

Include steps, code samples, replies, screenshots and anything else that would be helpful to reproduce the problem.

Additional context (optional)

Add any other context about the problem here.

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.