📄 readme.txt
字号:
Crypto++: a C++ Class Library of Cryptographic SchemesVersion 5.6.0 (3/15/2009)Crypto++ Library is a free C++ class library of cryptographic schemes.Currently the library contains the following algorithms: algorithm type name authenticated encryption schemes GCM, CCM, EAX high speed stream ciphers Panama, Sosemanuk, Salsa20, XSalsa20 AES and AES candidates AES (Rijndael), RC6, MARS, Twofish, Serpent, CAST-256 IDEA, Triple-DES (DES-EDE2 and DES-EDE3), other block ciphers Camellia, SEED, RC5, Blowfish, TEA, XTEA, Skipjack, SHACAL-2 block cipher modes of operation ECB, CBC, CBC ciphertext stealing (CTS), CFB, OFB, counter mode (CTR) message authentication codes VMAC, HMAC, CMAC, CBC-MAC, DMAC, Two-Track-MAC SHA-1, SHA-2 (SHA-224, SHA-256, SHA-384, and hash functions SHA-512), Tiger, WHIRLPOOL, RIPEMD-128, RIPEMD-256, RIPEMD-160, RIPEMD-320 RSA, DSA, ElGamal, Nyberg-Rueppel (NR), public-key cryptography Rabin, Rabin-Williams (RW), LUC, LUCELG, DLIES (variants of DHAES), ESIGN padding schemes for public-key PKCS#1 v2.0, OAEP, PSS, PSSR, IEEE P1363 systems EMSA2 and EMSA5 Diffie-Hellman (DH), Unified Diffie-Hellman key agreement schemes (DH2), Menezes-Qu-Vanstone (MQV), LUCDIF, XTR-DH elliptic curve cryptography ECDSA, ECNR, ECIES, ECDH, ECMQV insecure or obsolescent MD2, MD4, MD5, Panama Hash, DES, ARC4, SEALalgorithms retained for backwards 3.0, WAKE, WAKE-OFB, DESX (DES-XEX3), RC2, compatibility and historical SAFER, 3-WAY, GOST, SHARK, CAST-128, Square valueOther features include: * pseudo random number generators (PRNG): ANSI X9.17 appendix C, RandomPool * password based key derivation functions: PBKDF1 and PBKDF2 from PKCS #5, PBKDF from PKCS #12 appendix B * Shamir's secret sharing scheme and Rabin's information dispersal algorithm (IDA) * fast multi-precision integer (bignum) and polynomial operations * finite field arithmetics, including GF(p) and GF(2^n) * prime number generation and verification * useful non-cryptographic algorithms + DEFLATE (RFC 1951) compression/decompression with gzip (RFC 1952) and zlib (RFC 1950) format support + hex, base-32, and base-64 coding/decoding + 32-bit CRC and Adler32 checksum * class wrappers for these operating system features (optional): + high resolution timers on Windows, Unix, and Mac OS + Berkeley and Windows style sockets + Windows named pipes + /dev/random, /dev/urandom, /dev/srandom + Microsoft's CryptGenRandom on Windows * A high level interface for most of the above, using a filter/pipeline metaphor * benchmarks and validation testing * x86, x86-64 (x64), MMX, and SSE2 assembly code for the most commonly used algorithms, with run-time CPU feature detection and code selection * some versions are available in FIPS 140-2 validated formYou are welcome to use it for any purpose without paying me, but seeLicense.txt for the fine print.The following compilers are supported for this release. Please visithttp://www.cryptopp.com the most up to date build instructions and porting notes. * MSVC 6.0 - 2008 * GCC 3.3 - 4.3 * C++Builder 2009 * Intel C++ Compiler 9 - 11 * Sun Studio 12 (CC 5.9)*** Important Usage Notes ***1. If a constructor for A takes a pointer to an object B (except primitivetypes such as int and char), then A owns B and will delete B at A'sdestruction. If a constructor for A takes a reference to an object B,then the caller retains ownership of B and should not destroy it untilA no longer needs it. 2. Crypto++ is thread safe at the class level. This means you can useCrypto++ safely in a multithreaded application, but you must providesynchronization when multiple threads access a common Crypto++ object.*** MSVC-Specific Information ***On Windows, Crypto++ can be compiled into 3 forms: a static libraryincluding all algorithms, a DLL with only FIPS Approved algorithms, anda static library with only algorithms not in the DLL.(FIPS Approved means Approved according to the FIPS 140-2 standard.)The DLL may be used by itself, or it may be used together with the secondform of the static library. MSVC project files are included to buildall three forms, and sample applications using each of the three formsare also included.To compile Crypto++ with MSVC, open the "cryptest.dsw" (for MSVC 6 and MSVC .NET 2003) or "cryptest.sln" (for MSVC .NET 2005) workspace file and build one or more of the following projects:cryptdll - This builds the DLL. Please note that if you wish to use Crypto++ as a FIPS validated module, you must use a pre-built DLL that has undergone the FIPS validation process instead of building your own.dlltest - This builds a sample application that only uses the DLL.cryptest Non-DLL-Import Configuration - This builds the full static library along with a full test driver.cryptest DLL-Import Configuration - This builds a static library containing only algorithms not in the DLL, along with a full test driver that uses both the DLL and the static library.To use the Crypto++ DLL in your application, #include "dll.h" before includingany other Crypto++ header files, and place the DLL in the same directory asyour .exe file. dll.h includes the line #pragma comment(lib, "cryptopp")so you don't have to explicitly list the import library in your projectsettings. To use a static library form of Crypto++, specify it asan additional library to link with in your project settings.In either case you should check the compiler options tomake sure that the library and your application are using the same C++run-time libraries and calling conventions.*** DLL Memory Management ***Because it's possible for the Crypto++ DLL to delete objects allocated by the calling application, they must use the same C++ memory heap. Three methods are provided to achieve this.1. The calling application can tell Crypto++ what heap to use. This method is required when the calling application uses a non-standard heap.2. Crypto++ can tell the calling application what heap to use. This method is required when the calling application uses a statically linked C++ Run Time Library. (Method 1 does not work in this case because the Crypto++ DLL is initialized before the calling application's heap is initialized.)3. Crypto++ can automatically use the heap provided by the calling application's dynamically linked C++ Run Time Library. The calling application must make sure that the dynamically linked C++ Run Time Library is initialized before Crypto++ is loaded. (At this time it is not clear if it is possible to control the order in which DLLs are initialized on Windows 9x machines, so it might be best to avoid using this method.)When Crypto++ attaches to a new process, it searches all modules loaded into the process space for exported functions "GetNewAndDeleteForCryptoPP" and "SetNewAndDeleteFromCryptoPP". If one of these functions is found, Crypto++ uses methods 1 or 2, respectively, by calling the function. Otherwise, method 3 is used. *** GCC-Specific Information ***A makefile is included for you to compile Crypto++ with GCC. Make sureyou are using GNU Make and GNU ld. The make process will produce two files,libcryptopp.a and cryptest.exe. Run "cryptest.exe v" for the validationsuite.*** Documentation and Support ***Crypto++ is documented through inline comments in header files, which areprocessed through Doxygen to produce an HTML reference manual. You can finda link to the manual from http://www.cryptopp.com. Also at that site isthe Crypto++ FAQ, which you should browse through before attempting to use this library, because it will likely answer many of questions thatmay come up.If you run into any problems, please try the Crypto++ mailing list.The subscription information and the list archive are available onhttp://www.cryptopp.com. You can also email me directly by visitinghttp://www.weidai.com, but you will probably get a faster response throughthe mailing list.*** History ***1.0 - First public release. Withdrawn at the request of RSA DSI. - included Blowfish, BBS, DES, DH, Diamond, DSA, ElGamal, IDEA, MD5, RC4, RC5, RSA, SHA, WAKE, secret sharing, DEFLATE compression - had a serious bug in the RSA key generation code.1.1 - Removed RSA, RC4, RC5 - Disabled calls to RSAREF's non-public functions - Minor bugs fixed2.0 - a completely new, faster multiprecision integer class - added MD5-MAC, HAVAL, 3-WAY, TEA, SAFER, LUC, Rabin, BlumGoldwasser, elliptic curve algorithms - added the Lucas strong probable primality test - ElGamal encryption and signature schemes modified to avoid weaknesses - Diamond changed to Diamond2 because of key schedule weakness - fixed bug in WAKE key setup - SHS class renamed to SHA - lots of miscellaneous optimizations2.1 - added Tiger, HMAC, GOST, RIPE-MD160, LUCELG, LUCDIF, XOR-MAC, OAEP, PSSR, SHARK - added precomputation to DH, ElGamal, DSA, and elliptic curve algorithms - added back RC5 and a new RSA - optimizations in elliptic curves over GF(p) - changed Rabin to use OAEP and PSSR - changed many classes to allow copy constructors to work correctly - improved exception generation and handling2.2 - added SEAL, CAST-128, Square - fixed bug in HAVAL (padding problem) - fixed bug in triple-DES (decryption order was reversed) - fixed bug in RC5 (couldn't handle key length not a multiple of 4) - changed HMAC to conform to RFC-2104 (which is not compatible
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -