zero-chain
zero-chain copied to clipboard
Optimize multiexp
The multiexp function is currently based on the bellman lib. https://github.com/LayerXcom/zero-chain/blob/10c89dc993b9c94e99d6a088ac83093ecbfa4934/core/sonic/src/utils.rs#L209-L214 We might optimize it more based on zexe's one which is based on rayon and avoiding use of trait objects.
In addition, we can remove the duplicative collect(), the parameters are into iterator from vec before passed the mutiexp function.
https://github.com/LayerXcom/zero-chain/blob/10c89dc993b9c94e99d6a088ac83093ecbfa4934/core/sonic/src/utils.rs#L194
- Faster batch forgery identification
- Pippenger's exponentiation algorithm
- Improved Techniques for Fast Exponentiation
- Faster Multi-Exponentiation through Caching: Accelerating (EC)DSA Signature Verification
- Efficient Multi-Exponentiation
- Fast parallel computation of multi-exponentiation for public key cryptosystems
- https://github.com/dalek-cryptography/curve25519-dalek/pull/249