What is the best encryption library in C/C++?

C++CEncryption

C++ Problem Overview


What is the best encryption library in C/C++ In terms of:

  • entropy
  • quality
  • ease of use
  • readability
  • portability
  • performance

What's your favorite and why do you like it?

C++ Solutions


Solution 1 - C++

We've used OpenSSL with good success. Portable, standards compliant and easy to use.

Solution 2 - C++

I've used CryptoPP in the past (http://www.cryptopp.com/) and although its API style and programming paradigms take a little getting used to, I liked it in the end. It provides a wide range of symmetric and asymmetric algorithms with much flexibility. Documentation is so-so, the API docs are there but there's little 'high-level' overview and simple sample code. I ended up puzzling together pieces of code from around the net. It was easy to integrate into my project (linked statically). I'm using MSVC - 2003 when I started using it, now switched to 2008. It's portable across several platforms (check out the website). I've always used the default RNG, don't know which one that is.

Solution 3 - C++

I'm gonna have to go with LibTomCrypt. It's often overlooked for OpenSSL, but TomCrypt is just so lightweight and simple. As for quality, TomCrypt is widely accepted as top-quality encryption. Also, it's license is public domain which avoids the attribution hassle for your documentation that BSD licenses give you when writing commercial software.

Solution 4 - C++

My favorite is GNU's library:

libgcrypt

Its performance is good, and it's used EVERYWHERE so it's very well tested.

Solution 5 - C++

Crypto++ seems to have a very good reputation

Wikipedia - https://en.wikipedia.org/wiki/Crypto%2B%2B

GitHub - https://github.com/weidai11/cryptopp

Solution 6 - C++

The C++ version isn't out yet but goolge KeyCzar http://code.google.com/p/keyczar/ might be worth looking at. Whatever you feel about their business they do have a lot of smart programmers working for them.

Solution 7 - C++

GPGme. Simple to use and compatible with the OpenPGP format

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
Questionpaxos1977View Question on Stackoverflow
Solution 1 - C++Rob WalkerView Answer on Stackoverflow
Solution 2 - C++RoelView Answer on Stackoverflow
Solution 3 - C++bmdhacksView Answer on Stackoverflow
Solution 4 - C++dicroceView Answer on Stackoverflow
Solution 5 - C++warrenView Answer on Stackoverflow
Solution 6 - C++Martin BeckettView Answer on Stackoverflow
Solution 7 - C++bortzmeyerView Answer on Stackoverflow