aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/math
diff options
context:
space:
mode:
authorNever <[email protected]>2017-02-13 14:00:39 +0100
committerNever <[email protected]>2017-02-13 14:00:39 +0100
commit78d8fb3d77cc0054229f951324f77610b91e0e9a (patch)
tree2990a434d98bf76dbe7b596a183d9558f4a0bb4a /src/lib/math
parentfc3f52703f62d76beda013623f745d5ac3c8cd1c (diff)
increase miller-rabin iterations for dsa primes (FIPS-186-4)
Diffstat (limited to 'src/lib/math')
-rw-r--r--src/lib/math/numbertheory/dsa_gen.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/lib/math/numbertheory/dsa_gen.cpp b/src/lib/math/numbertheory/dsa_gen.cpp
index 2f952356f..e8d620f4c 100644
--- a/src/lib/math/numbertheory/dsa_gen.cpp
+++ b/src/lib/math/numbertheory/dsa_gen.cpp
@@ -81,7 +81,7 @@ bool generate_dsa_primes(RandomNumberGenerator& rng,
q.set_bit(qbits-1);
q.set_bit(0);
- if(!is_prime(q, rng))
+ if(!is_prime(q, rng, 126))
return false;
const size_t n = (pbits-1) / (HASH_SIZE * 8),
@@ -107,7 +107,7 @@ bool generate_dsa_primes(RandomNumberGenerator& rng,
p = X - (X % (2*q) - 1);
- if(p.bits() == pbits && is_prime(p, rng))
+ if(p.bits() == pbits && is_prime(p, rng, 126))
return true;
}
}