mratsim / constantine

Constantine: modular, high-performance, zero-dependency cryptography stack for verifiable computation, proof systems and blockchain protocols.
Other
405 stars 43 forks source link

multi-scalar multiplication / multi-exponentiations (a.k.a. Pippenger algorithm) #37

Closed mratsim closed 1 year ago

mratsim commented 4 years ago

Glossary:

For Zk-SNARKS, we need to compute a linear combination of scalar multiplication/exponentiation:

Q <- [k1] P1 + [k2] P2 + ... + [kn] Pn

As a generalization to the Strauss-Shamir trick for [a]P + [b]Q we can save a significant amount of iterations.

image image image

Research

Implementations

Side-note

For batched signature verification (see https://ethresear.ch/t/fast-verification-of-multiple-bls-signatures/5407) we may use this as well. To be studied compared to the PAIR_BLS381_another in Milagro to accumulate line functions for multi-pairing and incur the cost of final exponentiation only once as well.

mratsim commented 4 years ago

Other references:

Explanation of Bos-Coster as proposed for batch Schnorr's signature verification in Bitcoin https://bitcoin.stackexchange.com/questions/80698/schnorrs-batch-validation image

image image

mratsim commented 4 years ago

Discussion on Twitter with Consensus ZkSnarks team and the ZkStudyClub: