57QSC_CPLUSPLUS_ENABLED_START
87#if defined(QSC_KYBER_S1K2P512)
93#define QSC_KYBER_CIPHERTEXT_SIZE 768U
99#define QSC_KYBER_PRIVATEKEY_SIZE 1632U
105#define QSC_KYBER_PUBLICKEY_SIZE 800U
111#define QSC_KYBER_ALGNAME "KYBER-P512"
113#elif defined(QSC_KYBER_S3K3P768)
119#define QSC_KYBER_CIPHERTEXT_SIZE 1088U
125#define QSC_KYBER_PRIVATEKEY_SIZE 2400U
131#define QSC_KYBER_PUBLICKEY_SIZE 1184U
137#define QSC_KYBER_ALGNAME "KYBER-P768"
139#elif defined(QSC_KYBER_S5K4P1024)
145#define QSC_KYBER_CIPHERTEXT_SIZE 1568U
151#define QSC_KYBER_PRIVATEKEY_SIZE 3168U
157#define QSC_KYBER_PUBLICKEY_SIZE 1568U
163#define QSC_KYBER_ALGNAME "KYBER-P1024"
165#elif defined(QSC_KYBER_S6K5P1280)
171#define QSC_KYBER_CIPHERTEXT_SIZE 1920U
177#define QSC_KYBER_PRIVATEKEY_SIZE 3936U
183#define QSC_KYBER_PUBLICKEY_SIZE 1952U
189#define QSC_KYBER_ALGNAME "KYBER-P1280"
192# error "A parameter set has not been defined!"
199#define QSC_KYBER_SEED_SIZE 32U
205#define QSC_KYBER_SHAREDSECRET_SIZE 32U
269QSC_CPLUSPLUS_ENABLED_END
QSC_EXPORT_API bool qsc_kyber_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_kyber_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_kyber_seeded_encapsulate(uint8_t *secret, uint8_t *ciphertext, const uint8_t *publickey, const uint8_t *m)
Generates cipher text and shared secret for given public key and a random seed.
QSC_EXPORT_API void qsc_kyber_generate_seeded_keypair(uint8_t *publickey, uint8_t *privatekey, uint8_t *d, uint8_t *z)
Generates public and private key for the CCA-Secure Kyber key encapsulation mechanism using input see...
QSC_EXPORT_API bool qsc_kyber_generate_keypair(uint8_t *publickey, uint8_t *privatekey, bool(*rng_generate)(uint8_t *, size_t))
Generates a Kyber public/private key pair.
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