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  0x25f681bdd6de6213,
57  0x8e2fcf9ac05ce645,
59  0xe683163eb7d661f4,
61  0x69a7f40591975179,
63  0xf93bfa7e3055a795,
64  pqlr_algorithm_xmss = 0x8f4ffb1fc25105ca,
66  0xf62df854fa55fd38,
67  pqlr_algorithm_drbg = 0xcb86e336a7c49070,
69  0xbb0be36f1cddb197
71 #ifdef WIN32
72 #pragma warning(default : 4309)
73 #endif
74 
82 
90 
95 #ifdef __cplusplus
96 } // extern "C"
97 #endif // __cplusplus
Linked to polynomial_hash instance id.
Definition: pqlr.h:62
Linked to mceliece instance id.
Definition: pqlr.h:65
Linked to xmssmt instance id.
Definition: pqlr.h:68
Linked to saber instance id.
Definition: pqlr.h:45
Linked to kryzhovnik instance id.
Definition: pqlr.h:58
Linked to dilithium instance id.
Definition: pqlr.h:54
Linked to sphinxp_gost instance id.
Definition: pqlr.h:48
#define PQLR_API
Definition: api.h:22
Linked to xmss instance id.
Definition: pqlr.h:64
Linked to drbg instance id.
Definition: pqlr.h:67
PQLR_API pqlr_t pqlr_singleton_instance(void)
Pqlr singleton instance accessor Please, note that any change in the global PQLR configuration does n...
Linked to newhope instance id.
Definition: pqlr.h:43
Linked to shipovnik instance id.
Definition: pqlr.h:56
struct pqlr_st * pqlr_t
Pqlr instance handle. Pqlr represents basic library and it&#39;s algorithms configuration. There are singleton instance which could be obtained by pqlr_singleton_instance and local instances which could be obtained from concrete algorithms instances. At the initialization point all the algorithms inherit pqlr&#39;s singleton instance state. Any change in the global configuration does not affect previously created algorithms.
Definition: pqlr.h:26
PQLR_API algorithm_id_t pqlr_get_algorithm_id(pqlr_t)
Detects algorithm type id.
Linked to hypericum instance id.
Definition: pqlr.h:50
Singleton instance id.
Definition: pqlr.h:42
Linked to rainbow instance id.
Definition: pqlr.h:60
Linked to sphincs_plus instance id.
Definition: pqlr.h:46
Linked to falcon instance id.
Definition: pqlr.h:52
algorithm_id_t
Pqlr instance type id.
Definition: pqlr.h:38