PQLR
Postquantum Crypto Library
 
Loading...
Searching...
No Matches
pqlr.h
Go to the documentation of this file.
1#pragma once
2
3#include <pqlr/common/api.h>
4
5#ifdef __cplusplus
6extern "C" {
7#endif
8
26typedef struct pqlr_st* pqlr_t;
27
31// FIXME: MSVC: warning C4309: 'initializing': truncation of constant value
32// (value is too long for base enum type)
33// Consider using const uint64_t-s instead of enum
34#ifdef WIN32
35// for now just ignore C4309
36#pragma warning(disable : 4309)
37#endif
38typedef enum {
39 // NOTE: id values are picked via following script:
40 // echo "<algorithm name>" -n | sha1sum | head -c 16; echo ""
41
42 pqlr_algorithm_general = 0xb01a41e3820cfefd,
43 pqlr_algorithm_saber = 0xc83c3990d6c012b3,
45 0x13a56ec8b7733c73,
47 0xf6c7edcf74aa249e,
49 0x4bee1c9e7e65c9e4,
51 0xc2c73927d27aa6de,
53 0xf93bfa7e3055a795,
54 pqlr_algorithm_xmss = 0x8f4ffb1fc25105ca,
56 0xfa355a0881a036ac,
57 pqlr_algorithm_drbg = 0xcb86e336a7c49070,
59 0xbb0be36f1cddb197,
61 0xf440e015ee0f9ad2
63#ifdef WIN32
64#pragma warning(default : 4309)
65#endif
74
82
87#ifdef __cplusplus
88} // extern "C"
89#endif // __cplusplus
#define PQLR_API
Definition api.h:22
algorithm_id_t
Pqlr instance type id.
Definition pqlr.h:38
PQLR_API algorithm_id_t pqlr_get_algorithm_id(pqlr_t)
Detects algorithm type id.
PQLR_API pqlr_t pqlr_singleton_instance(void)
Pqlr singleton instance accessor Please, note that any change in the global PQLR configuration does n...
struct pqlr_st * pqlr_t
Pqlr instance handle. Pqlr represents basic library and it's algorithms configuration....
Definition pqlr.h:26
@ pqlr_algorithm_hypericum
Linked to hypericum instance id.
Definition pqlr.h:46
@ pqlr_algorithm_saber
Linked to saber instance id.
Definition pqlr.h:43
@ pqlr_algorithm_ml_kem
Linked to ml_kem instance id.
Definition pqlr.h:55
@ pqlr_algorithm_general
Singleton instance id.
Definition pqlr.h:42
@ pqlr_algorithm_zemlyanika
Linked to zemlyanika instance id.
Definition pqlr.h:60
@ pqlr_algorithm_polynomial_hash
Linked to polynomial_hash instance id.
Definition pqlr.h:52
@ pqlr_algorithm_xmss
Linked to xmss instance id.
Definition pqlr.h:54
@ pqlr_algorithm_xmssmt
Linked to xmssmt instance id.
Definition pqlr.h:58
@ pqlr_algorithm_drbg
Linked to drbg instance id.
Definition pqlr.h:57
@ pqlr_algorithm_falcon
Linked to falcon instance id.
Definition pqlr.h:48
@ pqlr_algorithm_ml_dsa
Linked to ml_dsa instance id.
Definition pqlr.h:50
@ pqlr_algorithm_slh_dsa
Linked to slh_dsa instance id.
Definition pqlr.h:44