Hacker News new | past | comments | ask | show | jobs | submit login

Crypto is hard.

The point of this is you shouldn't even be using algorithms directly. If you need to touch crypto at all you need to learn about it, and the more you learn about it the more you'll realise just how damned hard it is.

Absolutely use common programs like GPG and common libraries like OpenSSL. In fact don't use anything else, and don't even think about implementing this stuff yourself.

I agree some sort of authoritative set of info would be good. Very hard to do though.




"Dr. Hoenikker used to say that any scientist who couldn't explain to an eight-year-old what he was doing was a charlatan."

- from Kurt Vonnegut's novel Cat's Cradle


Yes. Definitely go with epigrams from works of fiction to guide engineering decisions.


You do not really understand something unless you can explain it to your grandmother.

- Albert Einstein


"The problem with quotes from the internet is it is hard to verify their authenticity"

- Abraham Lincoln



It does not then follow that when someone refuses to explain something to you like you are their grandmother that they do not really understand what they're talking about.

Also I'm pretty sure that's Diablo Cody's quote, not Einstein's.


There's a difference between explaining to an eight-year-old what you're doing and instructing that eight-year-old in how to do the same thing safely without spending a long time on his education.


Correction, absolutely do not use OpenSSL.


Except that one point in this article seems to be that you're still screwed even if you're using a well-respected library.


The real problem is the software libraries are just as hard.

Take OpenSSL for example... it's almost easier to learn the crypto than to figure out the API. Here's a good one: an SSL read/write operation can fail with more than one error, and if you don't clear or loop through all the errors then the next operation will fail because of the previous errors -- even if it succeeded. Or just try getting it to work with non-blocking sockets, you finally believe it is working and surprise it fails only once the network gets saturated. Or hours later when it renegotiates the crypto.

And you still have to know all the crypt terms to use it. What's a PEM? A BIO? PKCS? DHparams? What's "ASCII armor"? X509? Did SSL_library_init() add weak algorithms? Why do I have to know this just to create a secure connection?

Most of blame for crypto problems belongs to the libraries not the developers using them.


Don't use OpenSSL, don't use Crypto++, don't use CommonCrypto, don't use CryptoAPI. Those are expert interfaces and you'll get them wrong.

Instead, use NACL or Keyczar. Those are high-level interfaces designed to help generalist developers not make mistakes.




Join us for AI Startup School this June 16-17 in San Francisco!

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: