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