diff options
Diffstat (limited to 'src/dsa_gen.cpp')
-rw-r--r-- | src/dsa_gen.cpp | 13 |
1 files changed, 2 insertions, 11 deletions
diff --git a/src/dsa_gen.cpp b/src/dsa_gen.cpp index 576c9a938..002af7d96 100644 --- a/src/dsa_gen.cpp +++ b/src/dsa_gen.cpp @@ -5,10 +5,9 @@ #include <botan/dl_group.h> #include <botan/numthry.h> -#include <botan/libstate.h> #include <botan/lookup.h> #include <botan/parsing.h> -#include <botan/rng.h> +#include <botan/libstate.h> #include <algorithm> #include <memory> @@ -84,8 +83,6 @@ bool DL_Group::generate_dsa_primes(BigInt& p, BigInt& q, if(!is_prime(q)) return false; - global_state().pulse(PRIME_FOUND); - const u32bit n = (pbits-1) / (HASH_SIZE * 8), b = (pbits-1) % (HASH_SIZE * 8); @@ -94,8 +91,6 @@ bool DL_Group::generate_dsa_primes(BigInt& p, BigInt& q, for(u32bit j = 0; j != 4096; ++j) { - global_state().pulse(PRIME_SEARCHING); - for(u32bit k = 0; k <= n; ++k) { ++seed; @@ -110,10 +105,7 @@ bool DL_Group::generate_dsa_primes(BigInt& p, BigInt& q, p = X - (X % (2*q) - 1); if(p.bits() == pbits && is_prime(p)) - { - global_state().pulse(PRIME_FOUND); return true; - } } return false; } @@ -128,8 +120,7 @@ SecureVector<byte> DL_Group::generate_dsa_primes(BigInt& p, BigInt& q, while(true) { - Global_RNG::randomize(seed, seed.size()); - global_state().pulse(PRIME_SEARCHING); + global_state().randomize(seed, seed.size()); if(generate_dsa_primes(p, q, pbits, qbits, seed)) return seed; |