zkmopro / mopro

Making client-side proving on mobile simple.
https://zkmopro.org
Apache License 2.0
131 stars 35 forks source link

RSA example #3

Closed oskarth closed 11 months ago

oskarth commented 1 year ago

Problem

We want to use a standard but expensive circuit that is desirable by many projects. One such project is anon-aadhaar that relies on RSA signatures.

Notes

See https://github.com/privacy-scaling-explorations/anon-aadhaar/blob/main/packages/anon-aadhaar-pcd/circuits/rsa.circom

Some tests here https://github.com/privacy-scaling-explorations/anon-aadhaar/blob/main/packages/anon-aadhaar-pcd/test/pcd.test.ts - however these are not self-contained so we probably want some minimal test vectors that work in JS example. This way we know if we are doing something wrong in Rust in terms of data format etc.

Acceptance criteria

RSA circuit integrated similar to Keccak example. Preliminary benchmarks for how long it to prove.

Out of scope but desirable

Once real device target works (see https://github.com/oskarth/mopro/issues/1) we want real numbers on device.

oskarth commented 11 months ago

This was done, see examples and https://github.com/oskarth/mopro#performance