arkworks-rs / snark

Interfaces for Relations and SNARKs for these relations
https://www.arkworks.rs
Apache License 2.0
776 stars 209 forks source link

expose function which enforces a <= (p-1)/2 #204

Closed gakonst closed 4 years ago

gakonst commented 4 years ago

Exposes the function in the PR and renames it to be more specific (since it also checks equality) and to be consistent with the rest of the enforce_ methods.

Context: I'm writing a point compression gadget and would prefer to have this exposed, instead of having to do to_bits and then check that my value is <= (p-1)/2