cloudflare / circl

CIRCL: Cloudflare Interoperable Reusable Cryptographic Library
http://blog.cloudflare.com/introducing-circl
Other
1.26k stars 138 forks source link

Random non-zero scalar generation #303

Closed chris-wood closed 2 years ago

chris-wood commented 2 years ago

Currently, Group.RandomScalar() returns a scalar from the group Z_p, which includes the zero element. Some protocols require randomly sampling a scalar from the set of scalars with a multiplicative inverse (Z_p^*). One can implement this with Group.RandomScalar, but I wonder if adding a function to the Group interface would be useful. Thoughts?