aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib
diff options
context:
space:
mode:
authorJack Lloyd <[email protected]>2018-12-09 06:24:31 -0500
committerJack Lloyd <[email protected]>2018-12-09 06:24:31 -0500
commite5be97da0c2039fefe4f81ff40c86ae3b88622eb (patch)
tree851c2851f37fc563f13bdbb101825842b69574e7 /src/lib
parentb6b96a375be4a8c9fd0023756b15bb654fcdc788 (diff)
Move Miller-Rabin t param inside the block
This var is not used if we use Baile-PSW instead
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/math/numbertheory/numthry.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/lib/math/numbertheory/numthry.cpp b/src/lib/math/numbertheory/numthry.cpp
index a05403d82..6aa83e098 100644
--- a/src/lib/math/numbertheory/numthry.cpp
+++ b/src/lib/math/numbertheory/numthry.cpp
@@ -521,12 +521,12 @@ bool is_prime(const BigInt& n,
return std::binary_search(PRIMES, PRIMES + PRIME_TABLE_SIZE, num);
}
- const size_t t = miller_rabin_test_iterations(n_bits, prob, is_random);
-
Modular_Reducer mod_n(n);
if(rng.is_seeded())
{
+ const size_t t = miller_rabin_test_iterations(n_bits, prob, is_random);
+
if(is_miller_rabin_probable_prime(n, mod_n, rng, t) == false)
return false;