/// Returns a (nearly) uniformly-random scalar, generated in constant time.
Returns a (nearly) uniformly-random scalar, generated in constant time.
Returns a ( nearly ) uniformly - random scalar generated in constant time .
pub fn generate_biased(mut rng: impl CryptoRng + RngCore) -> Self {
        // We reduce a random 512-bit value into a 256-bit field, which results in a
        // negligible bias from the uniform distribution, but the process is constant-time.
        let mut buf = [0u8; 64];
        rng.fill_bytes(&mut buf);
        Scalar(WideScalarImpl::from_bytes(&buf).reduce())
    }
pub fn generate_biased ( mut rng : impl CryptoRng + RngCore ) -> Self { // We reduce a random 512-bit value into a 256-bit field, which results in a // negligible bias from the uniform distribution, but the process is constant-time. let mut buf = [ 0u8 ; 64 ] ; rng . fill_bytes ( & mut buf ) ; Scalar ( WideScalarImpl :: from_bytes ( & buf ) . reduce ( ) ) }
Returns a (nearly) uniformly-random scalar, generated in constant time.
Returns a ( nearly ) uniformly - random scalar generated in constant time .
rng
impl CryptoRng + RngCore