diff options
author | Jack Lloyd <[email protected]> | 2015-10-15 10:13:19 -0400 |
---|---|---|
committer | Jack Lloyd <[email protected]> | 2015-10-15 10:13:19 -0400 |
commit | 9f6665aff8a633131212422bec4a150da3bdf4ed (patch) | |
tree | 4e5ab6f379eb9c88d71fc0f9415447523b7a7f95 /src/lib/pubkey | |
parent | 3181dfa7abfe7b623d8823e078f04a374775e978 (diff) |
Prohibit creating a DL_Group smaller than 1024 bits
Diffstat (limited to 'src/lib/pubkey')
-rw-r--r-- | src/lib/pubkey/dl_group/dl_group.cpp | 4 |
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"); |