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?
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 withGroup.RandomScalar
, but I wonder if adding a function to the Group interface would be useful. Thoughts?