summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--License.txt5
-rw-r--r--Readme.txt29
-rw-r--r--algparam.h29
-rwxr-xr-xcryptest_bds.bdsproj2
-rwxr-xr-xcryptlib_bds.bdsproj8
-rw-r--r--gf2n.h2
-rw-r--r--integer.h4
-rw-r--r--mqueue.h2
-rw-r--r--queue.h2
9 files changed, 56 insertions, 27 deletions
diff --git a/License.txt b/License.txt
index e5eca4d..fc3f054 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 3261433..861c036 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 140f579..ea5129c 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 <class T>
+ AlgorithmParameters(const char *name, const T &value, bool throwIfNotUsed=true)
+ : m_next(new AlgorithmParametersTemplate<T>(name, value, throwIfNotUsed))
+ , m_defaultThrowIfNotUsed(throwIfNotUsed)
+ {
+ }
+#endif
- AlgorithmParameters & operator=(const AlgorithmParameters &x);
+ AlgorithmParameters(const AlgorithmParameters &x);
- template <class T>
- AlgorithmParameters & operator()(const char *name, const T &value, bool throwIfNotUsed)
+ AlgorithmParameters & operator=(const AlgorithmParameters &x);
+
+ template <class T>
+ AlgorithmParameters & operator()(const char *name, const T &value, bool throwIfNotUsed)
{
member_ptr<AlgorithmParametersBase> p(new AlgorithmParametersTemplate<T>(name, value, throwIfNotUsed));
p->m_next.reset(m_next.release());
@@ -349,14 +358,14 @@ public:
return *this;
}
- template <class T>
- AlgorithmParameters & operator()(const char *name, const T &value)
+ template <class T>
+ 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<AlgorithmParametersBase> 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 <class T>
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 37fab77..9086d30 100755
--- a/cryptest_bds.bdsproj
+++ b/cryptest_bds.bdsproj
@@ -235,7 +235,7 @@
<Debugging Name="DebugSourceDirs"></Debugging>
</Debugging>
<Parameters>
- <Parameters Name="RunParams">v 66</Parameters>
+ <Parameters Name="RunParams">v</Parameters>
<Parameters Name="Launcher"></Parameters>
<Parameters Name="UseLauncher">True</Parameters>
<Parameters Name="DebugCWD">.</Parameters>
diff --git a/cryptlib_bds.bdsproj b/cryptlib_bds.bdsproj
index d99f839..9b9c7b2 100755
--- a/cryptlib_bds.bdsproj
+++ b/cryptlib_bds.bdsproj
@@ -195,7 +195,6 @@
</project>
<FILELIST>
<FILE FILENAME="cryptlib_bds.cpp" CONTAINERID="CCompiler" LOCALCOMMAND="" UNITNAME="cryptlib_bds" FORMNAME="" DESIGNCLASS=""/>
- <FILE FILENAME="zlib.cpp" CONTAINERID="CCompiler" LOCALCOMMAND="" UNITNAME="zlib" FORMNAME="" DESIGNCLASS=""/>
<FILE FILENAME="3way.cpp" CONTAINERID="CCompiler" LOCALCOMMAND="" UNITNAME="3way" FORMNAME="" DESIGNCLASS=""/>
<FILE FILENAME="adhoc.cpp" CONTAINERID="CCompiler" LOCALCOMMAND="" UNITNAME="adhoc" FORMNAME="" DESIGNCLASS=""/>
<FILE FILENAME="adler32.cpp" CONTAINERID="CCompiler" LOCALCOMMAND="" UNITNAME="adler32" FORMNAME="" DESIGNCLASS=""/>
@@ -203,6 +202,7 @@
<FILE FILENAME="algparam.cpp" CONTAINERID="CCompiler" LOCALCOMMAND="" UNITNAME="algparam" FORMNAME="" DESIGNCLASS=""/>
<FILE FILENAME="arc4.cpp" CONTAINERID="CCompiler" LOCALCOMMAND="" UNITNAME="arc4" FORMNAME="" DESIGNCLASS=""/>
<FILE FILENAME="asn.cpp" CONTAINERID="CCompiler" LOCALCOMMAND="" UNITNAME="asn" FORMNAME="" DESIGNCLASS=""/>
+ <FILE FILENAME="authenc.cpp" CONTAINERID="CCompiler" LOCALCOMMAND="" UNITNAME="authenc" FORMNAME="" DESIGNCLASS=""/>
<FILE FILENAME="base32.cpp" CONTAINERID="CCompiler" LOCALCOMMAND="" UNITNAME="base32" FORMNAME="" DESIGNCLASS=""/>
<FILE FILENAME="base64.cpp" CONTAINERID="CCompiler" LOCALCOMMAND="" UNITNAME="base64" FORMNAME="" DESIGNCLASS=""/>
<FILE FILENAME="basecode.cpp" CONTAINERID="CCompiler" LOCALCOMMAND="" UNITNAME="basecode" FORMNAME="" DESIGNCLASS=""/>
@@ -213,7 +213,9 @@
<FILE FILENAME="cast.cpp" CONTAINERID="CCompiler" LOCALCOMMAND="" UNITNAME="cast" FORMNAME="" DESIGNCLASS=""/>
<FILE FILENAME="casts.cpp" CONTAINERID="CCompiler" LOCALCOMMAND="" UNITNAME="casts" FORMNAME="" DESIGNCLASS=""/>
<FILE FILENAME="cbcmac.cpp" CONTAINERID="CCompiler" LOCALCOMMAND="" UNITNAME="cbcmac" FORMNAME="" DESIGNCLASS=""/>
+ <FILE FILENAME="ccm.cpp" CONTAINERID="CCompiler" LOCALCOMMAND="" UNITNAME="ccm" FORMNAME="" DESIGNCLASS=""/>
<FILE FILENAME="channels.cpp" CONTAINERID="CCompiler" LOCALCOMMAND="" UNITNAME="channels" FORMNAME="" DESIGNCLASS=""/>
+ <FILE FILENAME="cmac.cpp" CONTAINERID="CCompiler" LOCALCOMMAND="" UNITNAME="cmac" FORMNAME="" DESIGNCLASS=""/>
<FILE FILENAME="crc.cpp" CONTAINERID="CCompiler" LOCALCOMMAND="" UNITNAME="crc" FORMNAME="" DESIGNCLASS=""/>
<FILE FILENAME="cryptlib.cpp" CONTAINERID="CCompiler" LOCALCOMMAND="" UNITNAME="cryptlib" FORMNAME="" DESIGNCLASS=""/>
<FILE FILENAME="default.cpp" CONTAINERID="CCompiler" LOCALCOMMAND="" UNITNAME="default" FORMNAME="" DESIGNCLASS=""/>
@@ -223,6 +225,7 @@
<FILE FILENAME="dh.cpp" CONTAINERID="CCompiler" LOCALCOMMAND="" UNITNAME="dh" FORMNAME="" DESIGNCLASS=""/>
<FILE FILENAME="dll.cpp" CONTAINERID="CCompiler" LOCALCOMMAND="" UNITNAME="dll" FORMNAME="" DESIGNCLASS=""/>
<FILE FILENAME="dsa.cpp" CONTAINERID="CCompiler" LOCALCOMMAND="" UNITNAME="dsa" FORMNAME="" DESIGNCLASS=""/>
+ <FILE FILENAME="eax.cpp" CONTAINERID="CCompiler" LOCALCOMMAND="" UNITNAME="eax" FORMNAME="" DESIGNCLASS=""/>
<FILE FILENAME="ec2n.cpp" CONTAINERID="CCompiler" LOCALCOMMAND="" UNITNAME="ec2n" FORMNAME="" DESIGNCLASS=""/>
<FILE FILENAME="eccrypto.cpp" CONTAINERID="CCompiler" LOCALCOMMAND="" UNITNAME="eccrypto" FORMNAME="" DESIGNCLASS=""/>
<FILE FILENAME="ecp.cpp" CONTAINERID="CCompiler" LOCALCOMMAND="" UNITNAME="ecp" FORMNAME="" DESIGNCLASS=""/>
@@ -234,6 +237,7 @@
<FILE FILENAME="filters.cpp" CONTAINERID="CCompiler" LOCALCOMMAND="" UNITNAME="filters" FORMNAME="" DESIGNCLASS=""/>
<FILE FILENAME="fips140.cpp" CONTAINERID="CCompiler" LOCALCOMMAND="" UNITNAME="fips140" FORMNAME="" DESIGNCLASS=""/>
<FILE FILENAME="fipstest.cpp" CONTAINERID="CCompiler" LOCALCOMMAND="" UNITNAME="fipstest" FORMNAME="" DESIGNCLASS=""/>
+ <FILE FILENAME="gcm.cpp" CONTAINERID="CCompiler" LOCALCOMMAND="" UNITNAME="gcm" FORMNAME="" DESIGNCLASS=""/>
<FILE FILENAME="gf2_32.cpp" CONTAINERID="CCompiler" LOCALCOMMAND="" UNITNAME="gf2_32" FORMNAME="" DESIGNCLASS=""/>
<FILE FILENAME="gf2n.cpp" CONTAINERID="CCompiler" LOCALCOMMAND="" UNITNAME="gf2n" FORMNAME="" DESIGNCLASS=""/>
<FILE FILENAME="gf256.cpp" CONTAINERID="CCompiler" LOCALCOMMAND="" UNITNAME="gf256" FORMNAME="" DESIGNCLASS=""/>
@@ -279,6 +283,7 @@
<FILE FILENAME="rw.cpp" CONTAINERID="CCompiler" LOCALCOMMAND="" UNITNAME="rw" FORMNAME="" DESIGNCLASS=""/>
<FILE FILENAME="safer.cpp" CONTAINERID="CCompiler" LOCALCOMMAND="" UNITNAME="safer" FORMNAME="" DESIGNCLASS=""/>
<FILE FILENAME="seal.cpp" CONTAINERID="CCompiler" LOCALCOMMAND="" UNITNAME="seal" FORMNAME="" DESIGNCLASS=""/>
+ <FILE FILENAME="seed.cpp" CONTAINERID="CCompiler" LOCALCOMMAND="" UNITNAME="seed" FORMNAME="" DESIGNCLASS=""/>
<FILE FILENAME="serpent.cpp" CONTAINERID="CCompiler" LOCALCOMMAND="" UNITNAME="serpent" FORMNAME="" DESIGNCLASS=""/>
<FILE FILENAME="sha.cpp" CONTAINERID="CCompiler" LOCALCOMMAND="" UNITNAME="sha" FORMNAME="" DESIGNCLASS=""/>
<FILE FILENAME="shacal2.cpp" CONTAINERID="CCompiler" LOCALCOMMAND="" UNITNAME="shacal2" FORMNAME="" DESIGNCLASS=""/>
@@ -310,6 +315,7 @@
<FILE FILENAME="salsa.cpp" CONTAINERID="CCompiler" LOCALCOMMAND="" UNITNAME="salsa" FORMNAME="" DESIGNCLASS=""/>
<FILE FILENAME="sosemanuk.cpp" CONTAINERID="CCompiler" LOCALCOMMAND="" UNITNAME="sosemanuk" FORMNAME="" DESIGNCLASS=""/>
<FILE FILENAME="vmac.cpp" CONTAINERID="CCompiler" LOCALCOMMAND="" UNITNAME="vmac" FORMNAME="" DESIGNCLASS=""/>
+ <FILE FILENAME="zlib.cpp" CONTAINERID="CCompiler" LOCALCOMMAND="" UNITNAME="zlib" FORMNAME="" DESIGNCLASS=""/>
</FILELIST>
<IDEOPTIONS>
<VersionInfo>
diff --git a/gf2n.h b/gf2n.h
index a2b53e3..67ade64 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 4e93c3a..6d844fa 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 b46f67d..efa57a7 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 7e17200..75f7807 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