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 
42  pqlr_algorithm_general = 0xb01a41e3820cfefd,
44  0x5c56b689ca30d04f,
45  pqlr_algorithm_saber = 0xc83c3990d6c012b3,
47  0x2b95e6c0781512c2,
49  0x28dcc3e5f2449b31,
51  0xf6c7edcf74aa249e,
53  0x4bee1c9e7e65c9e4,
55  0xc2c73927d27aa6de,
57  0x8e2fcf9ac05ce645,
59  0xe683163eb7d661f4,
61  0x69a7f40591975179,
63  0xf93bfa7e3055a795,
64  pqlr_algorithm_xmss = 0x8f4ffb1fc25105ca,
66  0xf62df854fa55fd38,
68  0xfa355a0881a036ac,
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:50
@ pqlr_algorithm_rainbow
Linked to rainbow instance id.
Definition: pqlr.h:60
@ pqlr_algorithm_saber
Linked to saber instance id.
Definition: pqlr.h:45
@ pqlr_algorithm_ml_kem
Linked to ml_kem instance id.
Definition: pqlr.h:67
@ pqlr_algorithm_general
Singleton instance id.
Definition: pqlr.h:42
@ pqlr_algorithm_polynomial_hash
Linked to polynomial_hash instance id.
Definition: pqlr.h:62
@ pqlr_algorithm_xmss
Linked to xmss instance id.
Definition: pqlr.h:64
@ pqlr_algorithm_sphincs_plus
Linked to sphincs_plus instance id.
Definition: pqlr.h:46
@ 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:52
@ pqlr_algorithm_shipovnik
Linked to shipovnik instance id.
Definition: pqlr.h:56
@ pqlr_algorithm_newhope
Linked to newhope instance id.
Definition: pqlr.h:43
@ pqlr_algorithm_mceliece
Linked to mceliece instance id.
Definition: pqlr.h:65
@ pqlr_algorithm_ml_dsa
Linked to ml_dsa instance id.
Definition: pqlr.h:54
@ pqlr_algorithm_sphinxp_gost
Linked to sphinxp_gost instance id.
Definition: pqlr.h:48
@ pqlr_algorithm_kryzhovnik
Linked to kryzhovnik instance id.
Definition: pqlr.h:58