w3f / fflonk

Apache License 2.0
25 stars 7 forks source link

KZG batch verification #17

Closed swasilyev closed 2 years ago

swasilyev commented 2 years ago

Addresses https://github.com/w3f/fflonk/issues/14

swasilyev commented 2 years ago

cargo test bench_batch_verification --release --features "print-trace" -- --nocapture --ignored

Batch verification of 5 openings of degree ~2^12 on ark_bw6_761 ...........14.109ms

Already seems a bit better than https://github.com/w3f/apk-proofs/blob/ea69dc5a99097e1c4334385d791098e1e167d044/bw6/src/kzg/mod.rs#L488, both using k-1 128-bit random coeffs:

batched KZG opening .......................................................18.771ms

swasilyev commented 2 years ago

Batch verification of 5 openings of degree ~2^12 on ark_bw6_761 with 377-bit xs 14.660ms Batch verification of 5 openings of degree ~2^12 on ark_bw6_761 with 128-bit xs 11.289ms

swasilyev commented 2 years ago

Batch verification of 5 openings of degree ~2^12 on ark_bw6_761 with 377-bit xs 13.209ms Batch verification of 5 openings of degree ~2^12 on ark_bw6_761 with 128-bit xs 10.015ms

Not impressive, as all the exponents are 128-bit

burdges commented 2 years ago

It looks fine although I only looked superficially.