debian/0000755000000000000000000000000011742345770007200 5ustar debian/Makefile.am0000644000000000000000000001044711542020364011225 0ustar ## Process this file with automake to produce Makefile.in # Written by Jens Peter Secher . # Build two versions of cryptest, one that uses data files from the # current working directory, and one that uses data files from # /usr/share/crypto++. The former is for running the test suite at # build time, the latter is included in the package. # To test against newest GCC, uncomment the following two lines. #CXX = /usr/lib/gcc-snapshot/bin/g++ #CXXCPP = /usr/lib/gcc-snapshot/bin/g++ bin_PROGRAMS = cryptest cryptestcwd cryptest_CXXFLAGS = -DPACKAGE_DATA_DIR='"/usr/share/crypto++/"' cryptest_SOURCES = \ bench.cpp \ bench2.cpp \ datatest.cpp \ dlltest.cpp \ fipsalgt.cpp \ regtest.cpp \ test.cpp \ validat1.cpp \ validat2.cpp \ validat3.cpp cryptest_LDADD = libcrypto++.la cryptestcwd_CXXFLAGS = -DPACKAGE_DATA_DIR='""' cryptestcwd_SOURCES = \ bench.cpp \ bench2.cpp \ datatest.cpp \ dlltest.cpp \ fipsalgt.cpp \ regtest.cpp \ test.cpp \ validat1.cpp \ validat2.cpp \ validat3.cpp cryptestcwd_LDADD = libcrypto++.la lib_LTLIBRARIES = libcrypto++.la libcrypto___la_LDFLAGS = -version-info 9:0:0 libcrypto___la_SOURCES = \ 3way.cpp \ adler32.cpp \ algebra.cpp \ algparam.cpp \ arc4.cpp \ asn.cpp \ authenc.cpp \ base32.cpp \ base64.cpp \ basecode.cpp \ bfinit.cpp \ blowfish.cpp \ blumshub.cpp \ camellia.cpp \ cast.cpp \ casts.cpp \ cbcmac.cpp \ ccm.cpp \ channels.cpp \ cmac.cpp \ cpu.cpp \ crc.cpp \ cryptlib.cpp \ default.cpp \ des.cpp \ dessp.cpp \ dh2.cpp \ dh.cpp \ dll.cpp \ dsa.cpp \ eax.cpp \ ec2n.cpp \ eccrypto.cpp \ ecp.cpp \ elgamal.cpp \ emsa2.cpp \ eprecomp.cpp \ esign.cpp \ files.cpp \ filters.cpp \ fips140.cpp \ fipstest.cpp \ gcm.cpp \ gf2_32.cpp \ gf256.cpp \ gf2n.cpp \ gfpcrypt.cpp \ gost.cpp \ gzip.cpp \ hex.cpp \ hmac.cpp \ hrtimer.cpp \ ida.cpp \ idea.cpp \ integer.cpp \ iterhash.cpp \ luc.cpp \ mars.cpp \ marss.cpp \ md2.cpp \ md4.cpp \ md5.cpp \ misc.cpp \ modes.cpp \ mqueue.cpp \ mqv.cpp \ nbtheory.cpp \ network.cpp \ oaep.cpp \ osrng.cpp \ panama.cpp \ pch.cpp \ pkcspad.cpp \ polynomi.cpp \ pssr.cpp \ pubkey.cpp \ queue.cpp \ rabin.cpp \ randpool.cpp \ rc2.cpp \ rc5.cpp \ rc6.cpp \ rdtables.cpp \ rijndael.cpp \ ripemd.cpp \ rng.cpp \ rsa.cpp \ rw.cpp \ safer.cpp \ salsa.cpp \ seal.cpp \ seed.cpp \ serpent.cpp \ shacal2.cpp \ sha.cpp \ sharkbox.cpp \ shark.cpp \ simple.cpp \ skipjack.cpp \ socketft.cpp \ sosemanuk.cpp \ square.cpp \ squaretb.cpp \ strciphr.cpp \ tea.cpp \ tftables.cpp \ tiger.cpp \ tigertab.cpp \ trdlocal.cpp \ ttmac.cpp \ twofish.cpp \ vmac.cpp \ wait.cpp \ wake.cpp \ whrlpool.cpp \ winpipes.cpp \ xtr.cpp \ xtrcrypt.cpp \ zdeflate.cpp \ zinflate.cpp \ zlib.cpp pkginclude_HEADERS = \ 3way.h \ adler32.h \ aes.h \ algebra.h \ algparam.h \ arc4.h \ argnames.h \ asn.h \ authenc.h \ base32.h \ base64.h \ basecode.h \ bench.h \ blowfish.h \ blumshub.h \ camellia.h \ cast.h \ cbcmac.h \ ccm.h \ channels.h \ cmac.h \ config.h \ cpu.h \ crc.h \ cryptlib.h \ default.h \ des.h \ dh2.h \ dh.h \ dll.h \ dmac.h \ dsa.h \ eax.h \ ec2n.h \ eccrypto.h \ ecp.h \ elgamal.h \ emsa2.h \ eprecomp.h \ esign.h \ factory.h \ files.h \ filters.h \ fips140.h \ fltrimpl.h \ gcm.h \ gf2_32.h \ gf256.h \ gf2n.h \ gfpcrypt.h \ gost.h \ gzip.h \ hex.h \ hmac.h \ hrtimer.h \ ida.h \ idea.h \ integer.h \ iterhash.h \ lubyrack.h \ luc.h \ mars.h \ md2.h \ md4.h \ md5.h \ mdc.h \ misc.h \ modarith.h \ modes.h \ modexppc.h \ mqueue.h \ mqv.h \ nbtheory.h \ network.h \ nr.h \ oaep.h \ oids.h \ osrng.h \ panama.h \ pch.h \ pkcspad.h \ polynomi.h \ pssr.h \ pubkey.h \ pwdbased.h \ queue.h \ rabin.h \ randpool.h \ rc2.h \ rc5.h \ rc6.h \ rijndael.h \ ripemd.h \ rng.h \ rsa.h \ rw.h \ safer.h \ salsa.h \ seal.h \ secblock.h \ seckey.h \ seed.h \ serpent.h \ serpentp.h \ shacal2.h \ sha.h \ shark.h \ simple.h \ skipjack.h \ smartptr.h \ socketft.h \ sosemanuk.h \ square.h \ stdcpp.h \ strciphr.h \ tea.h \ tiger.h \ trdlocal.h \ trunhash.h \ ttmac.h \ twofish.h \ vmac.h \ wait.h \ wake.h \ whrlpool.h \ winpipes.h \ words.h \ xtr.h \ xtrcrypt.h \ zdeflate.h \ zinflate.h \ zlib.h htmldir = $(datadir)/html html: $(libcrypto___la_SOURCES) doxygen debian/changelog0000644000000000000000000003504511742342535011055 0ustar libcrypto++ (5.6.1-6) unstable; urgency=low * Fix build failure with gcc-4.7 (closes: #668700) by adding missing 'this' references. Thanks to Matthias Klose . * Update packaging bits. -- Laszlo Boszormenyi (GCS) Sat, 14 Apr 2012 20:21:41 +0200 libcrypto++ (5.6.1-5) unstable; urgency=low * New maintainer (closes: #628935). * salsa.patch from upstream to fix testcase FTBFS (closes: #628298). -- Laszlo Boszormenyi (GCS) Sat, 04 Jun 2011 20:15:34 +0200 libcrypto++ (5.6.1-4) unstable; urgency=low * Fix Pananma so that it works on armel, thanks to Wei Dai. (Closes: #619856) -- Jens Peter Secher Mon, 25 Apr 2011 21:13:50 +0200 libcrypto++ (5.6.1-3) unstable; urgency=low * Make debug packages conflict with each other because they all include usr/bin/cryptest. (Closes: #619527) * Removed obsolete README.source now that the package is in dpkg format 3.0 (quilt). -- Jens Peter Secher Sun, 27 Mar 2011 23:56:51 +0200 libcrypto++ (5.6.1-2) unstable; urgency=low * Build for Wheezy, no change. (Closes: #599639) -- Jens Peter Secher Tue, 22 Mar 2011 04:51:04 +0100 libcrypto++ (5.6.1-1) experimental; urgency=low * New release, which changes the API of the library, so bumping the SO version to 9. * Patch for sha256 assembly is now included upstream. * Bumped Standards-Version to 3.9.1, no change. -- Jens Peter Secher Tue, 10 Aug 2010 21:26:54 +0200 libcrypto++ (5.6.0-6) unstable; urgency=low * Fix sha256 assembly problem with signed address comparison, thanks to Ken Raeburn. (Closes: #585930) * Converted to dpkg-source format 3.0 (quilt). * Use mercurial-buildpackage for repository maintenance, so old repository does not exist any more. * Bumped Standards-Version to 3.8.4, no change. * Use misc:Depends debhelper macro for all packages. * Introduced a realclean target in debian/rules for cleaning up an interrupted build. * Build-depend on a proper quilt-handling version of dpkg-source instead of quilt itself. -- Jens Peter Secher Wed, 16 Jun 2010 23:50:50 +0200 libcrypto++ (5.6.0-5) unstable; urgency=low * Fix build failure on Hurd by using POSIX threads, thanks to Samuel Thibault. (Closes: #550786) -- Jens Peter Secher Fri, 16 Oct 2009 20:06:13 +0200 libcrypto++ (5.6.0-4) unstable; urgency=low * Inlcude missing testvector for AES, thanks to Nelson A. de Oliveira. (Closes: #549150) * Do not include .la file per request from Kartik Mistry. -- Jens Peter Secher Thu, 01 Oct 2009 22:08:44 +0200 libcrypto++ (5.6.0-3) unstable; urgency=low * Depend on generic automake package (at the time of writing version 11). (Closes: #543028) * Update the various package descriptions. (Closes: #531814) * Upgrate to debhelper version 7, using dh_prep instead of dh_clean -k. * Updated Standards-Version to 3.8.3, but retaining GNU style variables because they are passed to automake scripts. Also correct "hppa-linux" to "hppa-linux-gnu". -- Jens Peter Secher Sat, 22 Aug 2009 19:55:04 +0200 libcrypto++ (5.6.0-2) unstable; urgency=low * Added a package with debug symbols. * Drop the DCRYPTOPP_DISABLE_ASM flag to avoid segfault in amule on i386. (Closes: #525071) -- Jens Peter Secher Tue, 28 Apr 2009 23:23:21 +0200 libcrypto++ (5.6.0-1) unstable; urgency=low * New upstream version. + Includes incompatible changes, so bumping the shared library number to 8 (libtool version info 8:0:0). + The test data is now in its own directory, so this TestData directory is handled in debian/rules the same way that TestVectors is. * Link with pthread to avoid warning from dpkg-shlibdeps. * Avoid running the test suite twice by giving it its own target: check. -- Jens Peter Secher Tue, 07 Apr 2009 02:52:06 +0200 libcrypto++ (5.5.2-3) unstable; urgency=low * Use quilt instead of dpatch for patches, and describe how to use quilt in Debian.source (thanks to Russ Allbery). * Added a Vcs-Hg control filed to indicate the location of the public repository. * Bumped Standards-Version to 3.8.1. -- Jens Peter Secher Tue, 07 Apr 2009 00:51:49 +0200 libcrypto++ (5.5.2-2) unstable; urgency=low * Produce a pkg-config file for the development package. (Closes: #473090) * Use doc-bas section Programming. -- Jens Peter Secher Sat, 29 Mar 2008 17:37:32 +0100 libcrypto++ (5.5.2-1) unstable; urgency=low * New upstream version. * Increased SONAME from 6 to 7 because of API changes. * Fixed GCC 4.3 header include problem. (Closes: #455627) * Created symlinks from libcryptopp* to libcrypto++*, as requested in bug #448766. * Bumped debhelper version to 5. * Bumped Standards-Version to 3.7.3. -- Jens Peter Secher Tue, 11 Dec 2007 19:06:15 +0100 libcrypto++ (5.5-5) unstable; urgency=low * Create a symlink to /usr/include/cryptopp -> crypto++ to aid portability of client code. (Closes: #448766) * Bumped automake to 1.10 instead of 1.9 . -- Jens Peter Secher Sun, 11 Nov 2007 21:51:53 +0100 libcrypto++ (5.5-4) unstable; urgency=low * Use POSIX threads on GNU/kFreeBSD, thanks to Petr Salinger. (Closes: #433672) -- Jens Peter Secher Sun, 19 Aug 2007 10:02:37 +0200 libcrypto++ (5.5-3) unstable; urgency=high * Do not compile with -msse2 to avoid crash on Pentium II, thanks to Adeodato Simó. Hence the high urgency. (Closes: #428150) * Use ${binary:Version} instead of ${Source-Version} to facilitate binNMU. * Do not ignore 'make clean' errors. -- Jens Peter Secher Sat, 30 Jun 2007 16:39:14 +0200 libcrypto++ (5.5-2) unstable; urgency=low * Use CURDIR throughout debian/rules to avoid buildd failures. -- Jens Peter Secher Tue, 29 May 2007 20:29:08 +0200 libcrypto++ (5.5-1) unstable; urgency=low * New upstream release. * Bumped SO name to 6.0.0 because of new namespaces and removed algorithms. * Updated man page and build scripts. * Only use header files to generate documentation because Doxygen otherwise chokes. -- Jens Peter Secher Sat, 12 May 2007 12:50:30 +0200 libcrypto++ (5.4-1) experimental; urgency=low * New upstream release. * Removed all patches that have now been included upstream. * Now that things are stable with both Crypto++ and GCC, the shared library has a proper SO name. -- Jens Peter Secher Fri, 15 Dec 2006 23:32:46 +0100 libcrypto++ (5.2.1c2a-3) unstable; urgency=low * Patch source so that it compiles with GCC 4.1 . More specifically, avoid mixing implicit calls to base classes and free-standing functions. (Closes: #356170) * Use LDFLAGS=-pthread to fix linking errors. -- Jens Peter Secher Thu, 16 Mar 2006 23:08:48 +0100 libcrypto++ (5.2.1c2a-2) unstable; urgency=low * Build-depend on a version of g++ that fixes PR c++/21123 which resulted in internal compiler errors on m68k, arm, and hppa (Closes: #343003) * Include an override to stop Lintian complaining about the name of the shared library. * Removed link in main headline of Doxygen generated documentaion since Doxygen insists on escaping it. -- Jens Peter Secher Tue, 13 Dec 2005 20:40:25 +0100 libcrypto++ (5.2.1c2a-1) unstable; urgency=low * Rebuild and name change due to libstdc++6 mt-allocator transition. (Closes: #339201) -- Jens Peter Secher Sat, 19 Nov 2005 23:56:27 +0100 libcrypto++ (5.2.1c2-8) unstable; urgency=low * Force autoreconf to use automake1.9 so that it is possible to have several automake versions installed. -- Jens Peter Secher Sat, 1 Oct 2005 16:11:18 +0200 libcrypto++ (5.2.1c2-7) unstable; urgency=low * Use the upstream-provided way of doing manual template instantiation on architectures where it is necessary to use GCC3.4. -- Jens Peter Secher Mon, 26 Sep 2005 19:08:30 +0200 libcrypto++ (5.2.1c2-6) unstable; urgency=low * Circumvent GCC4 internal compiler error on m68k, arm, and hppa by using GCC3.4 on those architectures, thanks to Adeodato Simó. (Closes: #328975) -- Jens Peter Secher Tue, 20 Sep 2005 20:46:29 +0200 libcrypto++ (5.2.1c2-5) unstable; urgency=low * Fixed the debian/rules so that the binary-arch target can be built in isolation. (Closes: #323161) * Added a doc-base file for the libcrypto++-doc package. -- Jens Peter Secher Mon, 15 Aug 2005 22:18:05 +0200 libcrypto++ (5.2.1c2-4) unstable; urgency=low * Really take care of endianess this time by letting config.status manipulate config.h . * Split the documentation into a libcrypto++-doc package. -- Jens Peter Secher Wed, 10 Aug 2005 23:47:51 +0200 libcrypto++ (5.2.1c2-3) unstable; urgency=low * Take care of architecture endianess by using AC_C_BIGENDIAN in configure.ac . Should fix building for s390 and mipsel. -- Jens Peter Secher Mon, 8 Aug 2005 21:25:50 +0200 libcrypto++ (5.2.1c2-2) unstable; urgency=low * Stopped including autotools generated scripts, and instead build-depends on automaken to avoid strange problems with libtool that causes problems for the build daemons. * Fix cryptest so that it always can find its data files, and put it in the libcrypto++-utils package again. -- Jens Peter Secher Sat, 6 Aug 2005 16:34:56 +0200 libcrypto++ (5.2.1c2-1) unstable; urgency=low * New maintainer. (Closes: #288433) * Complete re-autotoolising of the package to retain pristine upstream source and to only build-depend on libtool. * The crypto++-util package has been merged into the crypto++-dev package and is thus dead. * Applied patches from Ben Hutchings to avoid compile warnings (Closes: #286114) * Circumvented anonymous-enum and template-instantiations problems with GCC 4. Thanks to Florian Weimer and Jozef Matula for guiding me in the right direction. (Closes: #318518) * Started using dpatch since some of the above patches probably could make it upstream. -- Jens Peter Secher Sun, 31 Jul 2005 02:07:29 +0200 libcrypto++ (5.2.1a-1) unstable; urgency=high * Urgency set to high because lastest upload was unclean * Rename libcrypto++-5.2.1.orig.tar.gz in libcrypto++-5.2.1a.orig.tar.gz -- Pierre Machard Fri, 27 Aug 2004 12:35:05 +0200 libcrypto++ (5.2.1-2) unstable; urgency=high * Added TestVectors to example dir * Add symlink from cryptopp_config.h to config.h (closes: #244980) * Hack configure.in to fit with new upstream version. This hack is far from being complete and quite uggly. * Update manpage * Automaticaly update config.{sub,guess} -- Pierre Machard Sat, 21 Aug 2004 08:59:37 +0200 libcrypto++ (5.2.1-1) unstable; urgency=high * Adding myself as package uploaders * Urgency set to high because of #244892 * New upstream release (closes: #244892, #247922, #245921, #261074) -- Pierre Machard Fri, 20 Aug 2004 05:22:28 +0200 libcrypto++ (5.1-5) unstable; urgency=low * Remove the final arch specific (rather than feature specifc) tests in crypto_config.h, Closes: #238220 * Add symlinks libcrypto++.{a,la,so} pointing to libcrypto++5.1.{a,la,so} so that users can act like the ABI of this library doesn't change with every major release, Closes: #241148 -- Stephen Zander Mon, 19 Apr 2004 18:10:28 -0700 libcrypto++ (5.1-4) unstable; urgency=low * Build with -fno-strict-aliasing. This should fix the segfaults on non-i386 architectures. * Add -ffunction-sections for hppa build, Closes: #238220 -- Stephen Zander Fri, 19 Mar 2004 02:06:08 -0800 libcrypto++ (5.1-3) unstable; urgency=low * Move datatest.cpp from libcrypto++5.1.so to the cryptest source to really fix the GlobalRNG bug, Closes: #236539 -- Stephen Zander Sun, 14 Mar 2004 20:23:16 -0800 libcrypto++ (5.1-2) unstable; urgency=low * Remove validate.h from the libcrypto++5.1.so headers; it should only be used by cryptest, Closes: #236539 * Include test.cpp as an example of how to invoke the various Crypto++ routines, Closes: #236844 * Allow cryptest to look for validation files in the current directory as well as /usr/share/crypto++, Closes: #236968 -- Stephen Zander Sat, 13 Mar 2004 00:59:54 -0800 libcrypto++ (5.1-1) unstable; urgency=low * Drop the gcc-3.2 dependency as gcc-3.2 should be everywhere by now. This also fixes the build failure on ARM. * Rename the library from libcrypto++.so.5 to libcrypto++5.1.so.0 as upstream does not maintain binary compatibility and having the 5.1 package provide libcrypto++.so.6 strikes me as too confusing. * New upstream version, Closes: #213953 * Include full paths to data files used by the cryptest validation routines, Closes: #198696 * Add MD4 to the output of 'cryptest b' and segregate the hashing algorithms from the encryption algorithms, Closes: #198698 * Include Doxygen generated documents in the libcrypto++-dev package, Closes: #211725 -- Stephen Zander Tue, 17 Feb 2004 12:41:29 -0800 libcrypto++ (5.0-3) unstable; urgency=low * Add generic 64bit arch support, rather than hard-coded alpha supoprt, Closes: #181457 -- Stephen Zander Sat, 15 Mar 2003 17:47:27 -0800 libcrypto++ (5.0-2) unstable; urgency=low * Convert the gcc-3.2 build depends to a g++-3.2, they way it should be Closes: #175085 * Clean up cryptlib.h slightly so it's not so noisy under -Wall, Closes: #175180 -- Stephen Zander Tue, 7 Jan 2003 01:24:07 -0800 libcrypto++ (5.0-1) unstable; urgency=low * Package moved to main. * New upstream version, Closes: #174217 * All files now have appropriate copyright entries and debian/copyright accurately reflects the contents of this package, Closes: #153926 * cryptest now successfully runs to completion, Closes: #153929 * Fix a typo in the cryptest manpage, Closes: #153932 -- Stephen Zander Fri, 27 Dec 2002 11:23:06 -0800 libcrypto++ (4.2-1) unstable; urgency=low * New package, Closes: #79131 -- Stephen Zander Fri, 5 Jul 2002 09:45:26 -0700 debian/compat0000644000000000000000000000000211742342023010362 0ustar 8 debian/config.h.in0000644000000000000000000003604311542020364011214 0ustar // Debian note: This is a copy of the original config.h file except for the two // endianness undefs below; they are substituted by the autoconf process // according to the build architecture. #ifndef CRYPTOPP_CONFIG_H #define CRYPTOPP_CONFIG_H // ***************** Important Settings ******************** // Endianness #undef IS_BIG_ENDIAN #undef IS_LITTLE_ENDIAN // define this if you want to disable all OS-dependent features, // such as sockets and OS-provided random number generators // #define NO_OS_DEPENDENCE // Define this to use features provided by Microsoft's CryptoAPI. // Currently the only feature used is random number generation. // This macro will be ignored if NO_OS_DEPENDENCE is defined. #define USE_MS_CRYPTOAPI // Define this to 1 to enforce the requirement in FIPS 186-2 Change Notice 1 that only 1024 bit moduli be used #ifndef DSA_1024_BIT_MODULUS_ONLY # define DSA_1024_BIT_MODULUS_ONLY 1 #endif // ***************** Less Important Settings *************** // define this to retain (as much as possible) old deprecated function and class names // #define CRYPTOPP_MAINTAIN_BACKWARDS_COMPATIBILITY #define GZIP_OS_CODE 0 // Try this if your CPU has 256K internal cache or a slow multiply instruction // and you want a (possibly) faster IDEA implementation using log tables // #define IDEA_LARGECACHE // Define this if, for the linear congruential RNG, you want to use // the original constants as specified in S.K. Park and K.W. Miller's // CACM paper. // #define LCRNG_ORIGINAL_NUMBERS // choose which style of sockets to wrap (mostly useful for cygwin which has both) #define PREFER_BERKELEY_STYLE_SOCKETS // #define PREFER_WINDOWS_STYLE_SOCKETS // set the name of Rijndael cipher, was "Rijndael" before version 5.3 #define CRYPTOPP_RIJNDAEL_NAME "AES" // ***************** Important Settings Again ******************** // But the defaults should be ok. // namespace support is now required #ifdef NO_NAMESPACE # error namespace support is now required #endif // Define this to workaround a Microsoft CryptoAPI bug where // each call to CryptAcquireContext causes a 100 KB memory leak. // Defining this will cause Crypto++ to make only one call to CryptAcquireContext. #define WORKAROUND_MS_BUG_Q258000 #ifdef CRYPTOPP_DOXYGEN_PROCESSING // Avoid putting "CryptoPP::" in front of everything in Doxygen output # define CryptoPP # define NAMESPACE_BEGIN(x) # define NAMESPACE_END // Get Doxygen to generate better documentation for these typedefs # define DOCUMENTED_TYPEDEF(x, y) class y : public x {}; #else # define NAMESPACE_BEGIN(x) namespace x { # define NAMESPACE_END } # define DOCUMENTED_TYPEDEF(x, y) typedef x y; #endif #define ANONYMOUS_NAMESPACE_BEGIN namespace { #define USING_NAMESPACE(x) using namespace x; #define DOCUMENTED_NAMESPACE_BEGIN(x) namespace x { #define DOCUMENTED_NAMESPACE_END } // What is the type of the third parameter to bind? // For Unix, the new standard is ::socklen_t (typically unsigned int), and the old standard is int. // Unfortunately there is no way to tell whether or not socklen_t is defined. // To work around this, TYPE_OF_SOCKLEN_T is a macro so that you can change it from the makefile. #ifndef TYPE_OF_SOCKLEN_T # if defined(_WIN32) || defined(__CYGWIN__) # define TYPE_OF_SOCKLEN_T int # else # define TYPE_OF_SOCKLEN_T ::socklen_t # endif #endif #if defined(__CYGWIN__) && defined(PREFER_WINDOWS_STYLE_SOCKETS) # define __USE_W32_SOCKETS #endif typedef unsigned char byte; // put in global namespace to avoid ambiguity with other byte typedefs NAMESPACE_BEGIN(CryptoPP) typedef unsigned short word16; typedef unsigned int word32; #if defined(_MSC_VER) || defined(__BORLANDC__) typedef unsigned __int64 word64; #define W64LIT(x) x##ui64 #else typedef unsigned long long word64; #define W64LIT(x) x##ULL #endif // define large word type, used for file offsets and such typedef word64 lword; const lword LWORD_MAX = W64LIT(0xffffffffffffffff); #ifdef __GNUC__ #define CRYPTOPP_GCC_VERSION (__GNUC__ * 10000 + __GNUC_MINOR__ * 100 + __GNUC_PATCHLEVEL__) #endif // define hword, word, and dword. these are used for multiprecision integer arithmetic // Intel compiler won't have _umul128 until version 10.0. See http://softwarecommunity.intel.com/isn/Community/en-US/forums/thread/30231625.aspx #if (defined(_MSC_VER) && (!defined(__INTEL_COMPILER) || __INTEL_COMPILER >= 1000) && (defined(_M_X64) || defined(_M_IA64))) || (defined(__DECCXX) && defined(__alpha__)) || (defined(__INTEL_COMPILER) && defined(__x86_64__)) || (defined(__SUNPRO_CC) && defined(__x86_64__)) typedef word32 hword; typedef word64 word; #else #define CRYPTOPP_NATIVE_DWORD_AVAILABLE #if defined(__alpha__) || defined(__ia64__) || defined(_ARCH_PPC64) || defined(__x86_64__) || defined(__mips64) || defined(__sparc64__) #if defined(__GNUC__) && !defined(__INTEL_COMPILER) && !(CRYPTOPP_GCC_VERSION == 40001 && defined(__APPLE__)) && CRYPTOPP_GCC_VERSION >= 30400 // GCC 4.0.1 on MacOS X is missing __umodti3 and __udivti3 // mode(TI) division broken on amd64 with GCC earlier than GCC 3.4 typedef word32 hword; typedef word64 word; typedef __uint128_t dword; typedef __uint128_t word128; #define CRYPTOPP_WORD128_AVAILABLE #else // if we're here, it means we're on a 64-bit CPU but we don't have a way to obtain 128-bit multiplication results typedef word16 hword; typedef word32 word; typedef word64 dword; #endif #else // being here means the native register size is probably 32 bits or less #define CRYPTOPP_BOOL_SLOW_WORD64 1 typedef word16 hword; typedef word32 word; typedef word64 dword; #endif #endif #ifndef CRYPTOPP_BOOL_SLOW_WORD64 #define CRYPTOPP_BOOL_SLOW_WORD64 0 #endif const unsigned int WORD_SIZE = sizeof(word); const unsigned int WORD_BITS = WORD_SIZE * 8; NAMESPACE_END #ifndef CRYPTOPP_L1_CACHE_LINE_SIZE // This should be a lower bound on the L1 cache line size. It's used for defense against timing attacks. #if defined(_M_X64) || defined(__x86_64__) #define CRYPTOPP_L1_CACHE_LINE_SIZE 64 #else // L1 cache line size is 32 on Pentium III and earlier #define CRYPTOPP_L1_CACHE_LINE_SIZE 32 #endif #endif #if defined(_MSC_VER) #if _MSC_VER == 1200 #include #endif #if _MSC_VER > 1200 || defined(_mm_free) #define CRYPTOPP_MSVC6PP_OR_LATER // VC 6 processor pack or later #else #define CRYPTOPP_MSVC6_NO_PP // VC 6 without processor pack #endif #endif #ifndef CRYPTOPP_ALIGN_DATA #if defined(CRYPTOPP_MSVC6PP_OR_LATER) #define CRYPTOPP_ALIGN_DATA(x) __declspec(align(x)) #elif defined(__GNUC__) #define CRYPTOPP_ALIGN_DATA(x) __attribute__((aligned(x))) #else #define CRYPTOPP_ALIGN_DATA(x) #endif #endif #ifndef CRYPTOPP_SECTION_ALIGN16 #if defined(__GNUC__) && !defined(__APPLE__) // the alignment attribute doesn't seem to work without this section attribute when -fdata-sections is turned on #define CRYPTOPP_SECTION_ALIGN16 __attribute__((section ("CryptoPP_Align16"))) #else #define CRYPTOPP_SECTION_ALIGN16 #endif #endif #if defined(_MSC_VER) || defined(__fastcall) #define CRYPTOPP_FASTCALL __fastcall #else #define CRYPTOPP_FASTCALL #endif // VC60 workaround: it doesn't allow typename in some places #if defined(_MSC_VER) && (_MSC_VER < 1300) #define CPP_TYPENAME #else #define CPP_TYPENAME typename #endif // VC60 workaround: can't cast unsigned __int64 to float or double #if defined(_MSC_VER) && !defined(CRYPTOPP_MSVC6PP_OR_LATER) #define CRYPTOPP_VC6_INT64 (__int64) #else #define CRYPTOPP_VC6_INT64 #endif #ifdef _MSC_VER #define CRYPTOPP_NO_VTABLE __declspec(novtable) #else #define CRYPTOPP_NO_VTABLE #endif #ifdef _MSC_VER // 4231: nonstandard extension used : 'extern' before template explicit instantiation // 4250: dominance // 4251: member needs to have dll-interface // 4275: base needs to have dll-interface // 4660: explicitly instantiating a class that's already implicitly instantiated // 4661: no suitable definition provided for explicit template instantiation request // 4786: identifer was truncated in debug information // 4355: 'this' : used in base member initializer list // 4910: '__declspec(dllexport)' and 'extern' are incompatible on an explicit instantiation # pragma warning(disable: 4231 4250 4251 4275 4660 4661 4786 4355 4910) #endif #ifdef __BORLANDC__ // 8037: non-const function called for const object. needed to work around BCB2006 bug # pragma warn -8037 #endif #if (defined(_MSC_VER) && _MSC_VER <= 1300) || defined(__MWERKS__) || defined(_STLPORT_VERSION) #define CRYPTOPP_DISABLE_UNCAUGHT_EXCEPTION #endif #ifndef CRYPTOPP_DISABLE_UNCAUGHT_EXCEPTION #define CRYPTOPP_UNCAUGHT_EXCEPTION_AVAILABLE #endif #ifdef CRYPTOPP_DISABLE_X86ASM // for backwards compatibility: this macro had both meanings #define CRYPTOPP_DISABLE_ASM #define CRYPTOPP_DISABLE_SSE2 #endif #if !defined(CRYPTOPP_DISABLE_ASM) && ((defined(_MSC_VER) && defined(_M_IX86)) || (defined(__GNUC__) && (defined(__i386__) || defined(__x86_64__)))) // C++Builder 2010 does not allow "call label" where label is defined within inline assembly #define CRYPTOPP_X86_ASM_AVAILABLE #if !defined(CRYPTOPP_DISABLE_SSE2) && (defined(CRYPTOPP_MSVC6PP_OR_LATER) || CRYPTOPP_GCC_VERSION >= 30300) #define CRYPTOPP_BOOL_SSE2_ASM_AVAILABLE 1 #else #define CRYPTOPP_BOOL_SSE2_ASM_AVAILABLE 0 #endif // SSSE3 was actually introduced in GNU as 2.17, which was released 6/23/2006, but we can't tell what version of binutils is installed. // GCC 4.1.2 was released on 2/13/2007, so we'll use that as a proxy for the binutils version. #if !defined(CRYPTOPP_DISABLE_SSSE3) && (_MSC_VER >= 1400 || CRYPTOPP_GCC_VERSION >= 40102) #define CRYPTOPP_BOOL_SSSE3_ASM_AVAILABLE 1 #else #define CRYPTOPP_BOOL_SSSE3_ASM_AVAILABLE 0 #endif #endif #if !defined(CRYPTOPP_DISABLE_ASM) && defined(_MSC_VER) && defined(_M_X64) #define CRYPTOPP_X64_MASM_AVAILABLE #endif #if !defined(CRYPTOPP_DISABLE_ASM) && defined(__GNUC__) && defined(__x86_64__) #define CRYPTOPP_X64_ASM_AVAILABLE #endif #if !defined(CRYPTOPP_DISABLE_SSE2) && (defined(CRYPTOPP_MSVC6PP_OR_LATER) || defined(__SSE2__)) #define CRYPTOPP_BOOL_SSE2_INTRINSICS_AVAILABLE 1 #else #define CRYPTOPP_BOOL_SSE2_INTRINSICS_AVAILABLE 0 #endif #if !defined(CRYPTOPP_DISABLE_SSSE3) && !defined(CRYPTOPP_DISABLE_AESNI) && CRYPTOPP_BOOL_SSE2_INTRINSICS_AVAILABLE && (CRYPTOPP_GCC_VERSION >= 40400 || _MSC_FULL_VER >= 150030729 || __INTEL_COMPILER >= 1110) #define CRYPTOPP_BOOL_AESNI_INTRINSICS_AVAILABLE 1 #else #define CRYPTOPP_BOOL_AESNI_INTRINSICS_AVAILABLE 0 #endif #if CRYPTOPP_BOOL_SSE2_INTRINSICS_AVAILABLE || CRYPTOPP_BOOL_SSE2_ASM_AVAILABLE || defined(CRYPTOPP_X64_MASM_AVAILABLE) #define CRYPTOPP_BOOL_ALIGN16_ENABLED 1 #else #define CRYPTOPP_BOOL_ALIGN16_ENABLED 0 #endif // how to allocate 16-byte aligned memory (for SSE2) #if defined(CRYPTOPP_MSVC6PP_OR_LATER) #define CRYPTOPP_MM_MALLOC_AVAILABLE #elif defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) #define CRYPTOPP_MALLOC_ALIGNMENT_IS_16 #elif defined(__linux__) || defined(__sun__) || defined(__CYGWIN__) #define CRYPTOPP_MEMALIGN_AVAILABLE #else #define CRYPTOPP_NO_ALIGNED_ALLOC #endif // how to disable inlining #if defined(_MSC_VER) && _MSC_VER >= 1300 # define CRYPTOPP_NOINLINE_DOTDOTDOT # define CRYPTOPP_NOINLINE __declspec(noinline) #elif defined(__GNUC__) # define CRYPTOPP_NOINLINE_DOTDOTDOT # define CRYPTOPP_NOINLINE __attribute__((noinline)) #else # define CRYPTOPP_NOINLINE_DOTDOTDOT ... # define CRYPTOPP_NOINLINE #endif // how to declare class constants #if (defined(_MSC_VER) && _MSC_VER <= 1300) || defined(__INTEL_COMPILER) # define CRYPTOPP_CONSTANT(x) enum {x}; #else # define CRYPTOPP_CONSTANT(x) static const int x; #endif #if defined(_M_X64) || defined(__x86_64__) #define CRYPTOPP_BOOL_X64 1 #else #define CRYPTOPP_BOOL_X64 0 #endif // see http://predef.sourceforge.net/prearch.html #if defined(_M_IX86) || defined(__i386__) || defined(__i386) || defined(_X86_) || defined(__I86__) || defined(__INTEL__) #define CRYPTOPP_BOOL_X86 1 #else #define CRYPTOPP_BOOL_X86 0 #endif #if CRYPTOPP_BOOL_X64 || CRYPTOPP_BOOL_X86 || defined(__powerpc__) #define CRYPTOPP_ALLOW_UNALIGNED_DATA_ACCESS #endif #define CRYPTOPP_VERSION 561 // ***************** determine availability of OS features ******************** #ifndef NO_OS_DEPENDENCE #if defined(_WIN32) || defined(__CYGWIN__) #define CRYPTOPP_WIN32_AVAILABLE #endif #if defined(__unix__) || defined(__MACH__) || defined(__NetBSD__) || defined(__sun) #define CRYPTOPP_UNIX_AVAILABLE #endif #if defined(CRYPTOPP_WIN32_AVAILABLE) || defined(CRYPTOPP_UNIX_AVAILABLE) # define HIGHRES_TIMER_AVAILABLE #endif #ifdef CRYPTOPP_UNIX_AVAILABLE # define HAS_BERKELEY_STYLE_SOCKETS #endif #ifdef CRYPTOPP_WIN32_AVAILABLE # define HAS_WINDOWS_STYLE_SOCKETS #endif #if defined(HIGHRES_TIMER_AVAILABLE) && (defined(HAS_BERKELEY_STYLE_SOCKETS) || defined(HAS_WINDOWS_STYLE_SOCKETS)) # define SOCKETS_AVAILABLE #endif #if defined(HAS_WINDOWS_STYLE_SOCKETS) && (!defined(HAS_BERKELEY_STYLE_SOCKETS) || defined(PREFER_WINDOWS_STYLE_SOCKETS)) # define USE_WINDOWS_STYLE_SOCKETS #else # define USE_BERKELEY_STYLE_SOCKETS #endif #if defined(HIGHRES_TIMER_AVAILABLE) && defined(CRYPTOPP_WIN32_AVAILABLE) && !defined(USE_BERKELEY_STYLE_SOCKETS) # define WINDOWS_PIPES_AVAILABLE #endif #if defined(CRYPTOPP_WIN32_AVAILABLE) && defined(USE_MS_CRYPTOAPI) # define NONBLOCKING_RNG_AVAILABLE # define OS_RNG_AVAILABLE #endif #if defined(CRYPTOPP_UNIX_AVAILABLE) || defined(CRYPTOPP_DOXYGEN_PROCESSING) # define NONBLOCKING_RNG_AVAILABLE # define BLOCKING_RNG_AVAILABLE # define OS_RNG_AVAILABLE # define HAS_PTHREADS # define THREADS_AVAILABLE #endif #ifdef CRYPTOPP_WIN32_AVAILABLE # define HAS_WINTHREADS # define THREADS_AVAILABLE #endif #endif // NO_OS_DEPENDENCE // ***************** DLL related ******************** #if defined(CRYPTOPP_WIN32_AVAILABLE) && !defined(CRYPTOPP_DOXYGEN_PROCESSING) #ifdef CRYPTOPP_EXPORTS #define CRYPTOPP_IS_DLL #define CRYPTOPP_DLL __declspec(dllexport) #elif defined(CRYPTOPP_IMPORTS) #define CRYPTOPP_IS_DLL #define CRYPTOPP_DLL __declspec(dllimport) #else #define CRYPTOPP_DLL #endif #define CRYPTOPP_API __cdecl #else // CRYPTOPP_WIN32_AVAILABLE #define CRYPTOPP_DLL #define CRYPTOPP_API #endif // CRYPTOPP_WIN32_AVAILABLE #if defined(__MWERKS__) #define CRYPTOPP_EXTERN_DLL_TEMPLATE_CLASS extern class CRYPTOPP_DLL #elif defined(__BORLANDC__) || defined(__SUNPRO_CC) #define CRYPTOPP_EXTERN_DLL_TEMPLATE_CLASS template class CRYPTOPP_DLL #else #define CRYPTOPP_EXTERN_DLL_TEMPLATE_CLASS extern template class CRYPTOPP_DLL #endif #if defined(CRYPTOPP_MANUALLY_INSTANTIATE_TEMPLATES) && !defined(CRYPTOPP_IMPORTS) #define CRYPTOPP_DLL_TEMPLATE_CLASS template class CRYPTOPP_DLL #else #define CRYPTOPP_DLL_TEMPLATE_CLASS CRYPTOPP_EXTERN_DLL_TEMPLATE_CLASS #endif #if defined(__MWERKS__) #define CRYPTOPP_EXTERN_STATIC_TEMPLATE_CLASS extern class #elif defined(__BORLANDC__) || defined(__SUNPRO_CC) #define CRYPTOPP_EXTERN_STATIC_TEMPLATE_CLASS template class #else #define CRYPTOPP_EXTERN_STATIC_TEMPLATE_CLASS extern template class #endif #if defined(CRYPTOPP_MANUALLY_INSTANTIATE_TEMPLATES) && !defined(CRYPTOPP_EXPORTS) #define CRYPTOPP_STATIC_TEMPLATE_CLASS template class #else #define CRYPTOPP_STATIC_TEMPLATE_CLASS CRYPTOPP_EXTERN_STATIC_TEMPLATE_CLASS #endif #endif debian/configure.ac0000644000000000000000000000234111542020364011451 0ustar # -*- autoconf -*- # Process this file with autoconf to produce a configure script. # Written by Jens Peter Secher . AC_INIT([Crypto++], [5.6.1], [libcrypto++@bugs.debian.org]) AC_CONFIG_SRCDIR([cryptlib.h]) AC_CONFIG_HEADERS([cryptopp_config.h]) AC_CONFIG_HEADERS([config.h]) AM_INIT_AUTOMAKE([foreign]) AM_MAINTAINER_MODE # Checks for programs. AC_PROG_CXX AC_PROG_CC AC_PROG_LN_S AC_PROG_LIBTOOL # Checks for header files. AC_HEADER_STDC AC_CHECK_HEADERS([arpa/inet.h fcntl.h limits.h malloc.h netdb.h netinet/in.h stddef.h stdlib.h string.h sys/ioctl.h sys/socket.h sys/time.h unistd.h]) # Checks for typedefs, structures, and compiler characteristics. AC_HEADER_STDBOOL AC_C_CONST AC_C_INLINE AC_TYPE_SIZE_T AC_HEADER_TIME AC_CHECK_TYPES([ptrdiff_t]) AC_C_BIGENDIAN( AC_DEFINE(IS_BIG_ENDIAN, [], [Big-endian architecture]), AC_DEFINE(IS_LITTLE_ENDIAN, [], [Little-endian architecture]), AC_MSG_ERROR([Can't tell endianess of platform])) # Checks for library functions. AC_PROG_GCC_TRADITIONAL AC_FUNC_MALLOC AC_FUNC_MEMCMP AC_FUNC_SELECT_ARGTYPES AC_TYPE_SIGNAL AC_CHECK_FUNCS([gethostbyname gettimeofday memmove memset pow select socket]) AC_CONFIG_FILES([Makefile libcrypto++.pc]) AC_CONFIG_MACRO_DIR([m4]) AC_OUTPUT debian/control0000644000000000000000000001434311742342013010573 0ustar Source: libcrypto++ Section: libs Priority: optional Maintainer: Laszlo Boszormenyi (GCS) Standards-Version: 3.9.3 Build-Depends: debhelper (>= 8), dpkg (>= 1.15.5.6), automake, autoconf, libtool Build-Depends-Indep: doxygen Homepage: http://www.cryptopp.com Package: libcrypto++9 Architecture: any Section: libs Depends: ${shlibs:Depends}, ${misc:Depends} Description: General purpose cryptographic library - shared library General purpose cryptographic library for C++. . This package contains the shared libraries and should only be installed if other packages depend on it. Package: libcrypto++9-dbg Architecture: any Section: debug Priority: extra Depends: libcrypto++9 (= ${binary:Version}), ${misc:Depends} Conflicts: libcrypto++8-dbg Description: General purpose cryptographic library - debug symbols General purpose cryptographic library for C++. . This package contains the debug symbols for the shared library and should only be installed if you debugging a program that uses the shared library. Package: libcrypto++-dev Architecture: any Section: libdevel Depends: libcrypto++9 (= ${binary:Version}), ${misc:Depends} Description: General purpose cryptographic library - C++ development Crypto++ is library for creating C++ programs which use cryptographic algorithms. The library uses a Pipes & Filters architecture with heavy use of templates and abstract base classes. The cryptographic tools include: * Authenticated encryption schemes (GCM, CCM, EAX), * High speed stream ciphers (Panama, Sosemanuk, Salsa20, XSalsa20), * AES and candidates (Rijndael, RC6, MARS, Twofish, Serpent, CAST-256), * Other symmetric block ciphers (IDEA, Triple-DES, Camellia, SEED, RC5, Blowfish, TEA, XTEA, Skipjack, SHACAL-2), * Block cipher modes of operation (ECB, CBC, CTS, CFB, OFB, CTR), * Message authentication codes (VMAC, HMAC, CMAC, CBC-MAC, DMAC, Two-Track-MAC), * Hash functions (SHA-1, SHA-224, SHA-256, SHA-384, SHA-512, Tiger, WHIRLPOOL, RIPEMD-128, RIPEMD-256, RIPEMD-160, RIPEMD-320), * Public-key cryptography (RSA, DSA, ElGamal, NR, RW, LUC, LUCELG, DLIES, ESIGN), * Padding schemes for public-key systems (PKCS#1, OAEP, PSS, PSSR, EMSA2, EMSA5), * Key agreement schemes (DH, MQV, LUCDIF, XTR-DH), * Elliptic curve cryptography (ECDSA, ECNR, ECIES, ECDH, ECMQV), * Backwards compatibility algorithms (MD2, MD4, MD5, Panama Hash, DES, ARC4, SEAL 3.0, WAKE, WAKE-OFB, DESX, RC2, SAFER, 3-WAY, GOST, SHARK, CAST-128, Square), * Pseudo-random number generators, and a whole lot more. Alternative libraries are libgcrypt and nettle. . This package contains the header files needed for developing using the Crypto++ class library and the static library with libtool supoport. Package: libcrypto++-utils Architecture: any Section: utils Depends: ${shlibs:Depends}, ${misc:Depends} Conflicts: libcrypto++-dev (= 5.2.1c2-1) Description: General purpose cryptographic library - utilities and data files Crypto++ is library for creating C++ programs which use cryptographic algorithms. The library uses a Pipes & Filters architecture with heavy use of templates and abstract base classes. The cryptographic tools include: * Authenticated encryption schemes (GCM, CCM, EAX), * High speed stream ciphers (Panama, Sosemanuk, Salsa20, XSalsa20), * AES and candidates (Rijndael, RC6, MARS, Twofish, Serpent, CAST-256), * Other symmetric block ciphers (IDEA, Triple-DES, Camellia, SEED, RC5, Blowfish, TEA, XTEA, Skipjack, SHACAL-2), * Block cipher modes of operation (ECB, CBC, CTS, CFB, OFB, CTR), * Message authentication codes (VMAC, HMAC, CMAC, CBC-MAC, DMAC, Two-Track-MAC), * Hash functions (SHA-1, SHA-224, SHA-256, SHA-384, SHA-512, Tiger, WHIRLPOOL, RIPEMD-128, RIPEMD-256, RIPEMD-160, RIPEMD-320), * Public-key cryptography (RSA, DSA, ElGamal, NR, RW, LUC, LUCELG, DLIES, ESIGN), * Padding schemes for public-key systems (PKCS#1, OAEP, PSS, PSSR, EMSA2, EMSA5), * Key agreement schemes (DH, MQV, LUCDIF, XTR-DH), * Elliptic curve cryptography (ECDSA, ECNR, ECIES, ECDH, ECMQV), * Backwards compatibility algorithms (MD2, MD4, MD5, Panama Hash, DES, ARC4, SEAL 3.0, WAKE, WAKE-OFB, DESX, RC2, SAFER, 3-WAY, GOST, SHARK, CAST-128, Square), * Pseudo-random number generators, and a whole lot more. Alternative libraries are libgcrypt and nettle. . This package includes a utility for benchmarking and using the various Crypto++ routines from the command line. It also includes the test vectors for validating both the Crypto++ implementation and other implementations of these routines. Package: libcrypto++-doc Architecture: all Section: doc Depends: ${shlibs:Depends}, ${misc:Depends} Conflicts: libcrypto++-dev (<= 5.2.1c2-3) Enhances: libcrypto++-dev Description: General purpose cryptographic library - documentation Crypto++ is library for creating C++ programs which use cryptographic algorithms. The library uses a Pipes & Filters architecture with heavy use of templates and abstract base classes. The cryptographic tools include: * Authenticated encryption schemes (GCM, CCM, EAX), * High speed stream ciphers (Panama, Sosemanuk, Salsa20, XSalsa20), * AES and candidates (Rijndael, RC6, MARS, Twofish, Serpent, CAST-256), * Other symmetric block ciphers (IDEA, Triple-DES, Camellia, SEED, RC5, Blowfish, TEA, XTEA, Skipjack, SHACAL-2), * Block cipher modes of operation (ECB, CBC, CTS, CFB, OFB, CTR), * Message authentication codes (VMAC, HMAC, CMAC, CBC-MAC, DMAC, Two-Track-MAC), * Hash functions (SHA-1, SHA-224, SHA-256, SHA-384, SHA-512, Tiger, WHIRLPOOL, RIPEMD-128, RIPEMD-256, RIPEMD-160, RIPEMD-320), * Public-key cryptography (RSA, DSA, ElGamal, NR, RW, LUC, LUCELG, DLIES, ESIGN), * Padding schemes for public-key systems (PKCS#1, OAEP, PSS, PSSR, EMSA2, EMSA5), * Key agreement schemes (DH, MQV, LUCDIF, XTR-DH), * Elliptic curve cryptography (ECDSA, ECNR, ECIES, ECDH, ECMQV), * Backwards compatibility algorithms (MD2, MD4, MD5, Panama Hash, DES, ARC4, SEAL 3.0, WAKE, WAKE-OFB, DESX, RC2, SAFER, 3-WAY, GOST, SHARK, CAST-128, Square), * Pseudo-random number generators, and a whole lot more. Alternative libraries are libgcrypt and nettle. . This package includes the HTML reference guide to the source code. debian/copyright0000644000000000000000000000634411542020364011125 0ustar This is the Debian GNU/Linux version of the Crypto++ library. The original source was downloaded from http://cryptopp.svn.sourceforge.net/viewvc/cryptopp/tags/CRYPTOPP_5_6_1/?view=tar ---[ License.txt begin ]--- Compilation Copyright (c) 1995-2010 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. All individual files in this compilation are placed in the public domain by Wei Dai and other contributors. I would like to thank the following authors for placing their works into the public domain: Joan Daemen - 3way.cpp Leonard Janke - cast.cpp, seal.cpp Steve Reid - cast.cpp Phil Karn - des.cpp Andrew M. Kuchling - md2.cpp, md4.cpp Colin Plumb - md5.cpp Seal Woods - rc6.cpp Chris Morgan - rijndael.cpp Paulo Baretto - rijndael.cpp, skipjack.cpp, square.cpp Richard De Moliner - safer.cpp Matthew Skala - twofish.cpp Kevin Springle - camellia.cpp, shacal2.cpp, ttmac.cpp, whrlpool.cpp, ripemd.cpp Permission to use, copy, modify, and distribute this compilation for any purpose, including commercial applications, is hereby granted without fee, subject to the following restrictions: 1. Any copy or modification of this compilation in any form, except in object code form as part of an application software, must include the above copyright notice and this license. 2. Users of this software agree that any modification or extension they provide to Wei Dai will be considered public domain and not copyrighted unless it includes an explicit copyright notice. 3. Wei Dai makes no warranty or representation that the operation of the software in this compilation will be error-free, and Wei Dai is under no obligation to provide any services, by way of maintenance, update, or otherwise. THE SOFTWARE AND ANY DOCUMENTATION ARE PROVIDED "AS IS" WITHOUT EXPRESS OR IMPLIED WARRANTY INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT WILL WEI DAI OR ANY OTHER CONTRIBUTOR BE LIABLE FOR DIRECT, INCIDENTAL OR CONSEQUENTIAL DAMAGES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. 4. Users will not use Wei Dai or any other contributor's name in any publicity or advertising, without prior written consent in each case. 5. Export of this software from the United States may require a specific license from the United States Government. It is the responsibility of any person or organization contemplating export to obtain such a license before exporting. 6. Certain parts of this software may be protected by patents. It is the users' responsibility to obtain the appropriate licenses before using those parts. If this compilation is used in object code form in an application software, acknowledgement of the author is not required but would be appreciated. The contribution of any useful modifications or extensions to Wei Dai is not required but would also be appreciated. ---[ License.txt end ]--- Debian specific changes are copyright (c) 2000-2002 Stephen Zander , (c) 2004 Pierre Machard , (c) 2005-2010 Jens Peter Secher , licensed under the same the same terms as the rest of the Crypto++ package. debian/cryptest.10000644000000000000000000000433711542020364011131 0ustar .TH cryptest 1 local .SH NAME cryptest \- Test Driver for Crypto++, a C++ Class Library of Cryptographic Primitives .SH SYNOPSIS .B cryptest [\fIOPTION\fR] .SH DESCRIPTION cryptest takes the following options .TP .B g generate an RSA key .TP .B h display usage information .TP .B r encrypt and decrypt a string using RSA .TP .BI rs " privatekeyfile messagefile signaturefile" sign a file using RSA .TP .BI rv " publickeyfile messagefile signaturefile" verify a signature of a file using RSA .TP .BI m " file" calculate MD5, SHA, and RIPEMD-160 message digests .TP .B t encrypt and decrypt a string using DES-EDE in CBC mode .TP .BI e|d " input output" encrypt or decrypt a file .TP .BI ss " file" secret share a file (shares will be named file.000, file.001, etc) .TP .BI sr " file share1 share2 [....]" reconstruct a secret-shared file (number of shares given must be equal to threshold) .TP .BI id " file" information disperse a file (shares will be named file.000, file.001, etc) .TP .BI ir " file share1 share2 [....]" reconstruct an information-dispersed file (number of shares given must be equal to threshold) .TP .BI z " input output" gzip a file .TP .BI u " input output" gunzip a file .TP .BI ae " input output" encrypt a file with AES in CTR mode .TP .BI e64 " input output" base64 encode a file .TP .BI d64 " input output" base64 decode a file .TP .BI e16 " input output" hex encode a file .TP .BI d16 " input output" hex decode a file .TP .BI ft " source-port destination-host destination-port" forward a TCP connection .TP .BI fips run the FIPS 140-2 sample application .TP .BI fips-rand generate 100000 random files using FIPS Approved X.917 RNG .TP .BI mt " input" run Maurer's randomness test on a file .TP .B v run validation tests .TP .B V display version number .TP .BI b " [time for each benchmark in seconds] [frequency of CPU in gigahertz]" run benchmarks .TP .BI tv " filename" run test vector file (available in TestVectors example subdirectory) .SH AUTHOR This man page was created by Stephen Zander, Pierre Machard and Jens Peter Secher for the Debian distribution. It is licenced under the same terms as the rest of the Crypto++ library, written by Wei Dai. debian/libcrypto++-dev.docs0000644000000000000000000000001311542020364012740 0ustar Readme.txt debian/libcrypto++-dev.install0000644000000000000000000000013611742345672013502 0ustar usr/include/crypto--/*.h usr/include/crypto++ usr/lib/*.a usr/lib/*.so usr/lib/pkgconfig/*.pc debian/libcrypto++-dev.links0000644000000000000000000000021211542020364013131 0ustar /usr/include/crypto++ /usr/include/cryptopp /usr/lib/libcrypto++.a /usr/lib/libcryptopp.a /usr/lib/libcrypto++.so /usr/lib/libcryptopp.so debian/libcrypto++-doc.doc-base0000644000000000000000000000050311542020364013460 0ustar Document: libcrypto++ Title: Crypto++ library reference manual Author: Wei Dai Abstract: Reference manual for the general purpose cryptographic library Crypto++ for the C++ language. Section: Programming Format: HTML Index: /usr/share/doc/libcrypto++-doc/html/index.html Files: /usr/share/doc/libcrypto++-doc/html/*.html debian/libcrypto++-doc.docs0000644000000000000000000000001211542020364012726 0ustar doc/html/ debian/libcrypto++-utils.install0000644000000000000000000000016211542020364014045 0ustar usr/bin/cryptest usr/share/crypto--/TestData usr/share/crypto++ usr/share/crypto--/TestVectors usr/share/crypto++ debian/libcrypto++.pc.in0000644000000000000000000000036211542020364012252 0ustar prefix=@prefix@ exec_prefix=@exec_prefix@ libdir=@libdir@ includedir=@includedir@ Name: libcrypto++ Description: General purpose cryptographic shared library URL: http://www.cryptopp.com Version: @VERSION@ Requires: Libs: -lcrypto++ Cflags: debian/libcrypto++9.install0000644000000000000000000000001711542020364012777 0ustar usr/lib/*.so.* debian/libcrypto++9.links0000644000000000000000000000006411542020364012453 0ustar /usr/lib/libcrypto++.so.9 /usr/lib/libcryptopp.so.9 debian/patches/0000755000000000000000000000000011742340167010622 5ustar debian/patches/cryptest-data-files-location.diff0000644000000000000000000006362511542020364017152 0ustar ## cryptest-data-files-location.diff by Jens Peter Secher ## ## Prefix data file names by PACKAGE_DATA_DIR which is set during build. Index: libcrypto++/bench2.cpp =================================================================== --- libcrypto++.orig/bench2.cpp 2010-08-11 17:25:57.000000000 +0200 +++ libcrypto++/bench2.cpp 2010-08-11 17:26:03.000000000 +0200 @@ -237,44 +237,44 @@ cout << "OperationMilliseconds/Operation" << (g_hertz ? "Megacycles/Operation" : "") << endl; cout << "\n"; - BenchMarkCrypto > >("TestData/rsa1024.dat", "RSA 1024", t); - BenchMarkCrypto > >("TestData/luc1024.dat", "LUC 1024", t); - BenchMarkCrypto >("TestData/dlie1024.dat", "DLIES 1024", t); - BenchMarkCrypto >("TestData/lucc512.dat", "LUCELG 512", t); + BenchMarkCrypto > >(PACKAGE_DATA_DIR "TestData/rsa1024.dat", "RSA 1024", t); + BenchMarkCrypto > >(PACKAGE_DATA_DIR "TestData/luc1024.dat", "LUC 1024", t); + BenchMarkCrypto >(PACKAGE_DATA_DIR "TestData/dlie1024.dat", "DLIES 1024", t); + BenchMarkCrypto >(PACKAGE_DATA_DIR "TestData/lucc512.dat", "LUCELG 512", t); cout << "\n"; - BenchMarkCrypto > >("TestData/rsa2048.dat", "RSA 2048", t); - BenchMarkCrypto > >("TestData/luc2048.dat", "LUC 2048", t); - BenchMarkCrypto >("TestData/dlie2048.dat", "DLIES 2048", t); - BenchMarkCrypto >("TestData/lucc1024.dat", "LUCELG 1024", t); + BenchMarkCrypto > >(PACKAGE_DATA_DIR "TestData/rsa2048.dat", "RSA 2048", t); + BenchMarkCrypto > >(PACKAGE_DATA_DIR "TestData/luc2048.dat", "LUC 2048", t); + BenchMarkCrypto >(PACKAGE_DATA_DIR "TestData/dlie2048.dat", "DLIES 2048", t); + BenchMarkCrypto >(PACKAGE_DATA_DIR "TestData/lucc1024.dat", "LUCELG 1024", t); cout << "\n"; - BenchMarkSignature >("TestData/rsa1024.dat", "RSA 1024", t); - BenchMarkSignature >("TestData/rw1024.dat", "RW 1024", t); - BenchMarkSignature >("TestData/luc1024.dat", "LUC 1024", t); - BenchMarkSignature >("TestData/nr1024.dat", "NR 1024", t); - BenchMarkSignature("TestData/dsa1024.dat", "DSA 1024", t); - BenchMarkSignature >("TestData/lucs512.dat", "LUC-HMP 512", t); - BenchMarkSignature >("TestData/esig1023.dat", "ESIGN 1023", t); - BenchMarkSignature >("TestData/esig1536.dat", "ESIGN 1536", t); + BenchMarkSignature >(PACKAGE_DATA_DIR "TestData/rsa1024.dat", "RSA 1024", t); + BenchMarkSignature >(PACKAGE_DATA_DIR "TestData/rw1024.dat", "RW 1024", t); + BenchMarkSignature >(PACKAGE_DATA_DIR "TestData/luc1024.dat", "LUC 1024", t); + BenchMarkSignature >(PACKAGE_DATA_DIR "TestData/nr1024.dat", "NR 1024", t); + BenchMarkSignature(PACKAGE_DATA_DIR "TestData/dsa1024.dat", "DSA 1024", t); + BenchMarkSignature >(PACKAGE_DATA_DIR "TestData/lucs512.dat", "LUC-HMP 512", t); + BenchMarkSignature >(PACKAGE_DATA_DIR "TestData/esig1023.dat", "ESIGN 1023", t); + BenchMarkSignature >(PACKAGE_DATA_DIR "TestData/esig1536.dat", "ESIGN 1536", t); cout << "\n"; - BenchMarkSignature >("TestData/rsa2048.dat", "RSA 2048", t); - BenchMarkSignature >("TestData/rw2048.dat", "RW 2048", t); - BenchMarkSignature >("TestData/luc2048.dat", "LUC 2048", t); - BenchMarkSignature >("TestData/nr2048.dat", "NR 2048", t); - BenchMarkSignature >("TestData/lucs1024.dat", "LUC-HMP 1024", t); - BenchMarkSignature >("TestData/esig2046.dat", "ESIGN 2046", t); + BenchMarkSignature >(PACKAGE_DATA_DIR "TestData/rsa2048.dat", "RSA 2048", t); + BenchMarkSignature >(PACKAGE_DATA_DIR "TestData/rw2048.dat", "RW 2048", t); + BenchMarkSignature >(PACKAGE_DATA_DIR "TestData/luc2048.dat", "LUC 2048", t); + BenchMarkSignature >(PACKAGE_DATA_DIR "TestData/nr2048.dat", "NR 2048", t); + BenchMarkSignature >(PACKAGE_DATA_DIR "TestData/lucs1024.dat", "LUC-HMP 1024", t); + BenchMarkSignature >(PACKAGE_DATA_DIR "TestData/esig2046.dat", "ESIGN 2046", t); cout << "\n"; - BenchMarkKeyAgreement("TestData/xtrdh171.dat", "XTR-DH 171", t); - BenchMarkKeyAgreement("TestData/xtrdh342.dat", "XTR-DH 342", t); - BenchMarkKeyAgreement("TestData/dh1024.dat", "DH 1024", t); - BenchMarkKeyAgreement("TestData/dh2048.dat", "DH 2048", t); - BenchMarkKeyAgreement("TestData/lucd512.dat", "LUCDIF 512", t); - BenchMarkKeyAgreement("TestData/lucd1024.dat", "LUCDIF 1024", t); - BenchMarkKeyAgreement("TestData/mqv1024.dat", "MQV 1024", t); - BenchMarkKeyAgreement("TestData/mqv2048.dat", "MQV 2048", t); + BenchMarkKeyAgreement(PACKAGE_DATA_DIR "TestData/xtrdh171.dat", "XTR-DH 171", t); + BenchMarkKeyAgreement(PACKAGE_DATA_DIR "TestData/xtrdh342.dat", "XTR-DH 342", t); + BenchMarkKeyAgreement(PACKAGE_DATA_DIR "TestData/dh1024.dat", "DH 1024", t); + BenchMarkKeyAgreement(PACKAGE_DATA_DIR "TestData/dh2048.dat", "DH 2048", t); + BenchMarkKeyAgreement(PACKAGE_DATA_DIR "TestData/lucd512.dat", "LUCDIF 512", t); + BenchMarkKeyAgreement(PACKAGE_DATA_DIR "TestData/lucd1024.dat", "LUCDIF 1024", t); + BenchMarkKeyAgreement(PACKAGE_DATA_DIR "TestData/mqv1024.dat", "MQV 1024", t); + BenchMarkKeyAgreement(PACKAGE_DATA_DIR "TestData/mqv2048.dat", "MQV 2048", t); #endif cout << "\n"; { Index: libcrypto++/test.cpp =================================================================== --- libcrypto++.orig/test.cpp 2010-08-11 17:25:57.000000000 +0200 +++ libcrypto++/test.cpp 2010-08-11 17:26:20.000000000 +0200 @@ -251,7 +251,7 @@ { std::string fname = argv[2]; if (fname.find(".txt") == std::string::npos) - fname = "TestVectors/" + fname + ".txt"; + fname = PACKAGE_DATA_DIR "TestVectors/" + fname + ".txt"; return !RunTestDataFile(fname.c_str()); } else if (command == "t") @@ -337,7 +337,7 @@ AES_CTR_Encrypt(argv[2], argv[3], argv[4], argv[5]); else if (command == "h") { - FileSource usage("TestData/usage.dat", true, new FileSink(cout)); + FileSource usage(PACKAGE_DATA_DIR "TestData/usage.dat", true, new FileSink(cout)); return 1; } else if (command == "V") Index: libcrypto++/validat1.cpp =================================================================== --- libcrypto++.orig/validat1.cpp 2010-08-11 17:25:57.000000000 +0200 +++ libcrypto++/validat1.cpp 2010-08-11 17:26:03.000000000 +0200 @@ -93,8 +93,8 @@ pass=ValidateCCM() && pass; pass=ValidateGCM() && pass; pass=ValidateCMAC() && pass; - pass=RunTestDataFile("TestVectors/eax.txt") && pass; - pass=RunTestDataFile("TestVectors/seed.txt") && pass; + pass=RunTestDataFile(PACKAGE_DATA_DIR "TestVectors/eax.txt") && pass; + pass=RunTestDataFile(PACKAGE_DATA_DIR "TestVectors/seed.txt") && pass; pass=ValidateBBS() && pass; pass=ValidateDH() && pass; @@ -511,12 +511,12 @@ { cout << "\nDES validation suite running...\n\n"; - FileSource valdata("TestData/descert.dat", true, new HexDecoder); + FileSource valdata(PACKAGE_DATA_DIR "TestData/descert.dat", true, new HexDecoder); bool pass = BlockTransformationTest(FixedRoundsCipherFactory(), valdata); cout << "\nTesting EDE2, EDE3, and XEX3 variants...\n\n"; - FileSource valdata1("TestData/3desval.dat", true, new HexDecoder); + FileSource valdata1(PACKAGE_DATA_DIR "TestData/3desval.dat", true, new HexDecoder); pass = BlockTransformationTest(FixedRoundsCipherFactory(), valdata1, 1) && pass; pass = BlockTransformationTest(FixedRoundsCipherFactory(), valdata1, 1) && pass; pass = BlockTransformationTest(FixedRoundsCipherFactory(), valdata1, 1) && pass; @@ -858,7 +858,7 @@ { cout << "\nIDEA validation suite running...\n\n"; - FileSource valdata("TestData/ideaval.dat", true, new HexDecoder); + FileSource valdata(PACKAGE_DATA_DIR "TestData/ideaval.dat", true, new HexDecoder); return BlockTransformationTest(FixedRoundsCipherFactory(), valdata); } @@ -866,7 +866,7 @@ { cout << "\nSAFER validation suite running...\n\n"; - FileSource valdata("TestData/saferval.dat", true, new HexDecoder); + FileSource valdata(PACKAGE_DATA_DIR "TestData/saferval.dat", true, new HexDecoder); bool pass = true; pass = BlockTransformationTest(VariableRoundsCipherFactory(8,6), valdata, 4) && pass; pass = BlockTransformationTest(VariableRoundsCipherFactory(16,12), valdata, 4) && pass; @@ -879,7 +879,7 @@ { cout << "\nRC2 validation suite running...\n\n"; - FileSource valdata("TestData/rc2val.dat", true, new HexDecoder); + FileSource valdata(PACKAGE_DATA_DIR "TestData/rc2val.dat", true, new HexDecoder); HexEncoder output(new FileSink(cout)); SecByteBlock plain(RC2Encryption::BLOCKSIZE), cipher(RC2Encryption::BLOCKSIZE), out(RC2Encryption::BLOCKSIZE), outplain(RC2Encryption::BLOCKSIZE); SecByteBlock key(128); @@ -1089,7 +1089,7 @@ { cout << "\nRC5 validation suite running...\n\n"; - FileSource valdata("TestData/rc5val.dat", true, new HexDecoder); + FileSource valdata(PACKAGE_DATA_DIR "TestData/rc5val.dat", true, new HexDecoder); return BlockTransformationTest(VariableRoundsCipherFactory(16, 12), valdata); } @@ -1097,7 +1097,7 @@ { cout << "\nRC6 validation suite running...\n\n"; - FileSource valdata("TestData/rc6val.dat", true, new HexDecoder); + FileSource valdata(PACKAGE_DATA_DIR "TestData/rc6val.dat", true, new HexDecoder); bool pass = true; pass = BlockTransformationTest(FixedRoundsCipherFactory(16), valdata, 2) && pass; pass = BlockTransformationTest(FixedRoundsCipherFactory(24), valdata, 2) && pass; @@ -1109,7 +1109,7 @@ { cout << "\nMARS validation suite running...\n\n"; - FileSource valdata("TestData/marsval.dat", true, new HexDecoder); + FileSource valdata(PACKAGE_DATA_DIR "TestData/marsval.dat", true, new HexDecoder); bool pass = true; pass = BlockTransformationTest(FixedRoundsCipherFactory(16), valdata, 4) && pass; pass = BlockTransformationTest(FixedRoundsCipherFactory(24), valdata, 3) && pass; @@ -1121,12 +1121,12 @@ { cout << "\nRijndael (AES) validation suite running...\n\n"; - FileSource valdata("TestData/rijndael.dat", true, new HexDecoder); + FileSource valdata(PACKAGE_DATA_DIR "TestData/rijndael.dat", true, new HexDecoder); bool pass = true; pass = BlockTransformationTest(FixedRoundsCipherFactory(16), valdata, 4) && pass; pass = BlockTransformationTest(FixedRoundsCipherFactory(24), valdata, 3) && pass; pass = BlockTransformationTest(FixedRoundsCipherFactory(32), valdata, 2) && pass; - pass = RunTestDataFile("TestVectors/aes.txt") && pass; + pass = RunTestDataFile(PACKAGE_DATA_DIR "TestVectors/aes.txt") && pass; return pass; } @@ -1134,7 +1134,7 @@ { cout << "\nTwofish validation suite running...\n\n"; - FileSource valdata("TestData/twofishv.dat", true, new HexDecoder); + FileSource valdata(PACKAGE_DATA_DIR "TestData/twofishv.dat", true, new HexDecoder); bool pass = true; pass = BlockTransformationTest(FixedRoundsCipherFactory(16), valdata, 4) && pass; pass = BlockTransformationTest(FixedRoundsCipherFactory(24), valdata, 3) && pass; @@ -1146,7 +1146,7 @@ { cout << "\nSerpent validation suite running...\n\n"; - FileSource valdata("TestData/serpentv.dat", true, new HexDecoder); + FileSource valdata(PACKAGE_DATA_DIR "TestData/serpentv.dat", true, new HexDecoder); bool pass = true; pass = BlockTransformationTest(FixedRoundsCipherFactory(16), valdata, 4) && pass; pass = BlockTransformationTest(FixedRoundsCipherFactory(24), valdata, 3) && pass; @@ -1192,7 +1192,7 @@ { cout << "\n3-WAY validation suite running...\n\n"; - FileSource valdata("TestData/3wayval.dat", true, new HexDecoder); + FileSource valdata(PACKAGE_DATA_DIR "TestData/3wayval.dat", true, new HexDecoder); return BlockTransformationTest(FixedRoundsCipherFactory(), valdata); } @@ -1200,7 +1200,7 @@ { cout << "\nGOST validation suite running...\n\n"; - FileSource valdata("TestData/gostval.dat", true, new HexDecoder); + FileSource valdata(PACKAGE_DATA_DIR "TestData/gostval.dat", true, new HexDecoder); return BlockTransformationTest(FixedRoundsCipherFactory(), valdata); } @@ -1208,7 +1208,7 @@ { cout << "\nSHARK validation suite running...\n\n"; - FileSource valdata("TestData/sharkval.dat", true, new HexDecoder); + FileSource valdata(PACKAGE_DATA_DIR "TestData/sharkval.dat", true, new HexDecoder); return BlockTransformationTest(FixedRoundsCipherFactory(), valdata); } @@ -1218,14 +1218,14 @@ cout << "\nCAST-128 validation suite running...\n\n"; - FileSource val128("TestData/cast128v.dat", true, new HexDecoder); + FileSource val128(PACKAGE_DATA_DIR "TestData/cast128v.dat", true, new HexDecoder); pass = BlockTransformationTest(FixedRoundsCipherFactory(16), val128, 1) && pass; pass = BlockTransformationTest(FixedRoundsCipherFactory(10), val128, 1) && pass; pass = BlockTransformationTest(FixedRoundsCipherFactory(5), val128, 1) && pass; cout << "\nCAST-256 validation suite running...\n\n"; - FileSource val256("TestData/cast256v.dat", true, new HexDecoder); + FileSource val256(PACKAGE_DATA_DIR "TestData/cast256v.dat", true, new HexDecoder); pass = BlockTransformationTest(FixedRoundsCipherFactory(16), val256, 1) && pass; pass = BlockTransformationTest(FixedRoundsCipherFactory(24), val256, 1) && pass; pass = BlockTransformationTest(FixedRoundsCipherFactory(32), val256, 1) && pass; @@ -1237,7 +1237,7 @@ { cout << "\nSquare validation suite running...\n\n"; - FileSource valdata("TestData/squareva.dat", true, new HexDecoder); + FileSource valdata(PACKAGE_DATA_DIR "TestData/squareva.dat", true, new HexDecoder); return BlockTransformationTest(FixedRoundsCipherFactory(), valdata); } @@ -1245,7 +1245,7 @@ { cout << "\nSKIPJACK validation suite running...\n\n"; - FileSource valdata("TestData/skipjack.dat", true, new HexDecoder); + FileSource valdata(PACKAGE_DATA_DIR "TestData/skipjack.dat", true, new HexDecoder); return BlockTransformationTest(FixedRoundsCipherFactory(), valdata); } @@ -1349,7 +1349,7 @@ cout << "\nSHACAL-2 validation suite running...\n\n"; bool pass = true; - FileSource valdata("TestData/shacal2v.dat", true, new HexDecoder); + FileSource valdata(PACKAGE_DATA_DIR "TestData/shacal2v.dat", true, new HexDecoder); pass = BlockTransformationTest(FixedRoundsCipherFactory(16), valdata, 4) && pass; pass = BlockTransformationTest(FixedRoundsCipherFactory(64), valdata, 10) && pass; return pass; @@ -1360,7 +1360,7 @@ cout << "\nCamellia validation suite running...\n\n"; bool pass = true; - FileSource valdata("TestData/camellia.dat", true, new HexDecoder); + FileSource valdata(PACKAGE_DATA_DIR "TestData/camellia.dat", true, new HexDecoder); pass = BlockTransformationTest(FixedRoundsCipherFactory(16), valdata, 15) && pass; pass = BlockTransformationTest(FixedRoundsCipherFactory(24), valdata, 15) && pass; pass = BlockTransformationTest(FixedRoundsCipherFactory(32), valdata, 15) && pass; @@ -1371,38 +1371,38 @@ { cout << "\nSalsa validation suite running...\n"; - return RunTestDataFile("TestVectors/salsa.txt"); + return RunTestDataFile(PACKAGE_DATA_DIR "TestVectors/salsa.txt"); } bool ValidateSosemanuk() { cout << "\nSosemanuk validation suite running...\n"; - return RunTestDataFile("TestVectors/sosemanuk.txt"); + return RunTestDataFile(PACKAGE_DATA_DIR "TestVectors/sosemanuk.txt"); } bool ValidateVMAC() { cout << "\nVMAC validation suite running...\n"; - return RunTestDataFile("TestVectors/vmac.txt"); + return RunTestDataFile(PACKAGE_DATA_DIR "TestVectors/vmac.txt"); } bool ValidateCCM() { cout << "\nAES/CCM validation suite running...\n"; - return RunTestDataFile("TestVectors/ccm.txt"); + return RunTestDataFile(PACKAGE_DATA_DIR "TestVectors/ccm.txt"); } bool ValidateGCM() { cout << "\nAES/GCM validation suite running...\n"; cout << "\n2K tables:"; - bool pass = RunTestDataFile("TestVectors/gcm.txt", MakeParameters(Name::TableSize(), (int)2048)); + bool pass = RunTestDataFile(PACKAGE_DATA_DIR "TestVectors/gcm.txt", MakeParameters(Name::TableSize(), (int)2048)); cout << "\n64K tables:"; - return RunTestDataFile("TestVectors/gcm.txt", MakeParameters(Name::TableSize(), (int)64*1024)) && pass; + return RunTestDataFile(PACKAGE_DATA_DIR "TestVectors/gcm.txt", MakeParameters(Name::TableSize(), (int)64*1024)) && pass; } bool ValidateCMAC() { cout << "\nCMAC validation suite running...\n"; - return RunTestDataFile("TestVectors/cmac.txt"); + return RunTestDataFile(PACKAGE_DATA_DIR "TestVectors/cmac.txt"); } Index: libcrypto++/validat2.cpp =================================================================== --- libcrypto++.orig/validat2.cpp 2010-08-11 17:25:57.000000000 +0200 +++ libcrypto++/validat2.cpp 2010-08-11 17:26:03.000000000 +0200 @@ -268,7 +268,7 @@ "\x69\x94\xac\x04\xf3\x41\xb5\x7d\x05\x20\x2d\x42\x8f\xb2\xa2\x7b" "\x5c\x77\xdf\xd9\xb1\x5b\xfc\x3d\x55\x93\x53\x50\x34\x10\xc1\xe1"; - FileSource keys("TestData/rsa512a.dat", true, new HexDecoder); + FileSource keys(PACKAGE_DATA_DIR "TestData/rsa512a.dat", true, new HexDecoder); Weak::RSASSA_PKCS1v15_MD2_Signer rsaPriv(keys); Weak::RSASSA_PKCS1v15_MD2_Verifier rsaPub(rsaPriv); @@ -293,7 +293,7 @@ cout << "invalid signature verification\n"; } { - FileSource keys("TestData/rsa1024.dat", true, new HexDecoder); + FileSource keys(PACKAGE_DATA_DIR "TestData/rsa1024.dat", true, new HexDecoder); RSAES_PKCS1v15_Decryptor rsaPriv(keys); RSAES_PKCS1v15_Encryptor rsaPub(rsaPriv); @@ -320,8 +320,8 @@ bq.Put(oaepSeed, 20); FixedRNG rng(bq); - FileSource privFile("TestData/rsa400pv.dat", true, new HexDecoder); - FileSource pubFile("TestData/rsa400pb.dat", true, new HexDecoder); + FileSource privFile(PACKAGE_DATA_DIR "TestData/rsa400pv.dat", true, new HexDecoder); + FileSource pubFile(PACKAGE_DATA_DIR "TestData/rsa400pb.dat", true, new HexDecoder); RSAES_OAEP_SHA_Decryptor rsaPriv; rsaPriv.AccessKey().BERDecodePrivateKey(privFile, false, 0); RSAES_OAEP_SHA_Encryptor rsaPub(pubFile); @@ -344,7 +344,7 @@ { cout << "\nDH validation suite running...\n\n"; - FileSource f("TestData/dh1024.dat", true, new HexDecoder()); + FileSource f(PACKAGE_DATA_DIR "TestData/dh1024.dat", true, new HexDecoder()); DH dh(f); return SimpleKeyAgreementValidate(dh); } @@ -353,7 +353,7 @@ { cout << "\nMQV validation suite running...\n\n"; - FileSource f("TestData/mqv1024.dat", true, new HexDecoder()); + FileSource f(PACKAGE_DATA_DIR "TestData/mqv1024.dat", true, new HexDecoder()); MQV mqv(f); return AuthenticatedKeyAgreementValidate(mqv); } @@ -362,7 +362,7 @@ { cout << "\nLUC-DH validation suite running...\n\n"; - FileSource f("TestData/lucd512.dat", true, new HexDecoder()); + FileSource f(PACKAGE_DATA_DIR "TestData/lucd512.dat", true, new HexDecoder()); LUC_DH dh(f); return SimpleKeyAgreementValidate(dh); } @@ -371,7 +371,7 @@ { cout << "\nXTR-DH validation suite running...\n\n"; - FileSource f("TestData/xtrdh171.dat", true, new HexDecoder()); + FileSource f(PACKAGE_DATA_DIR "TestData/xtrdh171.dat", true, new HexDecoder()); XTR_DH dh(f); return SimpleKeyAgreementValidate(dh); } @@ -381,7 +381,7 @@ cout << "\nElGamal validation suite running...\n\n"; bool pass = true; { - FileSource fc("TestData/elgc1024.dat", true, new HexDecoder); + FileSource fc(PACKAGE_DATA_DIR "TestData/elgc1024.dat", true, new HexDecoder); ElGamalDecryptor privC(fc); ElGamalEncryptor pubC(privC); privC.AccessKey().Precompute(); @@ -399,7 +399,7 @@ cout << "\nDLIES validation suite running...\n\n"; bool pass = true; { - FileSource fc("TestData/dlie1024.dat", true, new HexDecoder); + FileSource fc(PACKAGE_DATA_DIR "TestData/dlie1024.dat", true, new HexDecoder); DLIES<>::Decryptor privC(fc); DLIES<>::Encryptor pubC(privC); pass = CryptoSystemValidate(privC, pubC) && pass; @@ -422,7 +422,7 @@ cout << "\nNR validation suite running...\n\n"; bool pass = true; { - FileSource f("TestData/nr2048.dat", true, new HexDecoder); + FileSource f(PACKAGE_DATA_DIR "TestData/nr2048.dat", true, new HexDecoder); NR::Signer privS(f); privS.AccessKey().Precompute(); NR::Verifier pubS(privS); @@ -445,7 +445,7 @@ bool pass = true, fail; { - FileSource fs("TestData/dsa512.dat", true, new HexDecoder()); + FileSource fs(PACKAGE_DATA_DIR "TestData/dsa512.dat", true, new HexDecoder()); GDSA::Signer priv(fs); priv.AccessKey().Precompute(16); GDSA::Verifier pub(priv); @@ -487,10 +487,10 @@ fail = pub.VerifyMessage((byte *)"xyz", 3, sig, sizeof(sig)); pass = pass && !fail; } - FileSource fs1("TestData/dsa1024.dat", true, new HexDecoder()); + FileSource fs1(PACKAGE_DATA_DIR "TestData/dsa1024.dat", true, new HexDecoder()); DSA::Signer priv(fs1); DSA::Verifier pub(priv); - FileSource fs2("TestData/dsa1024b.dat", true, new HexDecoder()); + FileSource fs2(PACKAGE_DATA_DIR "TestData/dsa1024b.dat", true, new HexDecoder()); DSA::Verifier pub1(fs2); assert(pub.GetKey() == pub1.GetKey()); pass = SignatureValidate(priv, pub, thorough) && pass; @@ -503,7 +503,7 @@ bool pass=true; { - FileSource f("TestData/luc1024.dat", true, new HexDecoder); + FileSource f(PACKAGE_DATA_DIR "TestData/luc1024.dat", true, new HexDecoder); LUCSSA_PKCS1v15_SHA_Signer priv(f); LUCSSA_PKCS1v15_SHA_Verifier pub(priv); pass = SignatureValidate(priv, pub) && pass; @@ -520,14 +520,14 @@ { cout << "\nLUC-HMP validation suite running...\n\n"; - FileSource f("TestData/lucs512.dat", true, new HexDecoder); + FileSource f(PACKAGE_DATA_DIR "TestData/lucs512.dat", true, new HexDecoder); LUC_HMP::Signer privS(f); LUC_HMP::Verifier pubS(privS); bool pass = SignatureValidate(privS, pubS); cout << "\nLUC-IES validation suite running...\n\n"; - FileSource fc("TestData/lucc512.dat", true, new HexDecoder); + FileSource fc(PACKAGE_DATA_DIR "TestData/lucc512.dat", true, new HexDecoder); LUC_IES<>::Decryptor privC(fc); LUC_IES<>::Encryptor pubC(privC); pass = CryptoSystemValidate(privC, pubC) && pass; @@ -541,7 +541,7 @@ bool pass=true; { - FileSource f("TestData/rabi1024.dat", true, new HexDecoder); + FileSource f(PACKAGE_DATA_DIR "TestData/rabi1024.dat", true, new HexDecoder); RabinSS::Signer priv(f); RabinSS::Verifier pub(priv); pass = SignatureValidate(priv, pub) && pass; @@ -558,7 +558,7 @@ { cout << "\nRW validation suite running...\n\n"; - FileSource f("TestData/rw1024.dat", true, new HexDecoder); + FileSource f(PACKAGE_DATA_DIR "TestData/rw1024.dat", true, new HexDecoder); RWSS::Signer priv(f); RWSS::Verifier pub(priv); @@ -570,7 +570,7 @@ { cout << "\nBlumGoldwasser validation suite running...\n\n"; - FileSource f("TestData/blum512.dat", true, new HexDecoder); + FileSource f(PACKAGE_DATA_DIR "TestData/blum512.dat", true, new HexDecoder); BlumGoldwasserPrivateKey priv(f); BlumGoldwasserPublicKey pub(priv); @@ -740,7 +740,7 @@ "\x74\x02\x37\x0E\xED\x0A\x06\xAD\xF4\x15\x65\xB8\xE1\xD1\x45\xAE\x39\x19\xB4\xFF\x5D\xF1\x45\x7B\xE0\xFE\x72\xED\x11\x92\x8F\x61\x41\x4F\x02\x00\xF2\x76\x6F\x7C" "\x79\xA2\xE5\x52\x20\x5D\x97\x5E\xFE\x39\xAE\x21\x10\xFB\x35\xF4\x80\x81\x41\x13\xDD\xE8\x5F\xCA\x1E\x4F\xF8\x9B\xB2\x68\xFB\x28"; - FileSource keys("TestData/esig1536.dat", true, new HexDecoder); + FileSource keys(PACKAGE_DATA_DIR "TestData/esig1536.dat", true, new HexDecoder); ESIGN::Signer signer(keys); ESIGN::Verifier verifier(signer); Index: libcrypto++/validat3.cpp =================================================================== --- libcrypto++.orig/validat3.cpp 2010-08-11 17:25:57.000000000 +0200 +++ libcrypto++/validat3.cpp 2010-08-11 17:26:20.000000000 +0200 @@ -168,13 +168,13 @@ bool ValidateSHA() { cout << "\nSHA validation suite running...\n\n"; - return RunTestDataFile("TestVectors/sha.txt"); + return RunTestDataFile(PACKAGE_DATA_DIR "TestVectors/sha.txt"); } bool ValidateSHA2() { cout << "\nSHA validation suite running...\n\n"; - return RunTestDataFile("TestVectors/sha.txt"); + return RunTestDataFile(PACKAGE_DATA_DIR "TestVectors/sha.txt"); } bool ValidateTiger() @@ -321,12 +321,12 @@ bool ValidatePanama() { - return RunTestDataFile("TestVectors/panama.txt"); + return RunTestDataFile(PACKAGE_DATA_DIR "TestVectors/panama.txt"); } bool ValidateWhirlpool() { - return RunTestDataFile("TestVectors/whrlpool.txt"); + return RunTestDataFile(PACKAGE_DATA_DIR "TestVectors/whrlpool.txt"); } #ifdef CRYPTOPP_REMOVED @@ -393,7 +393,7 @@ bool ValidateHMAC() { - return RunTestDataFile("TestVectors/hmac.txt"); + return RunTestDataFile(PACKAGE_DATA_DIR "TestVectors/hmac.txt"); } #ifdef CRYPTOPP_REMOVED debian/patches/debian-config.diff0000644000000000000000000000515711542020364014141 0ustar Description: Upstream changes introduced in version 5.6.0-6 This patch has been created by dpkg-source during the package build. Here's the last changelog entry, hopefully it gives details on why those changes were made: . libcrypto++ (5.6.0-6) unstable; urgency=low . * Fix sha256 assembly problem with signed address comparison, thanks to Ken Raeburn. (Closes: #585930) * Converted to dpkg-source format 3.0 (quilt). * Use mercurial-buildpackage for repository maintenance, so old repository does not exist any more. * Bumped Standards-Version to 3.8.4, no change. * Use misc:Depends debhelper macro for all packages. . The person named in the Author field signed this changelog entry. Author: Jens Peter Secher Bug-Debian: http://bugs.debian.org/585930 --- The information above should follow the Patch Tagging Guidelines, please checkout http://dep.debian.net/deps/dep3/ to learn about the format. Here are templates for supplementary fields that you might want to add: Origin: , Bug: Bug-Debian: http://bugs.debian.org/ Bug-Ubuntu: https://launchpad.net/bugs/ Forwarded: Reviewed-By: Last-Update: Index: libcrypto++/config.h =================================================================== --- libcrypto++.orig/config.h 2010-08-09 20:42:43.000000000 +0200 +++ libcrypto++/config.h 2010-08-09 20:43:10.000000000 +0200 @@ -1,18 +1,16 @@ +/* config.h. Generated from config.h.in by configure. */ +// Debian note: This is a copy of the original config.h file except for the two +// endianness undefs below; they are substituted by the autoconf process +// according to the build architecture. + #ifndef CRYPTOPP_CONFIG_H #define CRYPTOPP_CONFIG_H // ***************** Important Settings ******************** -// define this if running on a big-endian CPU -#if !defined(IS_LITTLE_ENDIAN) && (defined(__BIG_ENDIAN__) || defined(__sparc) || defined(__sparc__) || defined(__hppa__) || defined(__MIPSEB__) || defined(__ARMEB__) || (defined(__MWERKS__) && !defined(__INTEL__))) -# define IS_BIG_ENDIAN -#endif - -// define this if running on a little-endian CPU -// big endian will be assumed if IS_LITTLE_ENDIAN is not defined -#ifndef IS_BIG_ENDIAN -# define IS_LITTLE_ENDIAN -#endif +// Endianness +/* #undef IS_BIG_ENDIAN */ +#define IS_LITTLE_ENDIAN /**/ // define this if you want to disable all OS-dependent features, // such as sockets and OS-provided random number generators debian/patches/doxygen-main-link.diff0000644000000000000000000000134411542020364015000 0ustar ## doxygen-main-link.diff by Jens Peter Secher ## ## Exclude links, either because they do not exists or because ## Doxygen fails to recognise them. Index: libcrypto++/cryptlib.h =================================================================== --- libcrypto++.orig/cryptlib.h 2010-08-09 20:42:43.000000000 +0200 +++ libcrypto++/cryptlib.h 2010-08-09 20:43:01.000000000 +0200 @@ -71,7 +71,6 @@

