ISARA Radiate Key State Manager  Version 1.2
A framework for safe storage of LMS private key state.
ikm_retval.h
Go to the documentation of this file.
1 
13 #ifndef IKM_RETVAL_H
14 #define IKM_RETVAL_H
15 
16 #ifdef __cplusplus
17 extern "C" {
18 #endif
19 
20 #include "iqr_api.h"
21 
22 typedef enum {
24  IKM_OK = 0,
25 
26  // -----------------------------------------------------------------------------------------------------------------------------
27  // General error values.
28  // -----------------------------------------------------------------------------------------------------------------------------
29 
31  IKM_ENULLPTR = -1001,
32 
34  IKM_ENOMEM = -1002,
35 
37  IKM_ENOTINIT = -1003,
38 
40  IKM_EINVBUFSIZE = -1004,
41 
43  IKM_EBADVALUE = -1005,
44 
46  IKM_EOUTOFRANGE = -1006,
47 
50 
52  IKM_EINVOBJECT = -1008,
53 
56 
59 
61  IKM_EINVDATA = -1011,
62 
65  IKM_EINVPTR = -1012,
66 
68  IKM_EPTROVERLAP = -1013,
69 
70  // -----------------------------------------------------------------------------------------------------------------------------
71  // Algorithm error values.
72  // -----------------------------------------------------------------------------------------------------------------------------
73 
76 
79 
80  // -----------------------------------------------------------------------------------------------------------------------------
81  // Key error values.
82  // -----------------------------------------------------------------------------------------------------------------------------
83 
86 
89 
92 
95 
98 
99  // -----------------------------------------------------------------------------------------------------------------------------
100  // Random Number Generator error values.
101  // -----------------------------------------------------------------------------------------------------------------------------
102 
104  IKM_ENOTSEEDED = -4001,
105 
107  IKM_ERESEED = -4002,
108 
109  // -----------------------------------------------------------------------------------------------------------------------------
110  // File IO error values.
111  // -----------------------------------------------------------------------------------------------------------------------------
112 
115  IKM_EIOFAILURE = -7001,
116 
119 } ikm_retval;
120 
121 // ---------------------------------------------------------------------------------------------------------------------------------
122 // Helper functions.
123 // ---------------------------------------------------------------------------------------------------------------------------------
124 
134 IQR_API
135 const char *ikm_StrError(ikm_retval ret);
136 
137 #ifdef __cplusplus
138 }
139 #endif
140 
141 #endif /* IKM_RETVAL_H */
The provided buffer has an invalid size.
Definition: ikm_retval.h:40
The key cannot be used to create more signatures.
Definition: ikm_retval.h:97
The specified structure is not initialized.
Definition: ikm_retval.h:37
The provided callback pointers are invalid.
Definition: ikm_retval.h:55
Definition: ikm_retval.h:65
IQR_API const char * ikm_StrError(ikm_retval ret)
Input and output pointers must not be overlapping buffers.
Definition: ikm_retval.h:68
The parameter value is valid but not supported.
Definition: ikm_retval.h:49
A NULL pointer was passed in where a valid pointer was expected.
Definition: ikm_retval.h:31
The Random Number Generator must be reseeded.
Definition: ikm_retval.h:107
ikm_retval
Definition: ikm_retval.h:22
The parameter value is not valid.
Definition: ikm_retval.h:43
File path or file name is invalid.
Definition: ikm_retval.h:118
The algorithm state is invalid.
Definition: ikm_retval.h:75
The parameter value is out of range.
Definition: ikm_retval.h:46
The Random Number Generator has not been seeded.
Definition: ikm_retval.h:104
The provided data is invalid.
Definition: ikm_retval.h:61
Success, function completed successfully.
Definition: ikm_retval.h:24
The public key is not derived from the private key.
Definition: ikm_retval.h:91
The provided hashing algorithm is not valid for this key type.
Definition: ikm_retval.h:78
The private key is invalid.
Definition: ikm_retval.h:88
Memory allocation failed.
Definition: ikm_retval.h:34
The signature of the message is invalid.
Definition: ikm_retval.h:94
The object is invalid.
Definition: ikm_retval.h:52
Definition: ikm_retval.h:115
The public key is invalid.
Definition: ikm_retval.h:85
Callbacks to an algorithm were not registered prior to use.
Definition: ikm_retval.h:58