pub fn keypair<R>(rng: &mut R) -> Result<Keypair, KyberLibError>Expand description
Generate a key pair for Kyber encryption with a provided RNG.
This function generates a key pair consisting of a public key and a secret key for Kyber encryption.
§Arguments
rng- The random number generator implementing theRngCoreandCryptoRngtraits.
§Errors
Returns a KyberLibError if an error occurs during key pair generation.
§Example
let mut rng = rand::thread_rng();
let keys = keypair(&mut rng)?;