aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJ08nY2018-02-27 20:48:21 +0100
committerJ08nY2018-02-27 20:48:21 +0100
commit40cbb213ac910ddcaf22a26a247d2a9eeddca1fc (patch)
tree50c27834505d9994c9190bcb6ae7572bf2e9227b /src
parent9abe42674361c08cc73e3fdd3891f72acaddc859 (diff)
downloadecgen-40cbb213ac910ddcaf22a26a247d2a9eeddca1fc.tar.gz
ecgen-40cbb213ac910ddcaf22a26a247d2a9eeddca1fc.tar.zst
ecgen-40cbb213ac910ddcaf22a26a247d2a9eeddca1fc.zip
Diffstat (limited to 'src')
-rw-r--r--src/math/koblitz.c2
-rw-r--r--src/math/koblitz.h19
2 files changed, 19 insertions, 2 deletions
diff --git a/src/math/koblitz.c b/src/math/koblitz.c
index 48eec2a..10467e3 100644
--- a/src/math/koblitz.c
+++ b/src/math/koblitz.c
@@ -63,7 +63,7 @@ const koblitz_t *koblitz_find(unsigned int m, unsigned int a) {
sizeof(koblitz_t), &compare_koblitz);
}
-GEN koblitz_get_order(unsigned long m, unsigned int a) {
+GEN koblitz_get_order(unsigned int m, unsigned int a) {
const koblitz_t *found = koblitz_find(m, a);
if (found) {
return strtoi(found->hex_order);
diff --git a/src/math/koblitz.h b/src/math/koblitz.h
index 8284c2e..f1b87d2 100644
--- a/src/math/koblitz.h
+++ b/src/math/koblitz.h
@@ -14,10 +14,27 @@ typedef struct {
const char *hex_order;
} koblitz_t;
+/**
+ * @brief
+ * @param curve
+ * @return
+ */
bool koblitz_is_curve(const curve_t *curve);
+/**
+ * @brief
+ * @param m
+ * @param a
+ * @return
+ */
const koblitz_t *koblitz_find(unsigned int m, unsigned int a);
-GEN koblitz_get_order(unsigned long m, unsigned int a);
+/**
+ * @brief
+ * @param m
+ * @param a
+ * @return
+ */
+GEN koblitz_get_order(unsigned int m, unsigned int a);
#endif // ECGEN_KOBLITZ_H