Add compatibility with Crypto++ 5.6.4

This commit is contained in:
Sebastian Messmer 2016-09-24 09:39:37 +02:00
parent 46183976ee
commit e30656797b
4 changed files with 9 additions and 0 deletions

View File

@ -2,6 +2,7 @@ Version 0.9.6 (unreleased)
---------------
Compatibility:
* Compatible with libcurl version >= 7.50.0, and <= 7.21.6 (tested down to 7.19.0)
* Compatible with Crypto++ 5.6.4
Version 0.9.5
---------------

View File

@ -23,8 +23,12 @@ namespace cpputils {
DEFINE_CIPHER(Cast256_GCM);
DEFINE_CIPHER(Cast256_CFB);
#if CRYPTOPP_VERSION != 564
DEFINE_CIPHER(Mars448_GCM);
DEFINE_CIPHER(Mars448_CFB);
#else
# warning "You're using Crypto++ 5.6.4. In this version, the MARS-448 cipher is not available. Your CryFS executable will not be able to load file systems using this cipher. Please use Crypto++ 5.6.3 or 5.6.5+ instead."
#endif
DEFINE_CIPHER(Mars256_GCM);
DEFINE_CIPHER(Mars256_CFB);
DEFINE_CIPHER(Mars128_GCM);

View File

@ -41,9 +41,11 @@ static_assert(32 == CryptoPP::CAST256::MAX_KEYLENGTH, "If Cast offered larger ke
DECLARE_CIPHER(Cast256_GCM, "cast-256-gcm", GCM_Cipher, CryptoPP::CAST256, 32);
DECLARE_CIPHER(Cast256_CFB, "cast-256-cfb", CFB_Cipher, CryptoPP::CAST256, 32);
#if CRYPTOPP_VERSION != 564
static_assert(56 == CryptoPP::MARS::MAX_KEYLENGTH, "If Mars offered larger keys, we should offer a variant with it");
DECLARE_CIPHER(Mars448_GCM, "mars-448-gcm", GCM_Cipher, CryptoPP::MARS, 56);
DECLARE_CIPHER(Mars448_CFB, "mars-448-cfb", CFB_Cipher, CryptoPP::MARS, 56);
#endif
DECLARE_CIPHER(Mars256_GCM, "mars-256-gcm", GCM_Cipher, CryptoPP::MARS, 32);
DECLARE_CIPHER(Mars256_CFB, "mars-256-cfb", CFB_Cipher, CryptoPP::MARS, 32);
DECLARE_CIPHER(Mars128_GCM, "mars-128-gcm", GCM_Cipher, CryptoPP::MARS, 16);

View File

@ -73,8 +73,10 @@ const vector<shared_ptr<CryCipher>> CryCiphers::SUPPORTED_CIPHERS = {
make_shared<CryCipherInstance<Serpent128_CFB>>(INTEGRITY_WARNING),
make_shared<CryCipherInstance<Cast256_GCM>>(),
make_shared<CryCipherInstance<Cast256_CFB>>(INTEGRITY_WARNING),
#if CRYPTOPP_VERSION != 564
make_shared<CryCipherInstance<Mars448_GCM>>(),
make_shared<CryCipherInstance<Mars448_CFB>>(INTEGRITY_WARNING),
#endif
make_shared<CryCipherInstance<Mars256_GCM>>(),
make_shared<CryCipherInstance<Mars256_CFB>>(INTEGRITY_WARNING),
make_shared<CryCipherInstance<Mars128_GCM>>(),