PQLR
Postquantum Crypto Library by QAPP
dsa.h File Reference
#include <pqlr/common/alg.h>
#include <stddef.h>
#include <stdlib.h>

Go to the source code of this file.

Typedefs

typedef struct pqlr_dsa_st * pqlr_dsa
 PQLR DSA instance handle. More...
 

Functions

PQLR_API size_t pqlr_dsa_num_algs (void)
 Obtains the number of available PQLR DSA algorithms. More...
 
PQLR_API size_t pqlr_dsa_get_algs (const char **algs, size_t count)
 Fills the provided buffer with names of available DSA algorithms. More...
 
PQLR_API pqlr_dsa pqlr_dsa_new (const pqlr_alg alg)
 Creates new pqlr_dsa instance with selected parameter set. More...
 
PQLR_API void pqlr_dsa_free (pqlr_dsa dsa)
 Frees pqlr_dsa instance and all corresponding resources. More...
 
PQLR_API pqlr_dsa pqlr_dsa_duplicate (const pqlr_dsa src)
 Duplicates context copying all related resources. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...