diff --git a/cryptlib.h b/cryptlib.h
index 80c1f03f..5cc94c61 100644
--- a/cryptlib.h
+++ b/cryptlib.h
@@ -2307,6 +2307,10 @@ class CRYPTOPP_DLL CRYPTOPP_NO_VTABLE CryptoParameters : public GeneratableCrypt
};
/// \brief Interface for asymmetric algorithms
+/// \details BERDecode() and DEREncode() were removed under Issue 569
+/// and Commit XXX. Programs should use AccessMaterial().Load(bt)
+/// or AccessMaterial().Save(bt) instead.
+/// \sa Issue 569
class CRYPTOPP_DLL CRYPTOPP_NO_VTABLE AsymmetricAlgorithm : public Algorithm
{
public:
@@ -2320,17 +2324,21 @@ public:
/// \return a const reference to the crypto material
virtual const CryptoMaterial & GetMaterial() const =0;
+#if 0
/// \brief Loads this object from a BufferedTransformation
/// \param bt a BufferedTransformation object
+ /// \details Use of BERDecode() changed to Load() at Issue 569.
/// \deprecated for backwards compatibility, calls AccessMaterial().Load(bt)
void BERDecode(BufferedTransformation &bt)
{AccessMaterial().Load(bt);}
/// \brief Saves this object to a BufferedTransformation
/// \param bt a BufferedTransformation object
+ /// \details Use of DEREncode() changed to Save() at Issue 569.
/// \deprecated for backwards compatibility, calls GetMaterial().Save(bt)
void DEREncode(BufferedTransformation &bt) const
{GetMaterial().Save(bt);}
+#endif
};
/// \brief Interface for asymmetric algorithms using public keys
diff --git a/randpool.h b/randpool.h
index cd823862..6dd70dc8 100644
--- a/randpool.h
+++ b/randpool.h
@@ -64,7 +64,7 @@ private:
/// \details You should migrate away from OldRandomPool at the earliest opportunity. Use a
/// modern random number generator or key derivation function, like AutoSeededRandomPool or
/// HKDF.
-/// \deprecated This class uses an old style PGP 2.6.x with MDC. The generator risks reusing
+/// \warning This class uses an old style PGP 2.6.x with MDC. The generator risks reusing
/// random random numbers after state rollback. You should migrate away from OldRandomPool
/// at the earliest opportunity.
/// \sa RandomPool, AutoSeededRandomPool, HKDF, P1363_KDF2, PKCS12_PBKDF, PKCS5_PBKDF2_HMAC
diff --git a/test.cpp b/test.cpp
index 63d72021..7b1e8176 100644
--- a/test.cpp
+++ b/test.cpp
@@ -455,17 +455,18 @@ SecByteBlock HexDecodeString(const char *hex)
void GenerateRSAKey(unsigned int keyLength, const char *privFilename, const char *pubFilename, const char *seed)
{
+ // DEREncode() changed to Save() at Issue 569.
RandomPool randPool;
randPool.IncorporateEntropy((byte *)seed, strlen(seed));
RSAES_OAEP_SHA_Decryptor priv(randPool, keyLength);
HexEncoder privFile(new FileSink(privFilename));
- priv.DEREncode(privFile);
+ priv.AccessMaterial().Save(privFile);
privFile.MessageEnd();
RSAES_OAEP_SHA_Encryptor pub(priv);
HexEncoder pubFile(new FileSink(pubFilename));
- pub.DEREncode(pubFile);
+ pub.AccessMaterial().Save(pubFile);
pubFile.MessageEnd();
}
diff --git a/validat2.cpp b/validat2.cpp
index c8537c30..49af29b4 100644
--- a/validat2.cpp
+++ b/validat2.cpp
@@ -898,12 +898,13 @@ bool ValidateEC2N()
{
std::cout << "\nEC2N validation suite running...\n\n";
+ // DEREncode() changed to Save() at Issue 569.
ECIES::Decryptor cpriv(GlobalRNG(), ASN1::sect193r1());
ECIES::Encryptor cpub(cpriv);
ByteQueue bq;
- cpriv.DEREncode(bq);
+ cpriv.AccessMaterial().Save(bq);
cpub.AccessKey().AccessGroupParameters().SetEncodeAsOID(true);
- cpub.DEREncode(bq);
+ cpub.AccessMaterial().Save(bq);
ECDSA::Signer spriv(bq);
ECDSA::Verifier spub(bq);
ECDH::Domain ecdhc(ASN1::sect193r1());