summaryrefslogtreecommitdiff
path: root/elgamal.h
diff options
context:
space:
mode:
authorJeffrey Walton <noloader@gmail.com>2021-09-23 23:33:23 -0400
committerJeffrey Walton <noloader@gmail.com>2021-09-23 23:33:23 -0400
commitbee8e8ca6658499debbf8cec0b6b219cf8ba6415 (patch)
tree5d3b28994642215960990753170c9ab0a8aecfb9 /elgamal.h
parent20962baf4440df538a7438e80e45e808a76fb04e (diff)
downloadcryptopp-git-bee8e8ca6658499debbf8cec0b6b219cf8ba6415.tar.gz
Use subgroup order in ElGamal encryption (GH #1059, CVE-2021-40530)
Diffstat (limited to 'elgamal.h')
-rw-r--r--elgamal.h12
1 files changed, 8 insertions, 4 deletions
diff --git a/elgamal.h b/elgamal.h
index 8c37769d..c4e1732d 100644
--- a/elgamal.h
+++ b/elgamal.h
@@ -251,17 +251,21 @@ struct DL_PrivateKey_ElGamal : public BASE
/// If you need to <tt>Load</tt> an ElGamal key with the wrong OID then
/// see <A HREF="https://www.cryptopp.com/wiki/ElGamal">ElGamal</A> on
/// the Crypto++ wiki.
+/// \details At Crypto++ 8.6 ElGamalKeys were changed to use DL_CryptoKeys_ElGamal
+/// due to Issue 1069 and CVE-2021-40530. DL_CryptoKeys_ElGamal group parameters
+/// use the subgroup order, and not an estimated work factor.
/// \sa <A HREF="https://github.com/weidai11/cryptopp/issues/876">Issue 876</A>,
-/// <A HREF="https://github.com/weidai11/cryptopp/issues/567">Issue 567</A>
+/// <A HREF="https://github.com/weidai11/cryptopp/issues/567">Issue 567</A>,
+/// <A HREF="https://github.com/weidai11/cryptopp/issues/1059">Issue 1059</A>
/// \since Crypto++ 1.0
struct ElGamalKeys
{
/// \brief Implements DL_GroupParameters interface
- typedef DL_CryptoKeys_GFP::GroupParameters GroupParameters;
+ typedef DL_CryptoKeys_ElGamal::GroupParameters GroupParameters;
/// \brief Implements DL_PrivateKey interface
- typedef DL_PrivateKey_ElGamal<DL_CryptoKeys_GFP::PrivateKey> PrivateKey;
+ typedef DL_PrivateKey_ElGamal<DL_CryptoKeys_ElGamal::PrivateKey> PrivateKey;
/// \brief Implements DL_PublicKey interface
- typedef DL_PublicKey_ElGamal<DL_CryptoKeys_GFP::PublicKey> PublicKey;
+ typedef DL_PublicKey_ElGamal<DL_CryptoKeys_ElGamal::PublicKey> PublicKey;
};
/// \brief ElGamal encryption scheme with non-standard padding