cppcrypto provides optimized implementations of cryptographic primitives.

Hash functions: BLAKE, BLAKE2, Echo, Esch, Groestl, JH, Kupyna, MD5, SHA-1, SHA-2, SHA-3, SHAKE, Skein, SM3, Streebog, Whirlpool.

Block ciphers: Anubis, Aria, Camellia, CAST-256, Kalyna, Kuznyechik, Mars, Serpent, Simon, SM4, Speck, Threefish, Twofish, and Rijndael (AES) with all block/key sizes.

Stream ciphers: HC-128, HC-256, Salsa20, XSalsa20, ChaCha, XChaCha.

Encryption modes: CBC, CTR.

AEAD modes: Encrypt-then-MAC (EtM), GCM, OCB, ChaCha-Poly1305, Schwaemm.

Streaming AEAD.

MAC functions: HMAC, Poly1305.

Key derivation functions: PBKDF2, scrypt, Argon2, HKDF.

Includes sample command-line tools:
- 'digest' - for calculating and verifying file checksum(s) using any of the supported hash algorithms (similar to md5sum or RHash).
- 'cryptor' - for file encryption using Serpent-256 algorithm in AEAD mode.

Check out the cppcrypto web site linked below for programming documentation.

Features

  • Simple self-explanatory programming interface.
  • Hash functions: BLAKE, BLAKE2, Echo, Esch, Grøstl, JH, Kupyna, MD5, SHA-1, SHA-2, SHA-3, SHAKE, Skein, SM3, Streebog, Whirlpool.
  • Block ciphers: Rijndael (AES), Anubis, Aria, Camellia, CAST-256, Kalyna, Kuznyechik, Mars, Serpent, Simon-128, SM4, Speck-128, Threefish, Twofish.
  • Stream ciphers: HC-128, HC-256, Salsa20/20, Salsa20/12, XSalsa20/20, XSalsa20/12, ChaCha20, ChaCha12, XChaCha20, XChaCha12.
  • Encryption modes: CBC, CTR.
  • AEAD modes: Encrypt-then-MAC, GCM, OCB, ChaCha-Poly1305, Schwaemm.
  • Streaming authenticated encryption with associated data (Streaming AEAD).
  • MAC functions: HMAC, Poly1305.
  • Key derivation functions: PBKDF2, scrypt, Argon2i/Argon2d/Argon2id, HKDF
  • Tested compilers: Visual C++ 2017, Visual C++ 2019, Visual C++ 2022, gcc 12.2.1, clang 13.0.0, clang 15.0.7.
  • Tested operating systems: Windows, Linux, FreeBSD, OS X, Solaris
  • Includes portable implementations and optimized implementations (using SSE/AVX/etc) for modern CPUs.
  • The fastest implementation is selected dynamically at runtime depending on CPU features.
  • The only publicly-available implementation of AES-NI acceleration for all 25 Rijndael variants (not only for 3 AES variants).
  • The only publicly-available performance-optimized implementation of Kupyna hash function (Ukrainian national standard DSTU 7564:2014).
  • The first publicly-available performance-optimized implementation of Kalyna block cipher (Ukrainian national standard DSTU 7624:2014).
  • One of the first independent implementations of Argon2 password hashing function.
  • Support for Salsa20 and ChaCha variants with 192-bit nonce (XSalsa20/XChaCha).
  • Includes command-line digest utility for calculating file checksums (hashes) and demonstrating library usage.
  • Includes command-line cryptor utility for authenticated file enryption using Serpent-256 and demonstrating library usage.
  • Documentation is available at http://cppcrypto.sourceforge.net/

Project Activity

See All Activity >

License

BSD License

Follow cppcrypto

cppcrypto Web Site

You Might Also Like
Our Free Plans just got better! | Auth0 by Okta Icon
Our Free Plans just got better! | Auth0 by Okta

With up to 25k MAUs and unlimited Okta connections, our Free Plan lets you focus on what you do best—building great apps.

You asked, we delivered! Auth0 is excited to expand our Free and Paid plans to include more options so you can focus on building, deploying, and scaling applications without having to worry about your secuirty. Auth0 now, thank yourself later.
Try free now
Rate This Project
Login To Rate This Project

User Ratings

★★★★★
★★★★
★★★
★★
1
0
0
0
0
ease 1 of 5 2 of 5 3 of 5 4 of 5 5 of 5 5 / 5
features 1 of 5 2 of 5 3 of 5 4 of 5 5 of 5 4 / 5
design 1 of 5 2 of 5 3 of 5 4 of 5 5 of 5 5 / 5
support 1 of 5 2 of 5 3 of 5 4 of 5 5 of 5 5 / 5

User Reviews

  • Very fast library. I was looking for a C library to replace PHP's mcrypt. Using my crude benchmark on Rijndael 256, cppcrypto is about 60x faster than mcrypt.
Read more reviews >

Additional Project Details

Operating Systems

Solaris, Linux, FreeBSD, Mac, Windows

Intended Audience

Developers

Programming Language

C++

Related Categories

C++ Cryptography Software, C++ Libraries, C++ Encryption Algorithms

Registered

2015-09-10