zerokit/rln
s1fr0 8e065d4a83
fix(rln): fixed proof generation/verification and E2E tests
chore(rln): clippy and fmt

fix(rln): cargo fix

ci: update submodules

chore(rln): remove unnecessary test, restyle

fix(rln): switch to field type, add field arithmetic

feat(rln): public input computation from witness

fix(rln): fix semaphore crate version
2022-06-09 15:57:03 +02:00
..
resources fix(rln): fixed proof generation/verification and E2E tests 2022-06-09 15:57:03 +02:00
src fix(rln): fixed proof generation/verification and E2E tests 2022-06-09 15:57:03 +02:00
vendor chore(rln): Add git submodule 2022-05-24 12:08:42 +01:00
Cargo.toml fix(rln): fixed proof generation/verification and E2E tests 2022-06-09 15:57:03 +02:00
README.md docs(rln): Compiling circuits 2022-05-24 12:14:02 +01:00

README.md

RLN wrapper

cargo run should produce a verified proof:

Proof: Proof { a: GroupAffine { x: Fp256(BigInteger256([8483808811394525823, 2911623124993487936, 965710634470565595, 371243954766865014])), y: Fp256(BigInteger256([705817196479998808, 17904136250720012753, 4190084222192764444, 7218570197435348])), infinity: false }, b: GroupAffine { x: QuadExtField { c0: Fp256(BigInteger256([5458988222411652552, 17182308780189183250, 14791331698105531271, 721079937701984589])), c1: Fp256(BigInteger256([7448529038603485276, 13923597709209930, 3309560575781216904, 880478657337970720])) }, y: QuadExtField { c0: Fp256(BigInteger256([15528177727577722078, 5558129266105870459, 2736358139645020298, 1495034096047214880])), c1: Fp256(BigInteger256([17682510405762186416, 10008291815399475705, 8906017124801037485, 3406569241364819001])) }, infinity: false }, c: GroupAffine { x: Fp256(BigInteger256([15442965511095371475, 16233723700799040245, 2033693936526019359, 1940755394980495809])), y: Fp256(BigInteger256([9607769396956991597, 16531786910336973521, 16312419257791650835, 838503992599180484])), infinity: false } }

Example witness data

See: b6a872f716

Compiling circuits

rln (https://github.com/privacy-scaling-explorations/rln) repo with Circuits is contained as a submodule.

# Update submodules
git submodule update --init --recursive

# Install rln dependencies
cd vendor/rln/ && npm install

# Build circuits
./scripts/build-circuits.sh rln

# Copy over assets
cp build/rln.r1cs ../../resources
cp build/zkeyFiles/rln-final.zkey ../../resources
cp build/zkeyFiles/rln.wasm ../../resources