aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib
diff options
context:
space:
mode:
authorJack Lloyd <[email protected]>2015-10-15 10:13:19 -0400
committerJack Lloyd <[email protected]>2015-10-15 10:13:19 -0400
commit9f6665aff8a633131212422bec4a150da3bdf4ed (patch)
tree4e5ab6f379eb9c88d71fc0f9415447523b7a7f95 /src/lib
parent3181dfa7abfe7b623d8823e078f04a374775e978 (diff)
Prohibit creating a DL_Group smaller than 1024 bits
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/pubkey/dl_group/dl_group.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/lib/pubkey/dl_group/dl_group.cpp b/src/lib/pubkey/dl_group/dl_group.cpp
index c519dcb99..fbaa67eaa 100644
--- a/src/lib/pubkey/dl_group/dl_group.cpp
+++ b/src/lib/pubkey/dl_group/dl_group.cpp
@@ -1,6 +1,6 @@
/*
* Discrete Logarithm Parameters
-* (C) 1999-2008 Jack Lloyd
+* (C) 1999-2008,2015 Jack Lloyd
*
* Botan is released under the Simplified BSD License (see license.txt)
*/
@@ -42,7 +42,7 @@ DL_Group::DL_Group(const std::string& name)
DL_Group::DL_Group(RandomNumberGenerator& rng,
PrimeType type, size_t pbits, size_t qbits)
{
- if(pbits < 512)
+ if(pbits < 1024)
throw Invalid_Argument("DL_Group: prime size " + std::to_string(pbits) +
" is too small");