PQLR
Postquantum Crypto Library by QAPP
pqlr.h
Go to the documentation of this file.
1 #pragma once
2 
3 #include <pqlr/common/api.h>
4 
5 #ifdef __cplusplus
6 extern "C" {
7 #endif
8 
26 typedef 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
38 typedef enum {
39  // NOTE: id values are picked via following script:
40  // echo "<algorithm name>" -n | sha1sum | head -c 16
41  // echo "kyber" -n | sha1sum | head -c 16
42 
43  pqlr_algorithm_general = 0xb01a41e3820cfefd,
45  0x5c56b689ca30d04f,
46  pqlr_algorithm_saber = 0xc83c3990d6c012b3,
48  0x2b95e6c0781512c2,
50  0x28dcc3e5f2449b31,
52  0xf6c7edcf74aa249e,
54  0x4bee1c9e7e65c9e4,
56  0x25f681bdd6de6213,
58  0x8e2fcf9ac05ce645,
60  0xe683163eb7d661f4,
62  0x69a7f40591975179,
64  0xf93bfa7e3055a795,
65  pqlr_algorithm_xmss = 0x8f4ffb1fc25105ca,
67  0xf62df854fa55fd38,
68  pqlr_algorithm_kyber = 0xdbd34adf68c5f0eb,
69  pqlr_algorithm_drbg = 0xcb86e336a7c49070,
71  0xbb0be36f1cddb197
73 #ifdef WIN32
74 #pragma warning(default : 4309)
75 #endif
84 
92 
97 #ifdef __cplusplus
98 } // extern "C"
99 #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:51
@ pqlr_algorithm_rainbow
Linked to rainbow instance id.
Definition: pqlr.h:61
@ pqlr_algorithm_saber
Linked to saber instance id.
Definition: pqlr.h:46
@ pqlr_algorithm_kyber
Linked to kyber instance id.
Definition: pqlr.h:68
@ pqlr_algorithm_general
Singleton instance id.
Definition: pqlr.h:43
@ pqlr_algorithm_polynomial_hash
Linked to polynomial_hash instance id.
Definition: pqlr.h:63
@ pqlr_algorithm_xmss
Linked to xmss instance id.
Definition: pqlr.h:65
@ pqlr_algorithm_sphincs_plus
Linked to sphincs_plus instance id.
Definition: pqlr.h:47
@ pqlr_algorithm_xmssmt
Linked to xmssmt instance id.
Definition: pqlr.h:70
@ pqlr_algorithm_drbg
Linked to drbg instance id.
Definition: pqlr.h:69
@ pqlr_algorithm_falcon
Linked to falcon instance id.
Definition: pqlr.h:53
@ pqlr_algorithm_shipovnik
Linked to shipovnik instance id.
Definition: pqlr.h:57
@ pqlr_algorithm_newhope
Linked to newhope instance id.
Definition: pqlr.h:44
@ pqlr_algorithm_dilithium
Linked to dilithium instance id.
Definition: pqlr.h:55
@ pqlr_algorithm_mceliece
Linked to mceliece instance id.
Definition: pqlr.h:66
@ pqlr_algorithm_sphinxp_gost
Linked to sphinxp_gost instance id.
Definition: pqlr.h:49
@ pqlr_algorithm_kryzhovnik
Linked to kryzhovnik instance id.
Definition: pqlr.h:59