aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib
diff options
context:
space:
mode:
authorJack Lloyd <[email protected]>2018-03-21 10:54:06 -0400
committerJack Lloyd <[email protected]>2018-03-21 10:54:06 -0400
commitb03c5da8b56606f7b4df8122d8bd7914760dba32 (patch)
treeefac4f5a491c4f76fc6400aa88de35965a95ec70 /src/lib
parentdbc51ba73c46f361753bd7d88828988d972a477e (diff)
Remove bogus -1 from DSA key generation
GH #222
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/pubkey/dsa/dsa.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/lib/pubkey/dsa/dsa.cpp b/src/lib/pubkey/dsa/dsa.cpp
index 982e1b931..a3a6b9a52 100644
--- a/src/lib/pubkey/dsa/dsa.cpp
+++ b/src/lib/pubkey/dsa/dsa.cpp
@@ -39,7 +39,7 @@ DSA_PrivateKey::DSA_PrivateKey(RandomNumberGenerator& rng,
m_group = grp;
if(x_arg == 0)
- m_x = BigInt::random_integer(rng, 2, group_q() - 1);
+ m_x = BigInt::random_integer(rng, 2, group_q());
else
m_x = x_arg;