diff options
author | lloyd <[email protected]> | 2009-07-12 12:10:57 +0000 |
---|---|---|
committer | lloyd <[email protected]> | 2009-07-12 12:10:57 +0000 |
commit | b6089af7c0750d5db0c74bb56fbd43672630d665 (patch) | |
tree | 48d495984f60a4939fdbbb6a5462399f9c790f42 /src | |
parent | 1049dec9634cdc68928c4e688dd609ed758ab06c (diff) |
Fix nonce generation of Miller-Rabin test
Diffstat (limited to 'src')
-rw-r--r-- | src/math/numbertheory/numthry.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/math/numbertheory/numthry.cpp b/src/math/numbertheory/numthry.cpp index 721d4a833..448681333 100644 --- a/src/math/numbertheory/numthry.cpp +++ b/src/math/numbertheory/numthry.cpp @@ -292,7 +292,7 @@ bool passes_mr_tests(RandomNumberGenerator& rng, nonce = PRIMES[i]; else { - while(nonce < 2 && nonce >= (n-1)) + while(nonce < 2 || nonce >= (n-1)) nonce.randomize(rng, NONCE_BITS); } |