diff options
| author | J08nY | 2017-07-20 01:06:50 +0200 |
|---|---|---|
| committer | J08nY | 2017-07-20 01:06:50 +0200 |
| commit | 84c8a246ffb870bce8bafc5ba03116b82c5ebfb7 (patch) | |
| tree | 4bd5e1a5b966b9b3abeb4ece59085219aa51ea5f /src/math/subgroups.c | |
| parent | 75c07ec3d7c24b37b6afa0e832a5e1b52927d83b (diff) | |
| download | ecgen-84c8a246ffb870bce8bafc5ba03116b82c5ebfb7.tar.gz ecgen-84c8a246ffb870bce8bafc5ba03116b82c5ebfb7.tar.zst ecgen-84c8a246ffb870bce8bafc5ba03116b82c5ebfb7.zip | |
Add proper support for Koblitz curves generation.
Diffstat (limited to 'src/math/subgroups.c')
| -rw-r--r-- | src/math/subgroups.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/src/math/subgroups.c b/src/math/subgroups.c index 4df4de0..903401e 100644 --- a/src/math/subgroups.c +++ b/src/math/subgroups.c @@ -2,8 +2,8 @@ * ecgen, tool for generating Elliptic curve domain parameters * Copyright (C) 2017 J08nY */ -#include "gen/types.h" #include "subgroups.h" +#include "gen/types.h" /** * @brief All prime divisors of a given integer. @@ -44,17 +44,17 @@ static GEN __attribute__((unused)) subgroups_divisors(GEN order) { /* static GEN subgroups_exponents(GEN order) { - GEN factors = Z_factor(order); - GEN primes = gel(factors, 1); - GEN multiples = gel(factors, 2); + 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; - } + 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 result = gtovec0(gen_0, count); } */ |
