#include #include #include "params.h" #include "kem.h" #include "indcpa.h" #include "verify.h" #include "symmetric.h" #include "randombytes.h" /************************************************* * Name: crypto_kem_keypair * * Description: Generates public and private key * for CCA-secure Kyber key encapsulation mechanism * * Arguments: - uint8_t *pk: pointer to output public key * (an already allocated array of KYBER_PUBLICKEYBYTES bytes) * - uint8_t *sk: pointer to output private key * (an already allocated array of KYBER_SECRETKEYBYTES bytes) * * Returns 0 (success) **************************************************/ int crypto_kem_keypair(uint8_t *pk, uint8_t *sk) { size_t i; indcpa_keypair(pk, sk); for(i=0;i