151 const dilithium_t dilithium, uint8_t* result_sk, uint8_t* result_pk);
180 size_t* result_sig_len);
#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
PQLR_API int dilithium_verify(const dilithium_t dilithium, const uint8_t *pk, const uint8_t *sig, size_t sig_len, const uint8_t *msg, size_t msg_len)
Verifies that given signature is the signature of given message.
struct dilithium_st * dilithium_t
Dilithium algorithm instance handle.
Definition: dilithium.h:59
PQLR_API dilithium_t dilithium_new(dilithium_parameterset_t parameterset)
Creates new dilithium instance with selected parameter set.
PQLR_API void dilithium_free(dilithium_t dilithium)
Frees dilithium instance and all corresponding resources.
PQLR_API size_t dilithium_get_signature_bytes_len(dilithium_t dilithium)
Obtains signature buffer length in bytes for current dilithium instance.
PQLR_API pqlr_t dilithium_to_pqlr(dilithium_t dilithium)
Casts dilithium instance to pqlr instance.
PQLR_API void dilithium_generate_keys(const dilithium_t dilithium, uint8_t *result_sk, uint8_t *result_pk)
Generates random secret key and public key for given context.
PQLR_API void dilithium_sign(const dilithium_t dilithium, const uint8_t *sk, const uint8_t *msg, size_t msg_len, uint8_t *result_sig, size_t *result_sig_len)
Generates signature for given message according to context and secret key.
PQLR_API dilithium_t dilithium_duplicate(const dilithium_t dilithium)
Duplicates context of dilithium instance.
dilithium_parameterset_t
Possible dilithium parameters sets.
Definition: dilithium.h:44
PQLR_API size_t dilithium_get_public_key_bytes_len(const dilithium_t dilithium)
Obtains public key buffer length in bytes for current dilithium instance.
PQLR_API size_t dilithium_get_secret_key_bytes_len(const dilithium_t dilithium)
Obtains secret key buffer length in bytes for current dilithium instance.
@ dilithium_5_r
Definition: dilithium.h:50
@ dilithium_3
Definition: dilithium.h:46
@ dilithium_2_r
Definition: dilithium.h:48
@ dilithium_last
Definition: dilithium.h:51
@ dilithium_5
Definition: dilithium.h:47
@ dilithium_2
Definition: dilithium.h:45
@ dilithium_3_r
Definition: dilithium.h:49