diff options
| author | J08nY | 2017-02-19 18:58:26 +0100 |
|---|---|---|
| committer | J08nY | 2017-02-19 18:58:26 +0100 |
| commit | 888ca8052e0eb3acbe33dbf180e3af27341002eb (patch) | |
| tree | 589be6afcec5d8986462911fdf41608c39eba8e3 /src/invalid/invalid.c | |
| parent | c1be6dbea0f6e2b8d9cb8c422bc2e1cfb41524da (diff) | |
| download | ecgen-888ca8052e0eb3acbe33dbf180e3af27341002eb.tar.gz ecgen-888ca8052e0eb3acbe33dbf180e3af27341002eb.tar.zst ecgen-888ca8052e0eb3acbe33dbf180e3af27341002eb.zip | |
Added generators
- Added new type of gen_t, essentially only for generators. Since they
are points with a special property.
- Added order_smallfact generator
- Added generators to csv and json output
Diffstat (limited to 'src/invalid/invalid.c')
| -rw-r--r-- | src/invalid/invalid.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/invalid/invalid.c b/src/invalid/invalid.c index 6d4982a..7663213 100644 --- a/src/invalid/invalid.c +++ b/src/invalid/invalid.c @@ -8,6 +8,7 @@ #include "math/curve.h" #include "math/equation.h" #include "math/field.h" +#include "math/gens.h" #include "math/order.h" #include "math/point.h" @@ -76,6 +77,7 @@ size_t invalid_curves(curve_t *curve, config_t *cfg, pari_ulong *primes, invalid_gen[OFFSET_B] = &b_random; invalid_gen[OFFSET_CURVE] = &curve_nonzero; invalid_gen[OFFSET_ORDER] = &order_init; + invalid_gen[OFFSET_GENERATORS] = &gens_init; invalid_gen[OFFSET_POINTS] = &points_primet; arg_t *invalid_argss[OFFSET_END]; @@ -100,7 +102,7 @@ size_t invalid_curves(curve_t *curve, config_t *cfg, pari_ulong *primes, pari_sp btop = avma; // generate a curve with random b exhaustive_gen(invalid, cfg, invalid_gen, NULL, OFFSET_B, - OFFSET_POINTS); + OFFSET_GENERATORS); // does some small prime from our array divide the curve order? // if so how many? @@ -139,7 +141,7 @@ size_t invalid_curves(curve_t *curve, config_t *cfg, pari_ulong *primes, // generate prime order points, this is expensive (order needs to be // factorised, so only do it if we want the curve) exhaustive_gen(invalid, cfg, invalid_gen, invalid_argss, - OFFSET_POINTS, OFFSET_END); + OFFSET_GENERATORS, OFFSET_END); size_t count = 0; for (size_t i = nprimes; i-- > 0;) { |
