aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorlloyd <[email protected]>2008-06-27 14:43:59 +0000
committerlloyd <[email protected]>2008-06-27 14:43:59 +0000
commit59865d69871bdd936cf77a7fde38aa7657d04c40 (patch)
treea87a74123db2a48e0d93ff968f33be4b16cce3e9
parent6b269c212d28d643fac99e0a5be221d9c63f0240 (diff)
Previously if DL_Group was given a q value of zero, it would check to
see if (p-1)/2 was prime, and if so set q to that. This is to deal with certain bogus DH formats (PKCS #3, specifically; the 'modern' ANSI formats always provide the q subgroup value). However this required access to the RNG. Rather than push RNG usage all the way down into that part of DL group, simply remove the feature. Since PKCS #3 format is only really used for DH keys, it will not much affect anything functionally (that I can see).
-rw-r--r--src/dl_group.cpp4
1 files changed, 0 insertions, 4 deletions
diff --git a/src/dl_group.cpp b/src/dl_group.cpp
index 0e37c197e..523129327 100644
--- a/src/dl_group.cpp
+++ b/src/dl_group.cpp
@@ -4,7 +4,6 @@
*************************************************/
#include <botan/dl_group.h>
-#include <botan/libstate.h>
#include <botan/config.h>
#include <botan/parsing.h>
#include <botan/numthry.h>
@@ -128,9 +127,6 @@ void DL_Group::initialize(const BigInt& p1, const BigInt& q1, const BigInt& g1)
g = g1;
q = q1;
- if(q == 0 && check_prime((p - 1) / 2, global_state().prng_reference()))
- q = (p - 1) / 2;
-
initialized = true;
}