Macro kyberlib_generate_key_pair

Source
macro_rules! kyberlib_generate_key_pair {
    ($pk:expr, $sk:expr, $rng:expr, $seed:expr) => { ... };
}
Expand description

Generates a public and private key pair for CCA-secure Kyber key encapsulation mechanism.

§Arguments

  • pk - Output public key (an already allocated array of CRYPTO_PUBLICKEYBYTES bytes).
  • sk - Output private key (an already allocated array of CRYPTO_SECRETKEYBYTES bytes).
  • _rng - Random number generator implementing RngCore + CryptoRng.
  • _seed - Optional seed for key generation.

§Errors

Returns a KyberLibError on failure.