pub fn random() -> DlogProverInput {
        let scalar = loop {
            // Generate a new secret key using the operating system's
            // cryptographically secure random number generator
            let sk = k256::SecretKey::generate();
            let bytes: [u8; 32] = sk
                .secret_scalar()
                .as_ref()
                .as_slice()
                .try_into()
                .expect("expected 32 bytes");
            // Returns None if the byte array does not contain
            // a big-endian integer in the range [0, n), where n is group order.
            let maybe_scalar = Scalar::from_bytes(bytes);
            if bool::from(maybe_scalar.is_some()) {
                break maybe_scalar.unwrap();
            }
        };
        DlogProverInput { w: scalar }
    }
/// generates random secret in the range [0, n), where n is DLog group order.
generates random secret in the range [0, n), where n is DLog group order.
generates random secret in the range [ 0 n ) where n is DLog group order .
pub fn random() -> DlogProverInput {
        let scalar = loop {
            // Generate a new secret key using the operating system's
            // cryptographically secure random number generator
            let sk = k256::SecretKey::generate();
            let bytes: [u8; 32] = sk
                .secret_scalar()
                .as_ref()
                .as_slice()
                .try_into()
                .expect("expected 32 bytes");
            // Returns None if the byte array does not contain
            // a big-endian integer in the range [0, n), where n is group order.
            let maybe_scalar = Scalar::from_bytes(bytes);
            if bool::from(maybe_scalar.is_some()) {
                break maybe_scalar.unwrap();
            }
        };
        DlogProverInput { w: scalar }
    }
pub fn random ( ) -> DlogProverInput { let scalar = loop { // Generate a new secret key using the operating system's // cryptographically secure random number generator let sk = k256 :: SecretKey :: generate ( ) ; let bytes : [ u8 ; 32 ] = sk . secret_scalar ( ) . as_ref ( ) . as_slice ( ) . try_into ( ) . expect ( " " ) ; // Returns None if the byte array does not contain // a big-endian integer in the range [0, n), where n is group order. let maybe_scalar = Scalar :: from_bytes ( bytes ) ; if bool :: from ( maybe_scalar . is_some ( ) ) { break maybe_scalar . unwrap ( ) ; } } ; DlogProverInput { w : scalar } }
generates random secret in the range [0, n), where n is DLog group order.
generates random secret in the range [ 0 n ) where n is DLog group order .