mratsim / constantine

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

Constant-time 𝔾ₜ exponentiation with endomorphism acceleration #431

Closed mratsim closed 4 months ago

mratsim commented 4 months ago

This is a follow-up to #429, and also adds 𝔾ₜ multiplication and exponentiation to zkalc (#425).

Surprisingly the slowdown for constant-time 𝔾ₜ exponentiation is only ~10% on BLS12-381 (138µs vs 153µs) image

This is about 3x slower than G1 vartime and 2.5x than G1 constant-time image

And 1.5x / 1.2x slower than G2 vartime/constant-time image