diff options
| author | J08nY | 2017-07-20 00:43:46 +0200 |
|---|---|---|
| committer | J08nY | 2017-07-20 00:43:46 +0200 |
| commit | 75c07ec3d7c24b37b6afa0e832a5e1b52927d83b (patch) | |
| tree | 39fa6c50bc72b8f4c12502922166a79072275e35 | |
| parent | ec0ebff3d6b1a4aae44189eaae7baefead78cf9c (diff) | |
| download | ecgen-75c07ec3d7c24b37b6afa0e832a5e1b52927d83b.tar.gz ecgen-75c07ec3d7c24b37b6afa0e832a5e1b52927d83b.tar.zst ecgen-75c07ec3d7c24b37b6afa0e832a5e1b52927d83b.zip | |
Some cleanup of unused stuff.
| -rw-r--r-- | src/gen/point.c | 1 | ||||
| -rw-r--r-- | src/math/subgroups.c | 19 |
2 files changed, 18 insertions, 2 deletions
diff --git a/src/gen/point.c b/src/gen/point.c index 0c6e99e..42f20db 100644 --- a/src/gen/point.c +++ b/src/gen/point.c @@ -5,7 +5,6 @@ #include "point.h" #include "io/output.h" #include "math/subgroups.h" -#include "types.h" #include "util/memory.h" point_t *point_new(void) { return try_calloc(sizeof(point_t)); } diff --git a/src/math/subgroups.c b/src/math/subgroups.c index e01d6cc..4df4de0 100644 --- a/src/math/subgroups.c +++ b/src/math/subgroups.c @@ -2,7 +2,7 @@ * ecgen, tool for generating Elliptic curve domain parameters * Copyright (C) 2017 J08nY */ -#include <gen/types.h> +#include "gen/types.h" #include "subgroups.h" /** @@ -42,6 +42,23 @@ static GEN __attribute__((unused)) subgroups_divisors(GEN order) { return result; } +/* +static GEN subgroups_exponents(GEN order) { + GEN factors = Z_factor(order); + GEN primes = gel(factors, 1); + GEN multiples = gel(factors, 2); + + long len = glength(primes); + pari_ulong count = 1; + for (long i = 1; i <= len; ++i) { + count *= itou(gel(multiples,i)) + 1; + } + + GEN result = gtovec0(gen_0, count); + +} +*/ + GEN subgroups_prime(const curve_t *curve, const config_t *cfg) { if (cfg->prime || isprime(curve->order)) { return gtovec(curve->order); |
