aboutsummaryrefslogtreecommitdiff
path: root/src/exhaustive/anomalous.h
blob: c23490f1de298331d56abfb4c731787e813a62c4 (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
/*
 * ecgen, tool for generating Elliptic curve domain parameters
 * Copyright (C) 2017 J08nY
 */
/**
 * @file anomalous.h
 */
#ifndef ECGEN_ANOMALOUS_H
#define ECGEN_ANOMALOUS_H

#include <pari/pari.h>
#include "arg.h"
#include "io/cli.h"
#include "misc/types.h"

typedef struct disc_t {
	GEN d;
	GEN j;
	GEN alpha;
} disc_t;

/**
 * GENERATOR(gen_f)
 *
 * @param curve A curve_t being generated
 * @param cfg An application config
 * @param args the index of the discriminant to use, in the disc_table
 * @return state diff
 */
GENERATOR(anomalous_gen_field);

/**
 * GENERATOR(gen_f)
 *
 * @param curve A curve_t being generated
 * @param cfg An application config
 * @param args the index of the discriminant to use, in the disc_table
 * @return state diff
 */
GENERATOR(anomalous_gen_equation);

/**
 * GENERATOR(gen_f)
 *
 * @param curve A curve_t being generated
 * @param cfg An application config
 * @param args unused
 * @return state diff
 */
GENERATOR(anomalous_gen_order);

/**
 * @brief Initialize anomalous generation, allocate and set the disc_table.
 */
void anomalous_init();

/**
 * @brief Deinitialize anomalous generation, free the discriminants from the
 * disc_table.
 */
void anomalous_quit();

#endif  // ECGEN_ANOMALOUS_H