pub trait CanSampleBits<T> {
// Required method
fn sample_bits(&mut self, bits: usize) -> T;
}Expand description
A trait for sampling random bitstrings from the Fiat-Shamir transcript.
Required Methods§
Sourcefn sample_bits(&mut self, bits: usize) -> T
fn sample_bits(&mut self, bits: usize) -> T
Sample a random bits-bit integer from the transcript.
The distribution should be reasonably close to uniform. (In practice, a small bias may arise when bit-decomposing a uniformly sampled field element)
Guarantees that the returned value fits within the requested bit width.