This reference manual is a work in progress. Some classes are still lacking detailed descriptions. -

Click here to download a zip archive containing this manual.

Thanks to Ryan Phillips for providing the Doxygen configuration file and getting me started with this manual. */ debian/patches/doxygen-setup.diff0000644000000000000000000000364011542020364014262 0ustar ## doxygen-setup.diff by Jens Peter Secher ## ## Doxygen cannot handle all the source code, so only index the ## include files. Index: libcrypto++/Doxyfile =================================================================== --- libcrypto++.orig/Doxyfile 2010-08-09 20:42:43.000000000 +0200 +++ libcrypto++/Doxyfile 2010-08-09 20:42:54.000000000 +0200 @@ -170,7 +170,7 @@ # The TAB_SIZE tag can be used to set the number of spaces in a tab. # Doxygen uses this value to replace tabs by spaces in code fragments. -TAB_SIZE = 8 +TAB_SIZE = 4 # This tag can be used to specify a number of aliases that acts # as commands in the documentation. An alias has the form "name=value". @@ -598,8 +598,7 @@ # *.c *.cc *.cxx *.cpp *.c++ *.java *.ii *.ixx *.ipp *.i++ *.inl *.h *.hh *.hxx # *.hpp *.h++ *.idl *.odl *.cs *.php *.php3 *.inc *.m *.mm *.py *.f90 -FILE_PATTERNS = *.h \ - *.cpp +FILE_PATTERNS = *.h # The RECURSIVE tag can be used to turn specify whether or not subdirectories # should be searched for input files as well. Possible values are YES and NO. @@ -611,7 +610,7 @@ # excluded from the INPUT source files. This way you can easily exclude a # subdirectory from a directory tree whose root is specified with the INPUT tag. -EXCLUDE = adhoc.cpp +EXCLUDE = winpipes.h validate.h bench.h # The EXCLUDE_SYMLINKS tag can be used select whether or not files or # directories that are symbolic links (a Unix filesystem feature) are excluded @@ -759,7 +758,7 @@ # the COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns # in which this list will be split (can be a number in the range [1..20]) -COLS_IN_ALPHA_INDEX = 3 +COLS_IN_ALPHA_INDEX = 2 # In case all classes in a project start with a common prefix, all # classes will be put under the same header in the alphabetical index. debian/patches/gcc-4.7-ftbfs.diff0000644000000000000000000001123611742337563013631 0ustar Description: TODO: Put a short summary on the line above and replace this paragraph with a longer explanation of this change. Complete the meta-information with other relevant fields (see below for details). To make it easier, the information below has been extracted from the changelog. Adjust it or drop it. . libcrypto++ (5.6.1-5.1) unstable; urgency=low . * Fix build failure with gcc-4.7. Closes: #668700. Author: Matthias Klose Bug-Debian: http://bugs.debian.org/668700 --- The information above should follow the Patch Tagging Guidelines, please checkout http://dep.debian.net/deps/dep3/ to learn about the format. Here are templates for supplementary fields that you might want to add: Origin: , Bug: Bug-Debian: http://bugs.debian.org/ Bug-Ubuntu: https://launchpad.net/bugs/ Forwarded: Reviewed-By: Last-Update: --- libcrypto++-5.6.1.orig/algebra.cpp +++ libcrypto++-5.6.1/algebra.cpp @@ -58,7 +58,7 @@ template const T& AbstractEucl Element g[3]={b, a}; unsigned int i0=0, i1=1, i2=2; - while (!Equal(g[i1], this->Identity())) + while (!this->Equal(g[i1], this->Identity())) { g[i2] = Mod(g[i0], g[i1]); unsigned int t = i0; i0 = i1; i1 = i2; i2 = t; --- libcrypto++-5.6.1.orig/panama.cpp +++ libcrypto++-5.6.1/panama.cpp @@ -421,7 +421,7 @@ void PanamaHash::TruncatedFinal(byte { this->ThrowIfInvalidTruncatedSize(size); - PadLastBlock(this->BLOCKSIZE, 0x01); + this->PadLastBlock(this->BLOCKSIZE, 0x01); HashEndianCorrectedBlock(this->m_data); --- libcrypto++-5.6.1.orig/eccrypto.cpp +++ libcrypto++-5.6.1/eccrypto.cpp @@ -435,7 +435,7 @@ template void DL_GroupParamet StringSource ssG(param.g, true, new HexDecoder); Element G; bool result = GetCurve().DecodePoint(G, ssG, (size_t)ssG.MaxRetrievable()); - SetSubgroupGenerator(G); + this->SetSubgroupGenerator(G); assert(result); StringSource ssN(param.n, true, new HexDecoder); @@ -591,7 +591,7 @@ bool DL_GroupParameters_EC::Validate if (level >= 2 && pass) { const Integer &q = GetSubgroupOrder(); - Element gq = gpc ? gpc->Exponentiate(this->GetGroupPrecomputation(), q) : ExponentiateElement(g, q); + Element gq = gpc ? gpc->Exponentiate(this->GetGroupPrecomputation(), q) : this->ExponentiateElement(g, q); pass = pass && IsIdentity(gq); } return pass; @@ -629,7 +629,7 @@ void DL_PublicKey_EC::BERDecodePubli typename EC::Point P; if (!this->GetGroupParameters().GetCurve().DecodePoint(P, bt, size)) BERDecodeError(); - SetPublicElement(P); + this->SetPublicElement(P); } template --- libcrypto++-5.6.1.orig/secblock.h +++ libcrypto++-5.6.1/secblock.h @@ -88,7 +88,7 @@ public: pointer allocate(size_type n, const void * = NULL) { - CheckSize(n); + this->CheckSize(n); if (n == 0) return NULL; --- libcrypto++-5.6.1.orig/eccrypto.h +++ libcrypto++-5.6.1/eccrypto.h @@ -43,7 +43,7 @@ public: void Initialize(const EllipticCurve &ec, const Point &G, const Integer &n, const Integer &k = Integer::Zero()) { this->m_groupPrecomputation.SetCurve(ec); - SetSubgroupGenerator(G); + this->SetSubgroupGenerator(G); m_n = n; m_k = k; } @@ -145,9 +145,9 @@ public: typedef typename EC::Point Element; void Initialize(const DL_GroupParameters_EC ¶ms, const Element &Q) - {this->AccessGroupParameters() = params; SetPublicElement(Q);} + {this->AccessGroupParameters() = params; this->SetPublicElement(Q);} void Initialize(const EC &ec, const Element &G, const Integer &n, const Element &Q) - {this->AccessGroupParameters().Initialize(ec, G, n); SetPublicElement(Q);} + {this->AccessGroupParameters().Initialize(ec, G, n); this->SetPublicElement(Q);} // X509PublicKey void BERDecodePublicKey(BufferedTransformation &bt, bool parametersPresent, size_t size); @@ -166,9 +166,9 @@ public: void Initialize(const EC &ec, const Element &G, const Integer &n, const Integer &x) {this->AccessGroupParameters().Initialize(ec, G, n); this->SetPrivateExponent(x);} void Initialize(RandomNumberGenerator &rng, const DL_GroupParameters_EC ¶ms) - {GenerateRandom(rng, params);} + {this->GenerateRandom(rng, params);} void Initialize(RandomNumberGenerator &rng, const EC &ec, const Element &G, const Integer &n) - {GenerateRandom(rng, DL_GroupParameters_EC(ec, G, n));} + {this->GenerateRandom(rng, DL_GroupParameters_EC(ec, G, n));} // PKCS8PrivateKey void BERDecodePrivateKey(BufferedTransformation &bt, bool parametersPresent, size_t size); debian/patches/panama-armel.diff0000644000000000000000000000615411555343504014015 0ustar Origin: upstream, http://sourceforge.net/apps/trac/cryptopp/changeset/526 Bug-Debian: http://bugs.debian.org/619856 Forwarded: not-needed Last-Update: 2011-04-25 Index: libcrypto++/panama.cpp =================================================================== --- libcrypto++.orig/panama.cpp 2011-03-22 05:09:24.000000000 +0100 +++ libcrypto++/panama.cpp 2011-04-25 20:57:07.000000000 +0200 @@ -313,7 +313,7 @@ #ifndef CRYPTOPP_GENERATE_X64_MASM template -void Panama::Iterate(size_t count, const word32 *p, word32 *z, const word32 *y) +void Panama::Iterate(size_t count, const word32 *p, byte *output, const byte *input, KeystreamOperation operation) { word32 bstart = m_state[17]; word32 *const aPtr = m_state; @@ -329,9 +329,6 @@ // b: 0 4 | 1 5 | 2 6 | 3 7 #define b(i, j) b##i[(j)*2%8 + (j)/4] -// output -#define OA(i) z[i] = ConditionalByteReverse(B::ToEnum(), a(i+9)) -#define OX(i) z[i] = y[i] ^ ConditionalByteReverse(B::ToEnum(), a(i+9)) // buffer update #define US(i) {word32 t=b(0,i); b(0,i)=ConditionalByteReverse(B::ToEnum(), p[i])^t; b(25,(i+6)%8)^=t;} #define UL(i) {word32 t=b(0,i); b(0,i)=a(i+1)^t; b(25,(i+6)%8)^=t;} @@ -345,18 +342,20 @@ while (count--) { - if (z) + if (output) { - if (y) - { - OX(0); OX(1); OX(2); OX(3); OX(4); OX(5); OX(6); OX(7); - y += 8; - } - else - { - OA(0); OA(1); OA(2); OA(3); OA(4); OA(5); OA(6); OA(7); - } - z += 8; +#define PANAMA_OUTPUT(x) \ + CRYPTOPP_KEYSTREAM_OUTPUT_WORD(x, B::ToEnum(), 0, a(0+9));\ + CRYPTOPP_KEYSTREAM_OUTPUT_WORD(x, B::ToEnum(), 1, a(1+9));\ + CRYPTOPP_KEYSTREAM_OUTPUT_WORD(x, B::ToEnum(), 2, a(2+9));\ + CRYPTOPP_KEYSTREAM_OUTPUT_WORD(x, B::ToEnum(), 3, a(3+9));\ + CRYPTOPP_KEYSTREAM_OUTPUT_WORD(x, B::ToEnum(), 4, a(4+9));\ + CRYPTOPP_KEYSTREAM_OUTPUT_WORD(x, B::ToEnum(), 5, a(5+9));\ + CRYPTOPP_KEYSTREAM_OUTPUT_WORD(x, B::ToEnum(), 6, a(6+9));\ + CRYPTOPP_KEYSTREAM_OUTPUT_WORD(x, B::ToEnum(), 7, a(7+9)); + + typedef word32 WordType; + CRYPTOPP_KEYSTREAM_OUTPUT_SWITCH(PANAMA_OUTPUT, 4*8); } word32 *const b16 = (word32 *)(bPtr+((bstart+16*32) & 31*32)); @@ -429,7 +428,7 @@ this->Iterate(32); // pull FixedSizeSecBlock buf; - this->Iterate(1, NULL, buf, NULL); + this->Iterate(1, NULL, buf.BytePtr(), NULL); memcpy(hash, buf, size); @@ -491,7 +490,7 @@ Panama_SSE2_Pull(iterationCount, this->m_state, (word32 *)output, (const word32 *)input); else #endif - this->Iterate(iterationCount, NULL, (word32 *)output, (const word32 *)input); + this->Iterate(iterationCount, NULL, output, input, operation); } template class Panama; Index: libcrypto++/panama.h =================================================================== --- libcrypto++.orig/panama.h 2011-03-22 05:09:24.000000000 +0100 +++ libcrypto++/panama.h 2011-04-25 20:57:07.000000000 +0200 @@ -12,7 +12,7 @@ { public: void Reset(); - void Iterate(size_t count, const word32 *p=NULL, word32 *z=NULL, const word32 *y=NULL); + void Iterate(size_t count, const word32 *p=NULL, byte *output=NULL, const byte *input=NULL, KeystreamOperation operation=WRITE_KEYSTREAM); protected: typedef word32 Stage[8]; debian/patches/salsa.patch0000644000000000000000000000340211572723743012753 0ustar Index: salsa.cpp =================================================================== --- libcrypto++/salsa.cpp (revision 520) +++ libcrypto++/salsa.cpp (working copy) @@ -122,17 +122,17 @@ if (HasSSE2()) { #if CRYPTOPP_BOOL_X64 - #define REG_output %4 - #define REG_input %1 + #define REG_output %1 + #define REG_input %0 #define REG_iterationCount %2 - #define REG_state %3 - #define REG_rounds %0 + #define REG_state %4 /* constant */ + #define REG_rounds %3 /* constant */ #define REG_roundsLeft eax #define REG_temp32 edx #define REG_temp rdx - #define SSE2_WORKSPACE %5 + #define SSE2_WORKSPACE %5 /* constant */ - FixedSizeAlignedSecBlock workspace; + CRYPTOPP_ALIGN_DATA(16) byte workspace[16*32]; #else #define REG_output edi #define REG_input eax @@ -457,12 +457,13 @@ #ifdef __GNUC__ AS_POP_IF86( bx) ".att_syntax prefix;" - : #if CRYPTOPP_BOOL_X64 - : "r" (m_rounds), "r" (input), "r" (iterationCount), "r" (m_state.data()), "r" (output), "r" (workspace.m_ptr) - : "%eax", "%edx", "memory", "cc", "%xmm0", "%xmm1", "%xmm2", "%xmm3", "%xmm4", "%xmm5", "%xmm6", "%xmm7", "%xmm8", "%xmm9", "%xmm10", "%xmm11", "%xmm12", "%xmm13", "%xmm14", "%xmm15" + : "+r" (input), "+r" (output), "+r" (iterationCount) + : "r" (m_rounds), "r" (m_state.m_ptr), "r" (workspace) + : "%eax", "%rdx", "memory", "cc", "%xmm0", "%xmm1", "%xmm2", "%xmm3", "%xmm4", "%xmm5", "%xmm6", "%xmm7", "%xmm8", "%xmm9", "%xmm10", "%xmm11", "%xmm12", "%xmm13", "%xmm14", "%xmm15" #else - : "d" (m_rounds), "a" (input), "c" (iterationCount), "S" (m_state.data()), "D" (output) + : "+a" (input), "+D" (output), "+c" (iterationCount) + : "d" (m_rounds), "S" (m_state.m_ptr) : "memory", "cc" #endif ); debian/patches/series0000644000000000000000000000025211742337775012051 0ustar strict-gcc43-include.diff doxygen-setup.diff doxygen-main-link.diff cryptest-data-files-location.diff debian-config.diff panama-armel.diff salsa.patch gcc-4.7-ftbfs.diff debian/patches/strict-gcc43-include.diff0000644000000000000000000000102511542020364015274 0ustar ## strict-gcc43-include.diff by Jens Peter Secher ## ## Explicitly include cstring to allow compilation with GCC 4.3. Index: libcrypto++/misc.h =================================================================== --- libcrypto++.orig/misc.h 2010-08-09 20:42:43.000000000 +0200 +++ libcrypto++/misc.h 2010-08-09 20:42:47.000000000 +0200 @@ -39,6 +39,7 @@ #if defined(__GNUC__) && defined(__linux__) #define CRYPTOPP_BYTESWAP_AVAILABLE #include +#include #endif NAMESPACE_BEGIN(CryptoPP) debian/rules0000755000000000000000000001060611742342151010251 0ustar #!/usr/bin/make -f # debian/rules for libcrypto++. # Written by Jens Peter Secher . site := cryptopp.svn.sourceforge.net get-orig-source: wget http://$(site)/viewvc/cryptopp/tags/CRYPTOPP_5_6_1/?view=tar \ -O libcrypto++_5.6.1.orig.tar.gz # The shared library must be the first listed in debian/control. package := $(firstword $(shell dh_listpackages)) binarypackages := $(filter-out %-doc,$(shell dh_listpackages)) # Setup ./configure arguments to fit Debian environment. export DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE) export DEB_HOST_ARCH_OS ?= $(shell dpkg-architecture -qDEB_HOST_ARCH_OS) export DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE) config_flags := \ --config-cache \ --prefix=/usr \ --sysconfdir=/etc \ --mandir=/usr/share/man \ --infodir=/usr/share/info \ --libexecdir=/usr/lib \ --build $(DEB_BUILD_GNU_TYPE) ifneq ($(DEB_BUILD_GNU_TYPE), $(DEB_HOST_GNU_TYPE)) config_flags += --host $(DEB_HOST_GNU_TYPE) endif # General compile options. cflags := -g -fno-strict-aliasing -pipe ifeq (,$(findstring noopt,$(DEB_BUILD_OPTIONS))) cflags += -DNDEBUG -O2 else cflags += -O0 endif # Architecture-specific compile options. ifeq (hppa-linux-gnu,$(DEB_BUILD_GNU_TYPE)) cflags += -ffunction-sections endif export LDFLAGS=-pthread -lpthread autotools_input := configure.ac Makefile.am config.h.in libcrypto++.pc.in autoclean: -rm -f a.out aclocal.m4 config.log config.sub config.guess \ configure cryptopp_config.h.in depcomp install-sh ltmain.sh \ Makefile.in missing libcrypto++.pc $(autotools_input) \ m4/libtool.m4 m4/ltoptions.m4 m4/ltsugar.m4 m4/ltversion.m4 \ m4/lt~obsolete.m4 clean: autoclean dh_testdir dh_testroot -rm -f $(CURDIR)/*-stamp -rm -rf $(CURDIR)/doc $(CURDIR)/.deps $(CURDIR)/.libs $(CURDIR)/*.cache -rm -f $(CURDIR)/Makefile* $(CURDIR)/stamp-* $(CURDIR)/libtool -rm -f $(CURDIR)/*.in $(CURDIR)/config.sub $(CURDIR)/config.guess $(CURDIR)/config.status -rm -f $(CURDIR)/configure.ac $(CURDIR)/cryptopp_config.h -rm -f $(CURDIR)/*.lo $(CURDIR)/*.o cryptest* *.la dh_clean # Put everything of interest in debian/tmp. destdir=$(CURDIR)/debian/tmp # Autoreconf needs the automake input to be Makefile.am, so we make # sure the upstream GNUmakefile do not shadow the resulting Makefile. config: config-stamp config-stamp: dh_testdir ln -sf /usr/share/misc/config.sub /usr/share/misc/config.guess . -rm -f config.cache GNUmakefile cp -f $(patsubst %,debian/%,$(autotools_input)) . autoreconf --force --install $(SHELL) ./configure $(config_flags) CFLAGS="$(cflags)" CXXFLAGS="$(cflags)" touch $@ # Build binaries. build-arch: build build-indep: build build: config build-stamp build-stamp: $(MAKE) touch $@ # Run the test suite. check: $(CURDIR)/cryptestcwd v # Let Doxygen generate the documentation. html: config html-stamp html-stamp: $(MAKE) html touch $@ install-stamp: build dh_testdir dh_testroot dh_prep $(MAKE) install DESTDIR=$(destdir) rm -f $(destdir)/usr/bin/cryptestcwd mkdir -p $(destdir)/usr/share/crypto-- cp -r $(CURDIR)/TestVectors $(destdir)/usr/share/crypto-- chmod -x $(destdir)/usr/share/crypto--/TestVectors/* cp -r $(CURDIR)/TestData $(destdir)/usr/share/crypto-- mkdir $(destdir)/usr/lib/pkgconfig cp -r $(CURDIR)/*.pc $(destdir)/usr/lib/pkgconfig touch $@ binary-indep: html dh_testdir dh_testroot dh_installdocs -plibcrypto++-doc -X.hhc -X.hhp -X.hhk dh_installchangelogs -plibcrypto++-doc dh_compress -plibcrypto++-doc dh_fixperms -plibcrypto++-doc dh_installdeb -plibcrypto++-doc dh_gencontrol -plibcrypto++-doc dh_md5sums -plibcrypto++-doc dh_builddeb -plibcrypto++-doc binaryargs := $(patsubst %,-p%,$(binarypackages)) binary-arch: check install-stamp dh_testdir dh_testroot dh_installdocs $(binaryargs) dh_install --list-missing --sourcedir=$(destdir) $(binaryargs) dh_link $(binaryargs) dh_installchangelogs $(binaryargs) dh_installman -plibcrypto++-utils debian/cryptest.1 dh_installexamples -plibcrypto++-dev test.cpp dh_strip --dbg-package=$(package)-dbg $(binaryargs) dh_compress $(binaryargs) dh_fixperms $(binaryargs) dh_makeshlibs $(binaryargs) dh_installdeb $(binaryargs) dh_shlibdeps -L$(package) -ldebian/$(package)/usr/lib dh_gencontrol $(binaryargs) dh_md5sums $(binaryargs) dh_builddeb $(binaryargs) binary: binary-indep binary-arch .PHONY: autoclean binary binary-indep binary-arch bootstrap build \ check clean config html get-orig-source debian/source/0000755000000000000000000000000011542020364010463 5ustar debian/source/format0000644000000000000000000000001411542020364011671 0ustar 3.0 (quilt)