CiFEr
errors.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2018 XLAB d.o.o.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16 
17 #ifndef CIFER_ERRORS_H
18 #define CIFER_ERRORS_H
19 
28 typedef enum cfe_error {
29  CFE_ERR_NONE = 0,
30  CFE_ERR_INIT,
31 
32  CFE_ERR_MALFORMED_PUB_KEY,
33  CFE_ERR_MALFORMED_SEC_KEY,
34  CFE_ERR_MALFORMED_FE_KEY,
35  CFE_ERR_MALFORMED_CIPHER,
36  CFE_ERR_MALFORMED_INPUT,
37  CFE_ERR_BOUND_CHECK_FAILED,
38 
39  CFE_ERR_DLOG_NOT_FOUND,
40  CFE_ERR_DLOG_CALC_FAILED,
41  CFE_ERR_PRIME_GEN_FAILED,
42  CFE_ERR_PARAM_GEN_FAILED,
43  CFE_ERR_PUB_KEY_GEN_FAILED,
44  CFE_ERR_SEC_KEY_GEN_FAILED,
45 
46  CFE_ERR_PRECONDITION_FAILED,
47 
48  CFE_ERR_INSUFFICIENT_KEYS,
49  CFE_ERR_CORRUPTED_BOOL_EXPRESSION,
50  CFE_ERR_NO_SOLUTION_EXISTS,
51  CFE_ERR_NO_INVERSE,
52 } cfe_error;
53 
54 #endif