PQLR
Postquantum Crypto Library
 
Loading...
Searching...
No Matches
zemlyanika.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
8#ifdef __cplusplus
9extern "C" {
10#endif // __cplusplus
11
45// clang-format off
60// clang-format on
68
74typedef struct zemlyanika_st* zemlyanika_t;
75
88
97
107PQLR_API uint32_t
109
119PQLR_API uint32_t
121
131
141
154
162
184 const zemlyanika_t zemlyanika, uint8_t* public_key, uint8_t* secret_key);
185
209 const zemlyanika_t zemlyanika,
210 const uint8_t* public_key,
211 uint8_t* ciphertext,
212 uint8_t* session_key);
213
238 const zemlyanika_t zemlyanika,
239 const uint8_t* secret_key,
240 const uint8_t* ciphertext,
241 uint8_t* session_key);
242
247#ifdef __cplusplus
248} // extern "C"
249#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 zemlyanika_key_decap(const zemlyanika_t zemlyanika, const uint8_t *secret_key, const uint8_t *ciphertext, uint8_t *session_key)
Key decapsulation.
PQLR_API uint32_t zemlyanika_get_initiator_public_length(zemlyanika_t zemlyanika)
Obtains initiator's public key length for the current Zemlyanika instance.
zemlyanika_parameterset_t
Possible Zemlyanika parameter sets.
Definition zemlyanika.h:61
PQLR_API uint32_t zemlyanika_get_ciphertext_length(zemlyanika_t zemlyanika)
Obtains ciphertext length for the current Zemlyanika instance.
struct zemlyanika_st * zemlyanika_t
Zemlyanika algorithm instance handle.
Definition zemlyanika.h:74
PQLR_API pqlr_t zemlyanika_to_pqlr(zemlyanika_t zemlyanika)
Gets pqlr instance linked to this Zemlyanika instance.
PQLR_API uint32_t zemlyanika_get_shared_secret_length(zemlyanika_t zemlyanika)
Obtains shared secret length for the current Zemlyanika instance.
PQLR_API zemlyanika_t zemlyanika_duplicate(const zemlyanika_t zemlyanika)
Duplicates context of Zemlyanika instance.
PQLR_API void zemlyanika_free(zemlyanika_t zemlyanika)
Frees Zemlyanika instance and all corresponding resources.
PQLR_API zemlyanika_t zemlyanika_new(zemlyanika_parameterset_t parameterset)
Creates Zemlyanika instance initialized by parameterset.
PQLR_API uint32_t zemlyanika_get_initiator_secret_length(zemlyanika_t zemlyanika)
Obtains initiator's secret key length for the current Zemlyanika instance.
PQLR_API int zemlyanika_key_encap(const zemlyanika_t zemlyanika, const uint8_t *public_key, uint8_t *ciphertext, uint8_t *session_key)
Key encapsulation.
PQLR_API int zemlyanika_keygen(const zemlyanika_t zemlyanika, uint8_t *public_key, uint8_t *secret_key)
Initial step of key distribution. Generates a key pair for key distribution initiator.
@ zemlyanika_768R
Definition zemlyanika.h:63
@ zemlyanika_512
Definition zemlyanika.h:62
@ zemlyanika_768C
Definition zemlyanika.h:64
@ zemlyanika_parameterset_last
Definition zemlyanika.h:66
@ zemlyanika_1024
Definition zemlyanika.h:65