Contains the public API for the NTRU CCA-secure Key Encapsulation Mechanism implementation. More...
Go to the source code of this file.
Functions | |
QSC_EXPORT_API bool | qsc_ntru_decapsulate (uint8_t *secret, const uint8_t *ciphertext, const uint8_t *privatekey) |
Decapsulates the shared secret using a private-key. | |
QSC_EXPORT_API bool | qsc_ntru_decrypt (uint8_t *secret, const uint8_t *ciphertext, const uint8_t *privatekey) |
Decrypts the shared secret using a private-key. | |
QSC_EXPORT_API void | qsc_ntru_encapsulate (uint8_t *secret, uint8_t *ciphertext, const uint8_t *publickey, bool(*rng_generate)(uint8_t *, size_t)) |
Encapsulates a shared secret using a public-key. | |
QSC_EXPORT_API void | qsc_ntru_encrypt (uint8_t *secret, uint8_t *ciphertext, const uint8_t *publickey, const uint8_t seed[QSC_NTRU_SEED_SIZE]) |
Encrypts and encapsulates a shared secret using a public-key. | |
QSC_EXPORT_API void | qsc_ntru_generate_keypair (uint8_t *publickey, uint8_t *privatekey, bool(*rng_generate)(uint8_t *, size_t)) |
Generates a public/private key pair for NTRU. | |
Contains the public API for the NTRU CCA-secure Key Encapsulation Mechanism implementation.
This header provides function declarations for generating key pairs, encapsulating and decapsulating shared secrets using the NTRU algorithm. Multiple parameter sets are supported and are selected at compile-time via definitions (e.g. QSC_NTRU_S1HPS2048509, QSC_NTRU_S3HPS2048677, etc.). The API is designed for secure post-quantum cryptographic applications.
QSC_EXPORT_API bool qsc_ntru_decapsulate | ( | uint8_t * | secret, |
const uint8_t * | ciphertext, | ||
const uint8_t * | privatekey ) |
Decapsulates the shared secret using a private-key.
secret | [uint8_t*] Pointer to the output shared secret key (size: QSC_NTRU_SHAREDSECRET_SIZE). |
ciphertext | [const uint8_t*] Pointer to the ciphertext array (size: QSC_NTRU_CIPHERTEXT_SIZE). |
privatekey | [const uint8_t*] Pointer to the secret-key array (size: QSC_NTRU_PRIVATEKEY_SIZE). |
QSC_EXPORT_API bool qsc_ntru_decrypt | ( | uint8_t * | secret, |
const uint8_t * | ciphertext, | ||
const uint8_t * | privatekey ) |
Decrypts the shared secret using a private-key.
secret | [uint8_t*] Pointer to the output shared secret key (size: QSC_KYBER_SHAREDSECRET_SIZE). |
ciphertext | [const uint8_t*] Pointer to the ciphertext array (size: QSC_KYBER_CIPHERTEXT_SIZE). |
privatekey | [const uint8_t*] Pointer to the secret-key array (size: QSC_KYBER_PRIVATEKEY_SIZE). |
QSC_EXPORT_API void qsc_ntru_encapsulate | ( | uint8_t * | secret, |
uint8_t * | ciphertext, | ||
const uint8_t * | publickey, | ||
bool(* | rng_generate )(uint8_t *, size_t) ) |
Encapsulates a shared secret using a public-key.
secret | [uint8_t*] Pointer to the shared secret key (size: QSC_NTRU_SHAREDSECRET_SIZE). |
ciphertext | [uint8_t*] Pointer to the ciphertext array (size: QSC_NTRU_CIPHERTEXT_SIZE). |
publickey | [const uint8_t*] Pointer to the public-key array (size: QSC_NTRU_PUBLICKEY_SIZE). |
rng_generate | [function pointer] Pointer to the random generator function. |
QSC_EXPORT_API void qsc_ntru_encrypt | ( | uint8_t * | secret, |
uint8_t * | ciphertext, | ||
const uint8_t * | publickey, | ||
const uint8_t | seed[QSC_NTRU_SEED_SIZE] ) |
Encrypts and encapsulates a shared secret using a public-key.
secret | [uint8_t*] Pointer to the shared secret key (size: QSC_KYBER_SHAREDSECRET_SIZE). |
ciphertext | [uint8_t*] Pointer to the ciphertext array (size: QSC_KYBER_CIPHERTEXT_SIZE). |
publickey | [const uint8_t*] Pointer to the public-key array (size: QSC_KYBER_PUBLICKEY_SIZE). |
seed | [const uint8_t[QSC_NTRU_SEED_SIZE]] Pointer to the random seed array. |
QSC_EXPORT_API void qsc_ntru_generate_keypair | ( | uint8_t * | publickey, |
uint8_t * | privatekey, | ||
bool(* | rng_generate )(uint8_t *, size_t) ) |
Generates a public/private key pair for NTRU.
publickey | [uint8_t*] Pointer to the output public-key array (size: QSC_NTRU_PUBLICKEY_SIZE). |
privatekey | [uint8_t*] Pointer to the output private-key array (size: QSC_NTRU_PRIVATEKEY_SIZE). |
rng_generate | [function pointer] Pointer to the random generator function. |