aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/pubkey/dh
diff options
context:
space:
mode:
authorJack Lloyd <[email protected]>2018-04-09 18:34:11 -0400
committerJack Lloyd <[email protected]>2018-04-09 18:48:46 -0400
commit743b1e9ee9cfe05ccd72c42c46e989bbb3f600f3 (patch)
treeac79ebf19fb777959ff1c4e9054fed17c532bcd6 /src/lib/pubkey/dh
parent1e9752b8896e12707952fddaf7acd2c3c42c7df2 (diff)
Add DL_Group::exponent_bits
Just a useful helper
Diffstat (limited to 'src/lib/pubkey/dh')
-rw-r--r--src/lib/pubkey/dh/dh.cpp4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/lib/pubkey/dh/dh.cpp b/src/lib/pubkey/dh/dh.cpp
index fc1e6236a..daa876538 100644
--- a/src/lib/pubkey/dh/dh.cpp
+++ b/src/lib/pubkey/dh/dh.cpp
@@ -7,7 +7,6 @@
#include <botan/dh.h>
#include <botan/internal/pk_ops_impl.h>
-#include <botan/workfactor.h>
#include <botan/pow_mod.h>
#include <botan/blinding.h>
@@ -41,8 +40,7 @@ DH_PrivateKey::DH_PrivateKey(RandomNumberGenerator& rng,
if(x_arg == 0)
{
- const BigInt& p = group_p();
- m_x.randomize(rng, dl_exponent_size(p.bits()));
+ m_x.randomize(rng, grp.exponent_bits());
}
else
{