Crypto++


Crypto++ is a free and open-source C++ class library of cryptographic algorithms and schemes written by Wei Dai. Crypto++ has been widely used in academia, student projects, open source and non-commercial projects, as well as businesses. Released in 1995, the library fully supports 32-bit and 64-bit architectures for many major operating systems and platforms, including Android, Apple, BSD, Cygwin, IBM AIX and S/390, Linux, MinGW, Solaris, Windows, Windows Phone and Windows RT. The project also supports compilation using C++03, C++11 and C++17 runtime libraries; and a variety of compilers and IDEs, including Borland Turbo C++, Borland C++ Builder, Clang, CodeWarrior Pro, GCC, Intel C++ Compiler, Microsoft Visual C/C++, and Sun Studio.

Algorithms

Crypto++ ordinarily provides complete cryptographic implementations, and often includes less popular, less frequently-used schemes. For example, Camellia is an ISO/NESSIE/IETF-approved block cipher roughly equivalent to AES, and Whirlpool is an ISO/NESSIE/IETF-approved hash function roughly equivalent to SHA; both are included in the library.
Additionally, the Crypto++ library sometimes makes proposed and bleeding edge algorithms and implementations available for study by the cryptographic community. For example, VMAC, a universal hash-based message authentication code, was added to the library during its submission to the Internet Engineering Task Force ; and Brainpool curves, proposed in March 2009 as an Internet Draft in RFC 5639, were added to Crypto++ 5.6.0 in the same month.
Primitive or OperationAlgorithms or Implementations
Pseudorandom number generatorsLCG, KDF2, Blum Blum Shub, ANSI X9.17, Mersenne Twister, RDRAND and RDSEED
High speed stream ciphersChaCha8/12/20, HC-128 and HC-256, Panama, Rabbit, Salsa20, SOSEMANUK, XSalsa20
AES and AES candidatesRijndael, RC6, MARS, Twofish, Serpent, CAST-256
Other block ciphersARIA, Blowfish, Camellia, CHAM, HIGHT, IDEA, Kalyna, LEA, RC5, Triple-DES, SEED, SHACAL-2, Simon and Speck, SIMECK, Skipjack, SM4, TEA, Threefish, XTEA
Block cipher modes of operationECB, CBC, CTS, CFB, OFB, CTR
Authenticated encryption modesCCM, GCM, EAX
Block ciphers padding schemesPKCS#5, PKCS#7, Zeros, One and zeros, W3C Padding
Message authentication codesVMAC, HMAC, CMAC, CBC-MAC, DMAC, Two-Track-MAC
Cryptographic hash functionBLAKE2, Keccak, SHA-1, SHA-2, SHA3, Tiger, WHIRLPOOL, RIPEMD
Password based key derivation functionsPBKDF1 and PBKDF2 from PKCS #5, PBKDF from PKCS #12 appendix B, Krawczyk and Eronen's HKDF
Public-key cryptographyRSA, DSA, ElGamal, Nyberg-Rueppel, Rabin-Williams, LUC, LUCELG, DLIES, ESIGN, curve25519
Padding schemes for public-key systemsPKCS#1 v2.0, OAEP, PSS, PSSR, IEEE P1363 EMSA2 and EMSA5
Key agreement schemesDiffie–Hellman, Unified Diffie–Hellman, Menezes–Qu–Vanstone, Hashed MQV, Fully Hashed MQV, LUCDIF, XTR-DH, x25519
Elliptic curve cryptographyECDSA, ECNR, ECIES, ECDH, ECMQV
Secret SharingShamir's secret sharing scheme, Rabin's information dispersal algorithm

The library also makes available primitives for number theoretic operations such as a fast multi-precision integers; prime number generation and verification; finite field arithmetic, including GF and GF; elliptical curves; and polynomial operations.
Furthermore, the library retains a collection of insecure or obsolescent algorithms for backward compatibility and historical value: MD2, MD4, MD5, Panama Hash, DES, ARC4, SEAL 3.0, WAKE, WAKE-OFB, DESX, RC2, SAFER, 3-WAY, GOST, SHARK, CAST-128, and Square.

Performance

In a 2007 ECRYPT workshop paper focusing on public key implementations of eight libraries, Ashraf Abusharekh and Kris Kaj found that "Crypto++ 5.1 leads in terms of support for cryptographic primitives and schemes, but is the slowest of all investigated libraries."
In 2008, speed tests carried out by Timo Bingmann using seven open-source security libraries with 15 block ciphers, Crypto++ 5.5.2 was the top performing library under two block ciphers, and did not rank below the average library performance under the remaining block ciphers.
Crypto++ also includes an auto-benchmarking feature, available from the command line, the results of which are available at Crypto++ 5.6.0 Benchmarks.
As with many other cryptographic libraries available for 32-bit and 64-bit x86 architectures, Crypto++ includes assembly routines for AES using AES-NI. With AES-NI, AES performance improves dramatically: 128-bit AES/GCM throughput increases from approximately 28.0 cycles per byte to 3.5 cycles per byte.

Version releases

Crypto++ 1.0 was released in June 1995. Since its initial release, the library has seen nearly two dozen revisions, including an architectural change in version 5.0. There have been ten releases using the version 5.0 architecture since March 2009.
VersionReleased Date
Crypto++ 5.6.0March 15, 2009
Crypto++ 5.6.1August 9, 2010
Crypto++ 5.6.2February 20, 2013
Crypto++ 5.6.3November 20, 2015
Crypto++ 5.6.4September 11, 2016
Crypto++ 5.6.5October 11, 2016
Crypto++ 6.0.0January 22, 2018
Crypto++ 6.1.0February 22, 2018
Crypto++ 7.0.0April 8, 2018
Crypto++ 8.0.0December 28, 2018
Crypto++ 8.1.0February 11, 2019
Crypto++ 8.2.0April 28, 2019

Lawrence Teo's compilation of previous Crypto++ releases dating back to 1995 can be found in the users group archives.

FIPS validations

Crypto++ has received three Federal Information Processing Standard 140-2 Level 1 module validations with no post-validation issues.
VersionCertificateDates
Crypto++ 5.0.4Certificate 3432003-09-05, 2005-10-28
Crypto++ 5.2.3Certificate 5622005-07-29, 2005-08-24, 2005-10-28
Crypto++ 5.3.0Certificate 8192007-08-13, 2007-08-17

Crypto++ was moved to the CMVP's in 2016. The move effectively means the library is no longer validated.

Licensing

As of version 5.6.1, Crypto++ consists of only public domain files, with a compilation copyright and a single open source license for the compilation copyright: