PQLR
Postquantum Crypto Library by QAPP
shipovnik.h
Go to the documentation of this file.
1 #pragma once
2 
3 #include "pqlr/common/pqlr.h"
4 #include "pqlr/common/api.h"
5 
6 #include "stdint.h"
7 #include "stddef.h"
8 
9 #ifdef __cplusplus
10 extern "C" {
11 #endif // __cplusplus
12 
45 typedef enum {
49 
55 typedef struct shipovnik_st* shipovnik_t;
56 
67 
76 
84 
97 
108 
119 
130 
148  const shipovnik_t shipovnik, uint8_t* result_sk, uint8_t* result_pk);
149 
176  const shipovnik_t shipovnik,
177  const uint8_t* sk,
178  const uint8_t* msg,
179  size_t msg_len,
180  uint8_t* result_sig,
181  size_t* result_sig_len);
182 
206  const shipovnik_t shipovnik,
207  const uint8_t* pk,
208  const uint8_t* sig,
209  size_t sig_len,
210  const uint8_t* msg,
211  size_t msg_len);
212 
213 #ifdef __cplusplus
214 } // extern "C"
215 #endif //__cplusplus
#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 shipovnik_verify(const shipovnik_t shipovnik, 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.
shipovnik_parameterset_t
Possible shipovnik parameters sets.
Definition: shipovnik.h:45
struct shipovnik_st * shipovnik_t
Shipovnik algorithm instance handle.
Definition: shipovnik.h:55
PQLR_API size_t shipovnik_get_public_key_bytes_len(const shipovnik_t shipovnik)
Obtains public key buffer length in bytes for current shipovnik instance.
PQLR_API size_t shipovnik_get_signature_bytes_len(shipovnik_t shipovnik)
Obtains signature buffer length in bytes for current shipovnik instance.
PQLR_API void shipovnik_sign(const shipovnik_t shipovnik, 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 pqlr_t shipovnik_to_pqlr(shipovnik_t shipovnik)
Gets pqlr instance linked to this shipovnik instance.
PQLR_API void shipovnik_free(shipovnik_t shipovnik)
Frees shipovnik instance and all corresponding resources.
PQLR_API shipovnik_t shipovnik_new(shipovnik_parameterset_t parameterset)
Creates new shipovnik instance with selected parameter set.
PQLR_API shipovnik_t shipovnik_duplicate(const shipovnik_t shipovnik)
Duplicates context of shipovnik instance.
PQLR_API void shipovnik_generate_keys(const shipovnik_t shipovnik, uint8_t *result_sk, uint8_t *result_pk)
Generates random secret key and public key for given context.
PQLR_API size_t shipovnik_get_secret_key_bytes_len(const shipovnik_t shipovnik)
Obtains secret key buffer length in bytes for current shipovnik instance.
@ shipovnik_last
Definition: shipovnik.h:47
@ shipovnik_default
Definition: shipovnik.h:46