aboutsummaryrefslogtreecommitdiff
path: root/src/math/koblitz.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/math/koblitz.h')
-rw-r--r--src/math/koblitz.h23
1 files changed, 23 insertions, 0 deletions
diff --git a/src/math/koblitz.h b/src/math/koblitz.h
new file mode 100644
index 0000000..8284c2e
--- /dev/null
+++ b/src/math/koblitz.h
@@ -0,0 +1,23 @@
+/*
+ * ecgen, tool for generating Elliptic curve domain parameters
+ * Copyright (C) 2017-2018 J08nY
+ */
+#ifndef ECGEN_KOBLITZ_H
+#define ECGEN_KOBLITZ_H
+
+#include <stdbool.h>
+#include "misc/types.h"
+
+typedef struct {
+ unsigned int m;
+ unsigned int a;
+ const char *hex_order;
+} koblitz_t;
+
+bool koblitz_is_curve(const curve_t *curve);
+
+const koblitz_t *koblitz_find(unsigned int m, unsigned int a);
+
+GEN koblitz_get_order(unsigned long m, unsigned int a);
+
+#endif // ECGEN_KOBLITZ_H