zkcrypto / jubjub

Implementation of the Jubjub elliptic curve group
Other
119 stars 47 forks source link

Constant time everything #19

Closed ebfull closed 5 years ago

ebfull commented 5 years ago

This changes virtually everything to be constant time, by introducing a new Maybe abstraction that can later be upstream'd to subtle. This borrows from #18's constant time Tonelli-Shanks, adapted to match the current implementation that is more efficient and more closely based on the paper.

TODO: tests for Maybe::and_then and Maybe::map

burdges commented 5 years ago

Would even pairings be constant time? :) Oops I confused this with the pairing repo

ebfull commented 5 years ago

@burdges Indeed though, I plan to make even the pairings constant time in my new (and WIP) constant time version of BLS12-381.