pqc/crypto_kem/hqc-128/clean/api.h

26 lines
1012 B
C
Raw Normal View History

2020-09-07 19:23:34 +01:00
#ifndef PQCLEAN_HQC128_CLEAN_API_H
#define PQCLEAN_HQC128_CLEAN_API_H
/**
* @file api.h
* @brief NIST KEM API used by the HQC_KEM IND-CCA2 scheme
*/
#define PQCLEAN_HQC128_CLEAN_CRYPTO_ALGNAME "HQC-128"
#define PQCLEAN_HQC128_CLEAN_CRYPTO_SECRETKEYBYTES 3064
#define PQCLEAN_HQC128_CLEAN_CRYPTO_PUBLICKEYBYTES 3024
#define PQCLEAN_HQC128_CLEAN_CRYPTO_BYTES 64
#define PQCLEAN_HQC128_CLEAN_CRYPTO_CIPHERTEXTBYTES 6017
// As a technicality, the public key is appended to the secret key in order to respect the NIST API.
// Without this constraint, PQCLEAN_HQC128_CLEAN_CRYPTO_SECRETKEYBYTES would be defined as 32
int PQCLEAN_HQC128_CLEAN_crypto_kem_keypair(unsigned char *pk, unsigned char *sk);
int PQCLEAN_HQC128_CLEAN_crypto_kem_enc(unsigned char *ct, unsigned char *ss, const unsigned char *pk);
int PQCLEAN_HQC128_CLEAN_crypto_kem_dec(unsigned char *ss, const unsigned char *ct, const unsigned char *sk);
#endif