56#if defined(QSC_SYSTEM_HAS_AVX2)
62QSC_CPLUSPLUS_ENABLED_START
97#if defined(QSC_HQC_S1N2321)
103# define QSC_HQC_PUBLICKEY_SIZE 2241U
109# define QSC_HQC_PRIVATEKEY_SIZE 2321U
115# define QSC_HQC_CIPHERTEXT_SIZE 4433U
121# define QSC_HQC_ALGNAME "HQC-2321"
123#elif defined(QSC_HQC_S3N4602)
129# define QSC_HQC_PUBLICKEY_SIZE 4514U
135# define QSC_HQC_PRIVATEKEY_SIZE 4602U
141# define QSC_HQC_CIPHERTEXT_SIZE 8978U
147# define QSC_HQC_ALGNAME "HQC-4602"
149#elif defined(QSC_HQC_S5N7333)
155# define QSC_HQC_PUBLICKEY_SIZE 7237U
161# define QSC_HQC_PRIVATEKEY_SIZE 7333U
167# define QSC_HQC_CIPHERTEXT_SIZE 14421U
173# define QSC_HQC_ALGNAME "HQC-7333"
176# error "A valid HQC parameter set must be defined: QSC_HQC_S1N2321, QSC_HQC_S3N4602, or QSC_HQC_S5N7333."
183#define QSC_HQC_SEED_SIZE 32U
189#define QSC_HQC_SHAREDSECRET_SIZE 32U
252QSC_CPLUSPLUS_ENABLED_END
#define QSC_HQC_SEED_SIZE
The byte size of the seed array.
Definition hqc.h:183
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:645