diff --git a/License.txt b/License.txt index e5eca4df..fc3f0546 100644 --- a/License.txt +++ b/License.txt @@ -1,4 +1,4 @@ -Compilation Copyright (c) 1995-2006 by Wei Dai. All rights reserved. +Compilation Copyright (c) 1995-2009 by Wei Dai. All rights reserved. This copyright applies only to this software distribution package as a compilation, and does not imply a copyright on any particular file in the package. @@ -18,9 +18,8 @@ Joan Daemen - 3way.cpp Leonard Janke - cast.cpp, seal.cpp Steve Reid - cast.cpp Phil Karn - des.cpp -Michael Paul Johnson - diamond.cpp Andrew M. Kuchling - md2.cpp, md4.cpp -Colin Plumb - md5.cpp, md5mac.cpp +Colin Plumb - md5.cpp Seal Woods - rc6.cpp Chris Morgan - rijndael.cpp Paulo Baretto - rijndael.cpp, skipjack.cpp, square.cpp diff --git a/Readme.txt b/Readme.txt index 32614333..861c036c 100644 --- a/Readme.txt +++ b/Readme.txt @@ -1,24 +1,26 @@ Crypto++: a C++ Class Library of Cryptographic Schemes -Version 5.6 (in progress) +Version 5.6.0 (3/15/2009) Crypto++ Library is a free C++ class library of cryptographic schemes. Currently the library contains the following algorithms: algorithm type name - high speed stream ciphers Panama, Salsa20, Sosemanuk + authenticated encryption schemes GCM, CCM, EAX + + high speed stream ciphers Panama, Sosemanuk, Salsa20, XSalsa20 AES and AES candidates AES (Rijndael), RC6, MARS, Twofish, Serpent, CAST-256 IDEA, Triple-DES (DES-EDE2 and DES-EDE3), - other block ciphers Camellia, RC5, Blowfish, TEA, XTEA, - Skipjack, SHACAL-2, SEED + other block ciphers Camellia, SEED, RC5, Blowfish, TEA, XTEA, + Skipjack, SHACAL-2 block cipher modes of operation ECB, CBC, CBC ciphertext stealing (CTS), - CFB, OFB, counter mode (CTR), GCM, CCM + CFB, OFB, counter mode (CTR) - message authentication codes VMAC, HMAC, GMAC, CBC-MAC, CMAC, DMAC, + message authentication codes VMAC, HMAC, CMAC, CBC-MAC, DMAC, Two-Track-MAC SHA-1, SHA-2 (SHA-224, SHA-256, SHA-384, and @@ -79,6 +81,7 @@ http://www.cryptopp.com the most up to date build instructions and porting notes * MSVC 6.0 - 2008 * GCC 3.3 - 4.3 + * C++Builder 2009 * Intel C++ Compiler 9 - 11 * Sun Studio 12 (CC 5.9) @@ -408,19 +411,19 @@ the mailing list. - fixed link error with MSVC 2003 when using "debug DLL" form of runtime library - fixed crash in SSE2_Add on P4 machines when compiled with MSVC 6.0 SP5 with Processor Pack - - added support for newly released compilers: MSVC 2008, GCC 4.2, Sun CC 5.9, - Intel C++ Compiler 10.0, and Borland C++Builder 2007 + - ported to MSVC 2008, GCC 4.2, Sun CC 5.9, Intel C++ Compiler 10.0, + and Borland C++Builder 2007 5.6 - added AuthenticatedSymmetricCipher interface class and Filter wrappers - added CCM, GCM (with SSE2 assembly), EAX, CMAC, XSalsa20, and SEED - added support for variable length IVs - improved AES and SHA-256 speed on x86 and x64 - - fixed run-time validation error on x86-64 with GCC 4.3.2 -O2 - - fixed HashFilter bug when putMessage=true - - fixed warnings with GCC 4.3 - - fixed compiler error in vmac.cpp on x86 with GCC -fPIC - fixed incorrect VMAC computation on message lengths that are >64 mod 128 (x86 assembly version is not affected) - - removed WORD64_AVAILABLE; compiler 64-bit int support is now required + - fixed compiler error in vmac.cpp on x86 with GCC -fPIC + - fixed run-time validation error on x86-64 with GCC 4.3.2 -O2 + - fixed HashFilter bug when putMessage=true + - removed WORD64_AVAILABLE; compiler support for 64-bit int is now required + - ported to GCC 4.3, C++Builder 2009, Sun CC 5.10, Intel C++ Compiler 11 Written by Wei Dai diff --git a/algparam.h b/algparam.h index 140f5797..ea5129c2 100644 --- a/algparam.h +++ b/algparam.h @@ -335,12 +335,21 @@ class CRYPTOPP_DLL AlgorithmParameters : public NameValuePairs public: AlgorithmParameters(); - AlgorithmParameters(const AlgorithmParameters &x); +#ifdef __BORLANDC__ + template + AlgorithmParameters(const char *name, const T &value, bool throwIfNotUsed=true) + : m_next(new AlgorithmParametersTemplate(name, value, throwIfNotUsed)) + , m_defaultThrowIfNotUsed(throwIfNotUsed) + { + } +#endif - AlgorithmParameters & operator=(const AlgorithmParameters &x); + AlgorithmParameters(const AlgorithmParameters &x); - template - AlgorithmParameters & operator()(const char *name, const T &value, bool throwIfNotUsed) + AlgorithmParameters & operator=(const AlgorithmParameters &x); + + template + AlgorithmParameters & operator()(const char *name, const T &value, bool throwIfNotUsed) { member_ptr p(new AlgorithmParametersTemplate(name, value, throwIfNotUsed)); p->m_next.reset(m_next.release()); @@ -349,14 +358,14 @@ public: return *this; } - template - AlgorithmParameters & operator()(const char *name, const T &value) + template + AlgorithmParameters & operator()(const char *name, const T &value) { return operator()(name, value, m_defaultThrowIfNotUsed); } - bool GetVoidValue(const char *name, const std::type_info &valueType, void *pValue) const; - + bool GetVoidValue(const char *name, const std::type_info &valueType, void *pValue) const; + protected: member_ptr m_next; bool m_defaultThrowIfNotUsed; @@ -370,11 +379,15 @@ protected: repeatedly using operator() on the object returned by MakeParameters, for example: AlgorithmParameters parameters = MakeParameters(name1, value1)(name2, value2)(name3, value3); */ +#ifdef __BORLANDC__ +typedef AlgorithmParameters MakeParameters; +#else template AlgorithmParameters MakeParameters(const char *name, const T &value, bool throwIfNotUsed = true) { return AlgorithmParameters()(name, value, throwIfNotUsed); } +#endif #define CRYPTOPP_GET_FUNCTION_ENTRY(name) (Name::name(), &ThisClass::Get##name) #define CRYPTOPP_SET_FUNCTION_ENTRY(name) (Name::name(), &ThisClass::Set##name) diff --git a/cryptest_bds.bdsproj b/cryptest_bds.bdsproj index 37fab771..9086d308 100755 --- a/cryptest_bds.bdsproj +++ b/cryptest_bds.bdsproj @@ -235,7 +235,7 @@ - v 66 + v True . diff --git a/cryptlib_bds.bdsproj b/cryptlib_bds.bdsproj index d99f8395..9b9c7b24 100755 --- a/cryptlib_bds.bdsproj +++ b/cryptlib_bds.bdsproj @@ -195,7 +195,6 @@ - @@ -203,6 +202,7 @@ + @@ -213,7 +213,9 @@ + + @@ -223,6 +225,7 @@ + @@ -234,6 +237,7 @@ + @@ -279,6 +283,7 @@ + @@ -310,6 +315,7 @@ + diff --git a/gf2n.h b/gf2n.h index a2b53e31..67ade641 100644 --- a/gf2n.h +++ b/gf2n.h @@ -357,11 +357,13 @@ CRYPTOPP_DLL GF2NP * CRYPTOPP_API BERDecodeGF2NP(BufferedTransformation &bt); NAMESPACE_END +#ifndef __BORLANDC__ NAMESPACE_BEGIN(std) template<> inline void swap(CryptoPP::PolynomialMod2 &a, CryptoPP::PolynomialMod2 &b) { a.swap(b); } NAMESPACE_END +#endif #endif diff --git a/integer.h b/integer.h index 4e93c3a1..6d844fa5 100644 --- a/integer.h +++ b/integer.h @@ -408,11 +408,13 @@ inline CryptoPP::word operator%(const CryptoPP::Integer &a, CryptoPP::word b) NAMESPACE_END +#ifndef __BORLANDC__ NAMESPACE_BEGIN(std) -template<> inline void swap(CryptoPP::Integer &a, CryptoPP::Integer &b) +inline void swap(CryptoPP::Integer &a, CryptoPP::Integer &b) { a.swap(b); } NAMESPACE_END +#endif #endif diff --git a/mqueue.h b/mqueue.h index b46f67d1..efa57a7c 100644 --- a/mqueue.h +++ b/mqueue.h @@ -88,11 +88,13 @@ private: NAMESPACE_END +#ifndef __BORLANDC__ NAMESPACE_BEGIN(std) template<> inline void swap(CryptoPP::MessageQueue &a, CryptoPP::MessageQueue &b) { a.swap(b); } NAMESPACE_END +#endif #endif diff --git a/queue.h b/queue.h index 7e172007..75f7807f 100644 --- a/queue.h +++ b/queue.h @@ -131,11 +131,13 @@ public: NAMESPACE_END +#ifndef __BORLANDC__ NAMESPACE_BEGIN(std) template<> inline void swap(CryptoPP::ByteQueue &a, CryptoPP::ByteQueue &b) { a.swap(b); } NAMESPACE_END +#endif #endif