199 uint8_t* session_key);
224 const uint8_t* ciphertext,
225 uint8_t* session_key);
#define PQLR_API
Definition: api.h:22
struct pqlr_alg_st * pqlr_alg
PQLR algorithm instance handle.
Definition: alg.h:32
PQLR_API uint32_t pqlr_kem_get_ciphertext_length(const pqlr_kem kem)
Obtains ciphertext (request) length for the current pqlr_kem instance.
PQLR_API size_t pqlr_kem_num_algs(void)
Obtains the number of available PQLR KEM algorithms.
PQLR_API void pqlr_kem_free(pqlr_kem kem)
Frees pqlr_kem instance and all corresponding resources.
PQLR_API uint32_t pqlr_kem_get_initiator_secret_length(const pqlr_kem kem)
Obtains initiator's secret key length for the current pqlr_kem instance.
PQLR_API pqlr_kem pqlr_kem_new(const pqlr_alg alg)
Creates pqlr_kem instance initialized by alg.
struct pqlr_kem_st * pqlr_kem
PQLR KEM algorithm instance handle.
Definition: kem.h:53
PQLR_API size_t pqlr_kem_get_algs(const char **algs, size_t count)
Fills the provided buffer with names of available KEM algorithms.
PQLR_API uint32_t pqlr_kem_get_shared_secret_length(const pqlr_kem kem)
Obtains shared secret (key) length for the current pqlr_kem instance.
PQLR_API uint32_t pqlr_kem_get_initiator_public_length(const pqlr_kem kem)
Obtains initiator's public key length for the current pqlr_kem instance.
PQLR_API pqlr_kem pqlr_kem_duplicate(const pqlr_kem kem)
duplicates the context of pqlr_kem algorithm
PQLR_API int pqlr_kem_encap(const pqlr_kem kem, const uint8_t *pk, uint8_t *ciphertext, uint8_t *session_key)
Second step of key distribution. Encapsulates key on the responder side.
PQLR_API int pqlr_kem_decap(const pqlr_kem kem, const uint8_t *sk, const uint8_t *ciphertext, uint8_t *session_key)
Last step of key distribution. Decapsulates key on the initiator side.
PQLR_API int pqlr_kem_keygen(const pqlr_kem kem, uint8_t *pk, uint8_t *sk)
Initial step of key distribution. Generates a key pair for key distribution initiator.