What Is the Best Encryption Library in C/C++

Please suggest a good encryption library for VC++ 2008

Will decrypt key be hardcoded in your program, or supplied from eg. a license file?

If hardcoded, don't bother looking for any type of fancy encryption, all you can hope for is a (very thin!) layer of obfuscation - even a simple XOR scrambling would be no worse than AES.

That said, check out TomCrypt or Crypto++.

EDIT

You could also opt for something really simple such as TEA. Or you could stick with simple XOR encryption and compress your executable; a nice property of single-byte XOR encryption is that the encrypted data will still be compressible :) (caveat emptor: exe compression sometimes triggers false positives in antivirus apps).

The thing to keep in mind is that "if it runs, it can be broken", so focus on diverting casual prying eyes and forget about securing against "really interested people" - it takes a lot of effort and knowledge to do anything remotely successful.

EDIT 2

For "hiding" the decryption key, you can simply store the binary key (what the decryption algorithm itself uses) rather than a textual representation - or you could use a string of gibberish. Doesn't matter much, casual users won't be able to use the key anyway, and you can't hide it from determined people :)

AES Library or code for C++

Openssl is the best crypto library for C/C++ and I think it's definitely worth to give it a look.

You can always break data yourself into blocks and encrypt/decrypt with library functions.

Best encryption library for mobile devices?

I've looked a lot of libraries, and in the end I ended up going with "TomCrypt", for the following reasons:

1) Excellent portability. You can customize the library in a very very easy way in order to almost assure portability between lot's of devices.

2) Very modular, I could (in a very easy way) pick up and compile only the encryption algorithms I needed for my particular application, ( in this example it was SHA-1 and a couple of others)

3) Very very lightweight. Because of the modularity, it ended up being a very lightweight addition to my code.

C++ free encryption libraries

OpenSSL has all the functionality that you would expect and it is often already installed (at least on Linux).

It supports asymmetric/symmetric encryption, digital signatures and hashing algorithms. For example, you can use the high-level OpenSSL EVP API for symmetric encryption.

Encryption library and compression library for c/c++ in linux

Well, here are the concrete recommendations in form of the specific Ubuntu packages:

  • libmcrypt-dev: can handle dozen symmetric algorithms (AES/Rijndael, Blowfish...)
  • zlib1g-dev: gzip is a one possible choice between speed and size

Encryption algorithm/library for .NET 2.0 + C++

We successfully do a similar thing that I hope might help you:

C++ CryptoAPI

  • CryptoAPI is pure Win32 (c/c++), native to all Microsoft OS's.
  • Use Enhanced Cryptographic Provider (MS_ENHANCED_PROV)
  • Use Triple DES (CALG_3DES) algorithm

.NET TripleDes Provider

  • Use TripleDESCryptoServiceProvider on the .NET side.

Side Notes

  • We avoid CAPICOM like the plague as the deployment nightmares that come with it are not worth the hassle.
  • Byte order on the .NET side can come into play at times. For example, to consume a key that is generated on the C++ (CryptoAPI) side, you need to reverse the byte array prior to using it within the TripleDESCryptoServiceProvider.

If you would like more details please leave a comment and I can give more. Happy crypto!

Cryptographic library for C/C++/Java/Python for Windows/Linux/Mac OS

NaCl(Networking and Cryptography library) is a good choice.
It provides a higher level abstraction of encryption and decryption.
If you are not familiar with cryptography, the High-level primitives are secure and easy to use.



Related Topics



Leave a reply



Submit