views:

32

answers:

3

Background

With respect to cryptography in general, the following advice is so common that it may even be platform and language-agnostic.

Cryptography is an incredibly complex subject which developers should leave to security experts`

I understand and agree with the reasoning behind this statement, and therefore follow the advice when using cryptography in an application.

That being said, because cryptography is tread upon so lightly in all but crypto-specific reference material, I do not know enough about how cryptography works in order to be able to determine whether the default provided to me is adequate for the situation I'm in.There are thousands of crypto frameworks out there in a myriad of different languages, I refuse to believe that every one of those implementations is secure because I don't believe every crypto implementation was created by a crypto expert, principally because if popular opinion is to be believed there just aren't that many of them.

Question:

What information do I need to know about a given encryption algorithm to be able to determine for myself whether an algorithm is a reasonable choice?

A: 

What information do I need to know about a given encryption algorithm to be able to determine for myself whether an algorithm is a reasonable choice?

Once you identify what you do need, there are very few peer-reviewed solutions you can trust. For example:

Symmetric Encryption: AES (Rijndael), Triple DES
Asymmetric Encryption: Diffie-Hellman, RSA
Hashing: The SHA family of functions

These are proven, battle-tested solutions. Until someone proves otherwise, they can be used safely. It's been a while since cryptography departed from security through obscurity and "roll your own" implementations.

There's a lot of cryptographic quackery out there, just be careful when choosing your solution. Make sure it's built on proven technologies, and if it sounds too good or has words like "unbreakable," "revolutionary" or the like, you can be 99% sure that it's bogus.

quantumSoup
There *are* variants; also, SHA is in the process of being obsoleted.Part of the variance involves block width selection. So, you really should update your answer to be more helpful.
Paul Nathan
@Paul the answer is CW, feel free to update it yourself ;)
quantumSoup
And only SHA-1 is in process of being obsoleted
quantumSoup
@quantumSoup: SHA3 is intended to replace SHA2, according to the announcement in the Federal Register.
Paul Nathan
I's possile that I have poorly communicated the question. I'm all for using trusted and tested methods. What I'm unsure of is how to determine whether the default implementation of that method is strong enough (ie. do I need a bigger/ smaller block size, are the generated keys random and large enough, or do I need to generate some myself. Many people would say this is exactly what I should leave to experts, trust is one thing, blind trust is an entirely different beast.
Crippledsmurf
@Crippledsmurf: that question is unanswerable without a context of "what am I trying to protect against?". No matter what algorithm you use it would probably be easier for me to install a keylogger or spy-cam (or beat it out of you if I was that kinda person) thus my answer #2.
msw
@msw Fair point. There is a limit to how much investigating I can or should do. I know nothing is, or ever will be unbreakable, my issue is really with not knowing how to assess the strength of the decisions I do make. Your second answer was pf help in addressing that. Thank you
Crippledsmurf
A: 

The effective methods are well documented and extensively used. I tend to think of three situations relative to cryptography:

  1. If a government sized entity wants your stuff, they'll get it.
  2. For confidential personal or business stuff, social engineering and non-cryptographic means are almost always more effective than code-breaking for almost any imaginable situation.
  3. For hiding stuff from friends, relations, and mere interlopers, anything off the shelf is sufficient. In these scenarios that you have hidden stuff is typically more damning than the stuff itself might be.

There was a time when railroad boxcars switched from heavy-duty padlocks to easily defeated but hard to forge loops of wire. Make the lock stronger and they just go in through the walls. Turn the lock into an intrusion detector and you've gained something.

Signing and authentication are turning out to be better uses of cryptography than mere encryption.

msw
Interesting point re. signing vs encryption. Thanks for your answer.
Crippledsmurf
+1  A: 
  • You need to know the current estimates of time-to-break for each algorithm variant.
  • You need to know the certifications for particular libraries.
  • You need to know the required effective security level for the data you are encrypting. Health information in the USA has particular requirements, for example. So do electric utilities.

The more technical you want to get with crypto algorithm evaluation, the more you are wanting the services of an expert. :-/

Consider http://www.cryptopp.com as an example of information provided. For instance, it is certified by NIST.

Paul Nathan