aboutsummaryrefslogtreecommitdiff
path: root/src/types.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/types.h')
-rw-r--r--src/types.h31
1 files changed, 31 insertions, 0 deletions
diff --git a/src/types.h b/src/types.h
new file mode 100644
index 0000000..883dc50
--- /dev/null
+++ b/src/types.h
@@ -0,0 +1,31 @@
+/*
+ * ecgen, tool for generating Elliptic curve domain parameters
+ * Copyright (C) 2017 J08nY
+ */
+#ifndef ECGEN_TYPES_H
+#define ECGEN_TYPES_H
+
+#include <pari/pari.h>
+#include "cli.h"
+
+typedef struct seed { GEN seed; } seed_t;
+
+typedef struct point_t {
+ GEN point;
+ GEN order;
+} point_t;
+
+typedef struct curve {
+ seed_t *seed;
+ GEN field;
+ GEN a;
+ GEN b;
+ GEN curve;
+ GEN order;
+ point_t **points;
+ size_t npoints;
+} curve_t;
+
+typedef int (*gen_t)(curve_t *, config_t *);
+
+#endif // ECGEN_TYPES_H