-
Notifications
You must be signed in to change notification settings - Fork 5
/
instances.h
68 lines (57 loc) · 1.41 KB
/
instances.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
/*
* SPDX-License-Identifier: MIT
*/
#ifndef INSTANCES_H
#define INSTANCES_H
#include "macros.h"
#include <stddef.h>
#include <stdint.h>
#define MAX_LAMBDA 256
#define MAX_LAMBDA_BYTES (MAX_LAMBDA / 8)
#define MAX_DEPTH 12
#define MAX_TAU 32
#define UNIVERSAL_HASH_B_BITS 16
#define UNIVERSAL_HASH_B (UNIVERSAL_HASH_B_BITS / 8)
#define IV_SIZE 16
FAEST_BEGIN_C_DECL
typedef enum faest_paramid_t {
PARAMETER_SET_INVALID = 0,
FAEST_128S = 1,
FAEST_128F = 2,
FAEST_192S = 3,
FAEST_192F = 4,
FAEST_256S = 5,
FAEST_256F = 6,
FAEST_EM_128S = 7,
FAEST_EM_128F = 8,
FAEST_EM_192S = 9,
FAEST_EM_192F = 10,
FAEST_EM_256S = 11,
FAEST_EM_256F = 12,
PARAMETER_SET_MAX_INDEX = 13
} faest_paramid_t;
typedef struct faest_param_t {
uint16_t lambda;
uint16_t Nwd;
uint16_t Ske;
uint16_t R;
uint16_t Senc;
uint16_t l;
uint16_t Lke;
uint16_t Lenc;
uint16_t tau;
uint16_t k0;
uint16_t k1;
uint16_t t0;
uint16_t t1;
uint16_t sigSize;
uint16_t pkSize;
} faest_param_t;
typedef struct faest_paramset_t {
faest_param_t faest_param;
faest_paramid_t faest_paramid;
} faest_paramset_t;
const char* ATTR_CONST faest_get_param_name(faest_paramid_t paramid);
faest_paramset_t ATTR_CONST faest_get_paramset(faest_paramid_t paramid);
FAEST_END_C_DECL
#endif