blob: fe792d55237105f0df969796f5e7aa5f394a9caa (
plain)
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
69
70
71
72
73
74
75
76
|
/*
* ecgen, tool for generating Elliptic curve domain parameters
* Copyright (C) 2017 J08nY
*/
/**
* @file config.h
*/
#ifndef ECGEN_CONFIG_H
#define ECGEN_CONFIG_H
#include <stdbool.h>
#include <stddef.h>
enum field_e { FIELD_PRIME, FIELD_BINARY };
enum format_e { FORMAT_JSON, FORMAT_CSV };
enum points_e {
POINTS_NONE = 0,
POINTS_PRIME,
POINTS_RANDOM,
POINTS_ALL,
POINTS_NONPRIME
};
struct points_s {
enum points_e type;
size_t amount;
};
typedef enum {
SEED_NONE = 0,
SEED_ANSI,
SEED_BRAINPOOL,
SEED_BRAINPOOL_RFC,
SEED_FIPS
} seed_e;
typedef struct {
enum field_e field;
bool binary_field;
bool prime_field;
long count;
bool random;
bool prime;
bool invalid;
bool cm;
char *order;
bool anomalous;
bool koblitz;
long koblitz_value;
bool cofactor;
long cofactor_bound;
seed_e seed_algo;
char *seed;
bool unique;
struct points_s points;
char *datadir;
unsigned long memory;
unsigned long threads;
unsigned long thread_memory;
unsigned long timeout;
enum format_e format;
char *output;
char *input;
bool append;
long verbose;
char *verbose_log;
unsigned long bits;
unsigned long hex_digits;
} config_t;
#endif // ECGEN_CONFIG_H
|