pub(crate) fn generate_random<R: RngCore + CryptoRng>(
        rng: &mut R,
    ) -> Result<Self, InternalError> {
        let sk = KG::random_sk(rng);
        let pk = KG::public_key(&sk);
        Ok(Self {
            pk: PublicKey(Key(pk.to_arr())),
            sk: PrivateKey(Key(sk)),
        })
    }
/// Generating a random key pair given a cryptographic rng
Generating a random key pair given a cryptographic rng
Generating a random key pair given a cryptographic rng
pub(crate) fn generate_random<R: RngCore + CryptoRng>(
        rng: &mut R,
    ) -> Result<Self, InternalError> {
        let sk = KG::random_sk(rng);
        let pk = KG::public_key(&sk);
        Ok(Self {
            pk: PublicKey(Key(pk.to_arr())),
            sk: PrivateKey(Key(sk)),
        })
    }
pub ( crate ) fn generate_random < R : RngCore + CryptoRng > ( rng : & mut R , ) -> Result < Self , InternalError > { let sk = KG :: random_sk ( rng ) ; let pk = KG :: public_key ( & sk ) ; Ok ( Self { pk : PublicKey ( Key ( pk . to_arr ( ) ) ) , sk : PrivateKey ( Key ( sk ) ) , } ) }
Generating a random key pair given a cryptographic rng
Generating a random key pair given a cryptographic rng
rng
&mut R
rng
&mut R