166 const newhope_t newhope, uint8_t* public_key, uint8_t* secret_key);
191 const uint8_t* public_key,
193 uint8_t* session_key);
214 const uint8_t* secret_key,
215 const uint8_t* ciphertext,
#define PQLR_API
Definition: api.h:22
struct pqlr_st * pqlr_t
Pqlr instance handle. Pqlr represents basic library and it's algorithms configuration....
Definition: pqlr.h:26
newhope_parameterset_t
Possible newhope parameters sets.
Definition: newhope.h:52
PQLR_API uint32_t newhope_get_ciphertext_length(newhope_t newhope)
Obtains encoded reply length for current newhope instance.
PQLR_API void newhope_key_decap(const newhope_t newhope, const uint8_t *secret_key, const uint8_t *ciphertext, uint8_t *key)
Last step of key distribution. Generates symmetric secret key on initiator side.
PQLR_API newhope_t newhope_new(newhope_parameterset_t parameterset)
Creates newhope instance initialized by parameterset.
struct newhope_st * newhope_t
Newhope algorithm instance handle.
Definition: newhope.h:62
PQLR_API uint32_t newhope_get_initiator_public_length(newhope_t newhope)
Obtains initiator's public key length for current newhope instance.
PQLR_API uint32_t newhope_get_shared_secret_length(newhope_t newhope)
Obtains number of symmetric secret key bytes for current newhope instance.
PQLR_API void newhope_key_encap(const newhope_t newhope, const uint8_t *public_key, uint8_t *ciphertext, uint8_t *session_key)
Second step of key distribution. Generates symmetric secret key on responder side (opposite from init...
PQLR_API void newhope_free(newhope_t newhope)
Frees newhope instance and all corresponding resources.
PQLR_API pqlr_t newhope_to_pqlr(newhope_t newhope)
Casts newhope instance to pqlr instance.
PQLR_API newhope_t newhope_duplicate(const newhope_t newhope)
Duplicates context of newhope instance.
PQLR_API uint32_t newhope_get_initiator_secret_length(newhope_t newhope)
Obtains initiator's secret length for current newhope instance.
PQLR_API void newhope_keygen(const newhope_t newhope, uint8_t *public_key, uint8_t *secret_key)
Initial step of key distribution. Generates a key pair for key distribution initiator.
@ newhope_1024
1024 bytes secret length
Definition: newhope.h:53
@ newhope_last
Definition: newhope.h:54