File: hmac.h Moved the enums before their usage: Changed: ---------- public: HMAC(const byte *userKey, unsigned int keylength=KEYLENGTH); void Update(const byte *input, unsigned int length); void Final(byte *mac); unsigned int DigestSize() const {return DIGESTSIZE;} enum {KEYLENGTH=16, MAX_KEYLENGTH=T::DATASIZE, DIGESTSIZE=T::DIGESTSIZE, DATASIZE=T::DATASIZE}; private: ---------- to: ---------- public: enum {KEYLENGTH=16, MAX_KEYLENGTH=T::DATASIZE, DIGESTSIZE=T::DIGESTSIZE, DATASIZE=T::DATASIZE}; HMAC(const byte *userKey, unsigned int keylength=KEYLENGTH); void Update(const byte *input, unsigned int length); void Final(byte *mac); unsigned int DigestSize() const {return DIGESTSIZE;} private: ----------- File: gf2n.h Changed Reduced to Reduce line 271 and 276 File: gf2n.cpp Changed Reduced to Reduce line 631 File: eccrypto.cpp Moved the template instantiations to the end of the file: (after all their methods have been defined) ---- template class ECPublicKey; template class ECPublicKey; template class ECPrivateKey; template class ECPrivateKey; template class ECKEP; template class ECKEP; ---- File: Iterhash.cpp Moved the template instantiations to the end of the file (and added the word class) (after all their methods have been defined) ---- #ifdef WORD64_AVAILABLE template class IteratedHash; #endif template class IteratedHash; ---- File: Polynomi.h Added additional constructor (after line 63) PolynomialOver( std::vector::iterator a0, std::vector::iterator an) : m_coefficients(a0, an) {} Removed cast to (const CoefficientType &) on line 50 Changed the type of the first parameter of CalculateAlpha (line 434) from CoefficientType [] to std::vector::iterator File: Polynomi.cpp Changed the type of the both parameters to the constructor (line 461) from CoefficientType* to std::vector::iterator Changed the type of the first parameter of CalculateAlpha (line 494) from CoefficientType [] to std::vector::iterator File: bench.cpp Added "#include pubkey.cpp" (after line 55) File: config.h (included in distribution) File: strstream Commented out the entire file! --============_-1309863447==_============ Content-Id: Content-Type: text/plain; name="config.h"; charset="us-ascii" Content-Disposition: attachment; filename="config.h" ; modification-date="Mon, 3 Aug 1998 16:58:46 -0700" #ifndef CONFIG_H #define CONFIG_H // define this if running on a little-endian CPU // #define LITTLE_ENDIAN // define this if you want the library to throw exceptions when things go wrong #define THROW_EXCEPTIONS // define this if your compiler doesn't support namespaces #ifdef __GNUC__ #define NO_NAMESPACE #endif // define this if your compiler only has the old version of iostream library #ifdef __GNUC__ #define OLD_IOSTREAM #endif // switch between different secure memory allocation mechnisms, this is the only // one available right now #define SECALLOC_DEFAULT // Define this to 0 if your system doesn't differentiate between // text mode and binary mode files. // #define BINARY_MODE 0 #define BINARY_MODE ios::binary // #define BINARY_MODE ios::bin // Define this to 0 if your compiler doesn't have ios::nocreate. // This is needed because some compilers automaticly create a new file // when you try to open one for reading if it doesn't already exist. #define FILE_NO_CREATE 0 // #define FILE_NO_CREATE ios::nocreate // define this if you have a copy of RSAREF and want to compile the RSAREF // class wrappers // #define USE_RSAREF // define this if you want to be able to initialize RSAREF structures with bignums // #define USE_BIGNUM_WITH_RSAREF #define GZIP_OS_CODE 0 // how much memory to use for deflation (compression) // note 16 bit compilers don't work with BIG_MEM (pointer wraps around segment boundary) // #define SMALL_MEM #define MEDIUM_MEM // #define BIG_MEM // Define the following to use the updated standard SHA-1 instead of SHA #define NEW_SHA // 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 // Try this if you have a large cache or your CPU is slow manipulating // individual bytes. // #define DIAMOND_USE_PERMTABLE // 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 // Make sure these typedefs are correct for your computer typedef unsigned char byte; typedef unsigned short word16; #if defined(__alpha) && !defined(_MSC_VER) typedef unsigned int word32; #else typedef unsigned long word32; #endif #ifdef __MWERKS__ #define WORD64_AVAILABLE typedef unsigned long long word64; #define W64LIT(x) x##LL #endif #ifdef __GNUC__ #define WORD64_AVAILABLE typedef unsigned long long word64; #define W64LIT(x) x##LL #endif #ifdef _MSC_VER #define WORD64_AVAILABLE typedef unsigned __int64 word64; #define W64LIT(x) x##i64 #endif // word should have the same size as your CPU registers // dword should be twice as big as word #if defined(__GNUC__) && !defined(__alpha) typedef unsigned long word; typedef unsigned long long dword; #elif defined(_MSC_VER) typedef unsigned __int32 word; typedef unsigned __int64 dword; #elif defined(__MWERKS__) typedef unsigned long word; typedef unsigned long long dword; #else typedef unsigned int word; typedef unsigned long dword; #endif const unsigned int WORD_SIZE = sizeof(word); const unsigned int WORD_BITS = WORD_SIZE * 8; #define LOW_WORD(x) (word)(x) #ifdef LITTLE_ENDIAN #define HIGH_WORD(x) (*(((word *)&(x))+1)) #else #define HIGH_WORD(x) (*((word *)&(x))) #endif // if the above HIGH_WORD macro doesn't work (if you are not sure, compile it // and run the validation tests), try this: // #define HIGH_WORD(x) (word)((x)>>WORD_BITS) #ifdef _MSC_VER // 4250: dominance // 4660: explicitly instantiating a class that's already implicitly instantiated #pragma warning(disable: 4250 4660) #endif #ifdef NO_NAMESPACE #define std #define USING_NAMESPACE(x) #define NAMESPACE_BEGIN(x) #define NAMESPACE_END #define ANONYMOUS_NAMESPACE_BEGIN #else #define USING_NAMESPACE(x) using namespace x; #define NAMESPACE_BEGIN(x) namespace x { #define ANONYMOUS_NAMESPACE_BEGIN namespace { #define NAMESPACE_END } #endif #ifdef _MSC_VER // VC50 workaround #define STDMIN std::_cpp_min #define STDMAX std::_cpp_max #else #define STDMIN std::min #define STDMAX std::max #endif #endif