3

I am having major problems with cryptoAPI, and was wondering do you get any 3rd party / better solutions for windows?

Main problem I have with CryptoAPI is that its not OS independent enough. I can't find the right balance in my code to get stuff to work on Windows 2003 and Windows 2008+.

What I essentially want to achieve can be read about here. This is my only use for Cryptography at this stage.

Community
  • 1
  • 1
JL.
  • 78,954
  • 126
  • 311
  • 459

5 Answers5

2

Try Bouncy Castle, it's available in C# & Java: http://www.bouncycastle.org/

Quite a few vendors in our space use it in production.

Doobi
  • 4,844
  • 1
  • 22
  • 17
  • Looks great, do you think it can tackle this problem - http://stackoverflow.com/questions/2720276/how-to-use-crypto-to-extract-the-textual-information-in-a-file – JL. Apr 27 '10 at 11:12
  • I'm afraid I can't answer that directly. – Doobi Apr 27 '10 at 11:54
2

I could recommend OpenSSL http://www.openssl.org/. It is not only for SSL the area, but for cryptography as a whole. It is open source code. This fact can be very useful in some situations. It also works very will in Windows. Recommended compiled binaries and libraries for Windows you can find here http://www.slproweb.com/products/Win32OpenSSL.html

Prof. Falken
  • 24,226
  • 19
  • 100
  • 173
Oleg
  • 220,925
  • 34
  • 403
  • 798
  • I tried open SSL, but couldn't find a way to decode a CMS encoded file. What I want to do is here : http://stackoverflow.com/questions/2720276/how-to-use-crypto-to-extract-the-textual-information-in-a-file, couldn't find any way yet to do this easily using openSSL, but if you know how to please share. – JL. Apr 27 '10 at 13:38
  • 1
    I am sure that you find all you needed inside the code. Download the code from http://www.openssl.org/source/ and look at example from openssl-1.0.0\demos\sign or inside openssl-1.0.0\openssl-1.0.0\crypto\pkcs7 directories. You can use a command line utility http://www.openssl.org/docs/apps/openssl.html to see the possibilities of OpenSSL lirary. I recomend also look at http://www.madboa.com/geek/openssl/ – Oleg Apr 27 '10 at 13:57
1

CryptoAPI is a pain to use properly, if you are having problems, can I suggest Crypto++ ? The documentation isn't the best, but I've found it to be very powerful.

Without knowing more about what you are trying to achieve I can't be more help I'm afraid.

Konrad
  • 39,751
  • 32
  • 78
  • 114
  • Do you think it could be used to strip a file of its certificate and just get to the text tile? – JL. Apr 27 '10 at 09:55
  • It certainly has the relevant methods, but I've mostly used it for the algorythm implementations so I can't say for sure I'm afraid. – Konrad Apr 27 '10 at 09:56
1
  • Botan library - very nice library
  • gnu-tls/libgcrypt
Artyom
  • 31,019
  • 21
  • 127
  • 215
1

Crypto++ is amazing in power, but suffers from its complexity and a lack of automation/documentation. It also suffers from a lack of debugging I think, when the check does not work, it just does not work, but you're given little hints as to what could cause the failure...

Anyway, since you are using C++, may I suggest Google Keyczar ?

  • It's meant to be easy to use, with safe defaults, yet allows customization.
  • It comes up with a complete Key Management system, which Crypto++ does not feature and which is complicated enough to code by oneself.
  • It's open source too, so the code can be audited.
  • It's portable even outside of the Windows environment.

I haven't, unfortunately, used it myself. I am currently stuck with Crypto++. But if I had the opportunity to choose right now, I think I'd invest time to experiment with Keyczar.

Matthieu M.
  • 287,565
  • 48
  • 449
  • 722