#define PQLR_API
Definition: api.h:22
struct pqlr_alg_st * pqlr_alg
PQLR algorithm instance handle.
Definition: alg.h:32
PQLR_API size_t pqlr_dsa_get_public_key_bytes_len(const pqlr_dsa dsa)
Obtains public key buffer length in bytes for current pqlr_dsa instance.
PQLR_API size_t pqlr_dsa_get_signature_bytes_len(const pqlr_dsa dsa)
Obtains signature buffer length in bytes for current pqlr_dsa instance.
PQLR_API size_t pqlr_dsa_get_algs(const char **algs, size_t count)
Fills the provided buffer with names of available DSA algorithms.
PQLR_API pqlr_dsa pqlr_dsa_duplicate(const pqlr_dsa src)
Duplicates context copying all related resources.
PQLR_API size_t pqlr_dsa_get_secret_key_bytes_len(const pqlr_dsa dsa)
Obtains secret key buffer length in bytes for current pqlr_dsa instance.
PQLR_API void pqlr_dsa_free(pqlr_dsa dsa)
Frees pqlr_dsa instance and all corresponding resources.
struct pqlr_dsa_st * pqlr_dsa
PQLR DSA instance handle.
Definition: dsa.h:41
PQLR_API int pqlr_dsa_keygen(const pqlr_dsa dsa, uint8_t *sk, uint8_t *pk)
Generates random secret key and public key for given context.
PQLR_API size_t pqlr_dsa_num_algs(void)
Obtains the number of available PQLR DSA algorithms.
PQLR_API int pqlr_dsa_verify(const pqlr_dsa dsa, 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.
PQLR_API pqlr_dsa pqlr_dsa_new(const pqlr_alg alg)
Creates new pqlr_dsa instance with selected parameter set.
PQLR_API int pqlr_dsa_sign(const pqlr_dsa dsa, const uint8_t *sk, const uint8_t *msg, size_t msg_len, uint8_t *result_sig, size_t *sig_len)
Generates signature for given message according to context and secret key.