aboutsummaryrefslogtreecommitdiffstats
path: root/src/dsa_gen.cpp
diff options
context:
space:
mode:
authorlloyd <[email protected]>2008-04-07 01:00:05 +0000
committerlloyd <[email protected]>2008-04-07 01:00:05 +0000
commitac81da89ac0dca6a4d4cc6cf12de29bf66709e57 (patch)
treea681c5eba6110b96a987a18cbad60a0920e9c257 /src/dsa_gen.cpp
parent4191064d79916508e531c4f28ddb244527f64d5c (diff)
The intent of this branch is to remove the global library state object
(Library_State, in libstate.{h,cpp}). It causes numerous 'interesting' problems with threads, etc, and the best solution here is to move to more or less an object-capability model, where the only objects that a piece of code can access are those which can be referenced through its arguments. First things first, remove the UI 'pulse' code. It is neither necessary nor sufficient for writing proper GUI/event driven code using Botan, has likely never been used in real code, and, given that, causes a distressing amount of overhead in terms of function calls made.
Diffstat (limited to 'src/dsa_gen.cpp')
-rw-r--r--src/dsa_gen.cpp8
1 files changed, 0 insertions, 8 deletions
diff --git a/src/dsa_gen.cpp b/src/dsa_gen.cpp
index c4e475a49..15a0b5ff8 100644
--- a/src/dsa_gen.cpp
+++ b/src/dsa_gen.cpp
@@ -84,8 +84,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 +92,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 +106,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;
}
@@ -129,7 +122,6 @@ SecureVector<byte> DL_Group::generate_dsa_primes(BigInt& p, BigInt& q,
while(true)
{
Global_RNG::randomize(seed, seed.size());
- global_state().pulse(PRIME_SEARCHING);
if(generate_dsa_primes(p, q, pbits, qbits, seed))
return seed;