aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/exhaustive/anomalous.h6
-rw-r--r--src/exhaustive/exhaustive.c6
-rw-r--r--src/exhaustive/exhaustive.h2
-rw-r--r--src/gen/curve.h4
-rw-r--r--src/gen/equation.h24
-rw-r--r--src/gen/field.h6
-rw-r--r--src/gen/gens.h4
-rw-r--r--src/gen/order.h10
-rw-r--r--src/gen/point.h12
-rw-r--r--src/invalid/invalid.c10
-rw-r--r--src/misc/types.h4
11 files changed, 44 insertions, 44 deletions
diff --git a/src/exhaustive/anomalous.h b/src/exhaustive/anomalous.h
index 1750f4b..c23490f 100644
--- a/src/exhaustive/anomalous.h
+++ b/src/exhaustive/anomalous.h
@@ -20,7 +20,7 @@ typedef struct disc_t {
} disc_t;
/**
- * GENERATOR(gen_t)
+ * GENERATOR(gen_f)
*
* @param curve A curve_t being generated
* @param cfg An application config
@@ -30,7 +30,7 @@ typedef struct disc_t {
GENERATOR(anomalous_gen_field);
/**
- * GENERATOR(gen_t)
+ * GENERATOR(gen_f)
*
* @param curve A curve_t being generated
* @param cfg An application config
@@ -40,7 +40,7 @@ GENERATOR(anomalous_gen_field);
GENERATOR(anomalous_gen_equation);
/**
- * GENERATOR(gen_t)
+ * GENERATOR(gen_f)
*
* @param curve A curve_t being generated
* @param cfg An application config
diff --git a/src/exhaustive/exhaustive.c b/src/exhaustive/exhaustive.c
index afbacff..b32daa3 100644
--- a/src/exhaustive/exhaustive.c
+++ b/src/exhaustive/exhaustive.c
@@ -15,7 +15,7 @@
#include "io/output.h"
#include "util/memory.h"
-static void exhaustive_ginit(gen_t *generators, const config_t *cfg) {
+static void exhaustive_ginit(gen_f *generators, const config_t *cfg) {
if (cfg->seed_algo) {
switch (cfg->seed_algo) {
case SEED_ANSI: {
@@ -181,7 +181,7 @@ int exhaustive_gen_retry(curve_t *curve, const config_t *cfg,
if (start_offset > end_offset) {
return 0;
}
- gen_t *generators = setup->generators;
+ gen_f *generators = setup->generators;
check_t *validators = setup->validators;
arg_t **argss = setup->argss;
unroll_t *unrolls = setup->unrolls;
@@ -271,7 +271,7 @@ static void exhaustive_quit(arg_t *argss[]) {
int exhaustive_do(config_t *cfg) {
debug_log_start("Starting Exhaustive method");
- gen_t generators[OFFSET_END] = {NULL};
+ gen_f generators[OFFSET_END] = {NULL};
check_t validators[OFFSET_END] = {NULL};
arg_t *argss[OFFSET_END] = {NULL};
unroll_t unrolls[OFFSET_END] = {NULL};
diff --git a/src/exhaustive/exhaustive.h b/src/exhaustive/exhaustive.h
index 9419ff4..5343af0 100644
--- a/src/exhaustive/exhaustive.h
+++ b/src/exhaustive/exhaustive.h
@@ -11,7 +11,7 @@
#include "misc/types.h"
typedef struct {
- gen_t *generators;
+ gen_f *generators;
check_t *validators;
arg_t **argss;
unroll_t *unrolls;
diff --git a/src/gen/curve.h b/src/gen/curve.h
index 1f823df..7694078 100644
--- a/src/gen/curve.h
+++ b/src/gen/curve.h
@@ -12,7 +12,7 @@
#include "misc/types.h"
/**
- * GENERATOR(gen_t)
+ * GENERATOR(gen_f)
* Creates a curve GEN in curve_t curve from field, a and b.
* Always succeeds.
*
@@ -24,7 +24,7 @@
GENERATOR(curve_gen_any);
/**
- * GENERATOR(gen_t)
+ * GENERATOR(gen_f)
* Creates a curve GEN in curve_t curve from field, a and b.
* Succeeds if a curve exists(non-zero discriminant).
*
diff --git a/src/gen/equation.h b/src/gen/equation.h
index 665c153..aece5fa 100644
--- a/src/gen/equation.h
+++ b/src/gen/equation.h
@@ -11,7 +11,7 @@
#include "misc/types.h"
/**
- * GENERATOR(gen_t)
+ * GENERATOR(gen_f)
* Creates a random a parameter by selecting a random field
* element from the curve field.
* Always succeeds.
@@ -24,7 +24,7 @@
GENERATOR(a_gen_random);
/**
- * GENERATOR(gen_t)
+ * GENERATOR(gen_f)
* Creates a parameter by reading from input.
*
* @param curve A curve_t being generated
@@ -35,7 +35,7 @@ GENERATOR(a_gen_random);
GENERATOR(a_gen_input);
/**
- * GENERATOR(gen_t)
+ * GENERATOR(gen_f)
* Creates a parameter by reading once from input.
*
* @param curve A curve_t being generated
@@ -46,7 +46,7 @@ GENERATOR(a_gen_input);
GENERATOR(a_gen_once);
/**
- * GENERATOR(gen_t)
+ * GENERATOR(gen_f)
* Creates a parameter set to zero.
*
* @param curve A curve_t being generated
@@ -57,7 +57,7 @@ GENERATOR(a_gen_once);
GENERATOR(a_gen_zero);
/**
- * GENERATOR(gen_t)
+ * GENERATOR(gen_f)
* Creates a parameter set to one.
*
* @param curve A curve_t being generated
@@ -68,7 +68,7 @@ GENERATOR(a_gen_zero);
GENERATOR(a_gen_one);
/**
- * GENERATOR(gen_t)
+ * GENERATOR(gen_f)
*
* @param curve A curve_t being generated
* @param cfg An application config
@@ -78,7 +78,7 @@ GENERATOR(a_gen_one);
GENERATOR(a_gen_seed);
/**
- * GENERATOR(gen_t)
+ * GENERATOR(gen_f)
* Creates a random b parameter by selecting a random field
* element from the curve field.
*
@@ -90,7 +90,7 @@ GENERATOR(a_gen_seed);
GENERATOR(b_gen_random);
/**
- * GENERATOR(gen_t)
+ * GENERATOR(gen_f)
* Creates b parameter by reading from input.
*
* @param curve A curve_t being generated
@@ -101,7 +101,7 @@ GENERATOR(b_gen_random);
GENERATOR(b_gen_input);
/**
- * GENERATOR(gen_t)
+ * GENERATOR(gen_f)
* Creates b parameter by reading once from input.
*
* @param curve A curve_t being generated
@@ -112,7 +112,7 @@ GENERATOR(b_gen_input);
GENERATOR(b_gen_once);
/**
- * GENERATOR(gen_t)
+ * GENERATOR(gen_f)
* Creates b parameter set to zero.
*
* @param curve A curve_t being generated
@@ -123,7 +123,7 @@ GENERATOR(b_gen_once);
GENERATOR(b_gen_zero);
/**
- * GENERATOR(gen_t)
+ * GENERATOR(gen_f)
* Creates b parameter set to one.
*
* @param curve A curve_t being generated
@@ -134,7 +134,7 @@ GENERATOR(b_gen_zero);
GENERATOR(b_gen_one);
/**
- * GENERATOR(gen_t)
+ * GENERATOR(gen_f)
*
* @param curve A curve_t being generated
* @param cfg An application config
diff --git a/src/gen/field.h b/src/gen/field.h
index da31298..e02c0b4 100644
--- a/src/gen/field.h
+++ b/src/gen/field.h
@@ -11,7 +11,7 @@
#include "misc/types.h"
/**
- * GENERATOR(gen_t)
+ * GENERATOR(gen_f)
* Creates a random field.
* Always succeeds.
*
@@ -23,7 +23,7 @@
GENERATOR(field_gen_random);
/**
- * GENERATOR(gen_t)
+ * GENERATOR(gen_f)
* Creates a field by reading:
* - a prime number in the prime field case
* - three short exponents of the reduction polynomial in the binary case
@@ -36,7 +36,7 @@ GENERATOR(field_gen_random);
GENERATOR(field_gen_input);
/**
- * GENERATOR(gen_t)
+ * GENERATOR(gen_f)
* Creates the field by reading it once.
*
* @param curve A curve_t being generated
diff --git a/src/gen/gens.h b/src/gen/gens.h
index c9e8169..29a44e0 100644
--- a/src/gen/gens.h
+++ b/src/gen/gens.h
@@ -12,7 +12,7 @@
#include "misc/types.h"
/**
- * GENERATOR(gen_t)
+ * GENERATOR(gen_f)
*
* @param curve A curve_t being generated
* @param cfg An application config
@@ -22,7 +22,7 @@
GENERATOR(gens_gen_any);
/**
- * GENERATOR(gen_t)
+ * GENERATOR(gen_f)
*
* @param curve A curve_t being generated
* @param cfg An application config
diff --git a/src/gen/order.h b/src/gen/order.h
index e798012..14f5a45 100644
--- a/src/gen/order.h
+++ b/src/gen/order.h
@@ -11,7 +11,7 @@
#include "misc/types.h"
/**
- * GENERATOR(gen_t)
+ * GENERATOR(gen_f)
* Reads the curve order from input, does not verify it.
*
* @param curve A curve_t being generated
@@ -23,7 +23,7 @@
GENERATOR(order_gen_input);
/**
- * GENERATOR(gen_t)
+ * GENERATOR(gen_f)
* Calculates the curve order, using a general algorithm.
* Always succeeds.
*
@@ -35,7 +35,7 @@ GENERATOR(order_gen_input);
GENERATOR(order_gen_any);
/**
- * GENERATOR(gen_t)
+ * GENERATOR(gen_f)
* Calculates the curve order, using the SEA algorithm.
*
* @param curve A curve_t being generated
@@ -46,7 +46,7 @@ GENERATOR(order_gen_any);
GENERATOR(order_gen_sea);
/**
- * GENERATOR(gen_t)
+ * GENERATOR(gen_f)
*
* @param curve A curve_t being generated
* @param cfg An application config
@@ -56,7 +56,7 @@ GENERATOR(order_gen_sea);
GENERATOR(order_gen_smallfact);
/**
- * GENERATOR(gen_t)
+ * GENERATOR(gen_f)
* Calculates the curve order, always using the SEA algorithm,
* gives up early in case the order is divisible by "something".
* Succeeds if the curve has a prime order.
diff --git a/src/gen/point.h b/src/gen/point.h
index fdca6f7..7daabe4 100644
--- a/src/gen/point.h
+++ b/src/gen/point.h
@@ -107,7 +107,7 @@ void points_free(point_t ***point);
void points_free_deep(point_t ***points, size_t npoints);
/**
- * GENERATOR(gen_t)
+ * GENERATOR(gen_f)
*
* @param curve A curve_t being generated
* @param cfg An application config
@@ -117,7 +117,7 @@ void points_free_deep(point_t ***points, size_t npoints);
GENERATOR(point_gen_random);
/**
- * GENERATOR(gen_t)
+ * GENERATOR(gen_f)
*
* @param curve A curve_t being generated
* @param cfg An application config
@@ -127,7 +127,7 @@ GENERATOR(point_gen_random);
GENERATOR(points_gen_random);
/**
- * GENERATOR(gen_t)
+ * GENERATOR(gen_f)
* Generates prime order points using trial division.
*
* Assumes the primes divide curve order, thus that points with all
@@ -141,7 +141,7 @@ GENERATOR(points_gen_random);
GENERATOR(points_gen_trial);
/**
- * GENERATOR(gen_t)
+ * GENERATOR(gen_f)
*
* Cauchy:
* Let G be a finite group and p be a prime. If p divides the order of G, then
@@ -155,7 +155,7 @@ GENERATOR(points_gen_trial);
GENERATOR(points_gen_prime);
/**
- * GENERATOR(gen_t)
+ * GENERATOR(gen_f)
*
* Generates points on all subgroups of the curve. Prime and non-prime order.
*
@@ -167,7 +167,7 @@ GENERATOR(points_gen_prime);
GENERATOR(points_gen_allgroups);
/**
- * GENERATOR(gen_t)
+ * GENERATOR(gen_f)
*
* Generates points on non-prime order of the curve.
*
diff --git a/src/invalid/invalid.c b/src/invalid/invalid.c
index f0a1941..03bf44c 100644
--- a/src/invalid/invalid.c
+++ b/src/invalid/invalid.c
@@ -15,7 +15,7 @@
#include "io/output.h"
#include "util/memory.h"
-static void invalid_original_ginit(gen_t *generators, const config_t *cfg) {
+static void invalid_original_ginit(gen_f *generators, const config_t *cfg) {
generators[OFFSET_SEED] = &gen_skip;
if (cfg->random) {
generators[OFFSET_FIELD] = &field_gen_random;
@@ -31,7 +31,7 @@ static void invalid_original_ginit(gen_t *generators, const config_t *cfg) {
generators[OFFSET_ORDER] = &order_gen_any;
}
-static void invalid_invalid_ginit(gen_t *generators, const config_t *cfg) {
+static void invalid_invalid_ginit(gen_f *generators, const config_t *cfg) {
generators[OFFSET_SEED] = &gen_skip;
generators[OFFSET_FIELD] = &gen_skip;
generators[OFFSET_A] = &gen_skip;
@@ -277,7 +277,7 @@ static size_t invalid_curves_threaded(const curve_t *curve, const config_t *cfg,
int invalid_do(config_t *cfg) {
debug_log_start("Starting Invalid curve method");
- gen_t original_gens[OFFSET_END];
+ gen_f original_gens[OFFSET_END];
arg_t *original_argss[OFFSET_END];
unroll_t common_unrolls[OFFSET_END];
invalid_original_ginit(original_gens, cfg);
@@ -309,8 +309,8 @@ int invalid_do(config_t *cfg) {
curve_t **curves = try_calloc(nprimes * sizeof(curve_t *));
- // init the invalid curve gen_t
- gen_t invalid_gens[OFFSET_END];
+ // init the invalid curve gen_f
+ gen_f invalid_gens[OFFSET_END];
invalid_invalid_ginit(invalid_gens, cfg);
exhaustive_t invalid_setup = {.generators = invalid_gens,
.validators = NULL,
diff --git a/src/misc/types.h b/src/misc/types.h
index b8d63d7..14ff1fc 100644
--- a/src/misc/types.h
+++ b/src/misc/types.h
@@ -121,7 +121,7 @@ typedef struct {
#define GENERATOR(gen_name) \
int gen_name(curve_t *curve, const config_t *cfg, arg_t *args)
-typedef GENERATOR((*gen_t));
+typedef GENERATOR((*gen_f));
/**
* @brief An unroll function type
@@ -149,7 +149,7 @@ typedef UNROLL((*unroll_t));
typedef CHECK((*check_t));
/**
- * GENERATOR(gen_t)
+ * GENERATOR(gen_f)
*
* @param curve A curve_t being generated
* @param cfg An application config