Implement `hash` in a way that it creates a scalar that is statistically uniformly distributed
moCello opened this issue · 0 comments
moCello commented
Summary
Currently when we hash an arbitrary slice of bytes to a BlsScalar
in hash::h
, we digest them into an array of 32 bytes and zero the two most significant bits to ensure we have a canonical scalar. This approach is not uniformly distributed over the field of scalar. Instead we can use the approach outlined here, our case is the first conversion.