Function classic_mceliece_rust::crypto_kem_keypair
source · [−]pub fn crypto_kem_keypair(
pk: &mut [u8; 261120],
sk: &mut [u8; 6492],
rng: &mut impl RNGState
) -> Result<(), Box<dyn Error>>
Expand description
KEM Keypair generation.
Generate some public and secret key. The public key is meant to be shared with any party, but access to the secret key must be limited to the generating party.
The structure of the secret key is given by the following segments: (32 bytes seed, 8 bytes pivots, IRR_BYTES bytes, COND_BYTES bytes, SYS_N/8 bytes). The structure of the public key is simple: a matrix of PK_NROWS times PK_ROW_BYTES bytes.