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 
96 
107 
118 
129 
147  const shipovnik_t shipovnik, uint8_t* result_sk, uint8_t* result_pk);
148 
175  const shipovnik_t shipovnik,
176  const uint8_t* sk,
177  const uint8_t* msg,
178  size_t msg_len,
179  uint8_t* result_sig,
180  size_t* result_sig_len);
181 
205  const shipovnik_t shipovnik,
206  const uint8_t* pk,
207  const uint8_t* sig,
208  size_t sig_len,
209  const uint8_t* msg,
210  size_t msg_len);
211 
212 #ifdef __cplusplus
213 } // extern "C"
214 #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)
Casts shipovnik instance to pqlr 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