56#if defined(QSC_SYSTEM_HAS_AVX2)
62QSC_CPLUSPLUS_ENABLED_START
97#if defined(QSC_HQC_S1N2321)
102# define QSC_HQC_PUBLICKEY_SIZE 2241U
108# define QSC_HQC_PRIVATEKEY_SIZE 2321U
114# define QSC_HQC_CIPHERTEXT_SIZE 4433U
116#elif defined(QSC_HQC_S3N4602)
121# define QSC_HQC_PUBLICKEY_SIZE 4514U
127# define QSC_HQC_PRIVATEKEY_SIZE 4602U
133# define QSC_HQC_CIPHERTEXT_SIZE 8978U
135#elif defined(QSC_HQC_S5N7333)
140# define QSC_HQC_PUBLICKEY_SIZE 7237U
146# define QSC_HQC_PRIVATEKEY_SIZE 7333U
152# define QSC_HQC_CIPHERTEXT_SIZE 14421U
155# error "A valid HQC parameter set must be defined: QSC_HQC_S1N2321, QSC_HQC_S3N4602, or QSC_HQC_S5N7333."
162#define QSC_HQC_SEED_SIZE 32U
168#define QSC_HQC_SHAREDSECRET_SIZE 32U
174#define QSC_HQC_ALGNAME "HQC"
234QSC_CPLUSPLUS_ENABLED_END
#define QSC_HQC_SEED_SIZE
The byte size of the seed array.
Definition hqc.h:162
QSC_EXPORT_API bool qsc_hqc_encapsulate(uint8_t *secret, uint8_t *ciphertext, const uint8_t *publickey, bool(*rng_generate)(uint8_t *, size_t))
Encapsulates a shared secret key using a public key.
void qsc_hqc_seeded_encapsulate(uint8_t *secret, uint8_t *ciphertext, const uint8_t *publickey, const uint8_t seed[QSC_HQC_SEED_SIZE])
Generates cipher text and shared secret for given public key and a random seed.
QSC_EXPORT_API void qsc_hqc_generate_seeded_keypair(uint8_t *publickey, uint8_t *privatekey, uint8_t *seed)
Generates public and private key for the CCA-Secure Kyber key encapsulation mechanism using input see...
QSC_EXPORT_API bool qsc_hqc_decapsulate(uint8_t *secret, const uint8_t *ciphertext, const uint8_t *privatekey)
Decapsulates the shared secret for a given ciphertext using a private key.
QSC_EXPORT_API bool qsc_hqc_generate_keypair(uint8_t *publickey, uint8_t *privatekey, bool(*rng_generate)(uint8_t *, size_t))
Generates a Kyber public/private key pair.
Defines the public AVX2 entry points, parameter constants, and data structures for the QSC HQC implem...
Defines the public AVX2 entry points, parameter constants, and data structures for the QSC HQC implem...
Contains common definitions for the Quantum Secure Cryptographic (QSC) library.
#define QSC_EXPORT_API
API export macro for Microsoft compilers when importing from a DLL.
Definition qsccommon.h:605