From 84c8a246ffb870bce8bafc5ba03116b82c5ebfb7 Mon Sep 17 00:00:00 2001 From: J08nY Date: Thu, 20 Jul 2017 01:06:50 +0200 Subject: Add proper support for Koblitz curves generation. --- src/math/subgroups.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'src/math/subgroups.c') 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); } */ -- cgit v1.2.3-70-g09d2