From 743b1e9ee9cfe05ccd72c42c46e989bbb3f600f3 Mon Sep 17 00:00:00 2001 From: Jack Lloyd Date: Mon, 9 Apr 2018 18:34:11 -0400 Subject: Add DL_Group::exponent_bits Just a useful helper --- src/lib/pubkey/dh/dh.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'src/lib/pubkey/dh') 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 #include -#include #include #include @@ -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 { -- cgit v1.2.3