4 ms·
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 mo
by Nursie 14y ago
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.
- troymc 14y ago"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
- tptacek 14y agoYes. Definitely go with epigrams from works of fiction to guide engineering decisions.
- lawn 14y agoYou do not really understand something unless you can explain it to your grandmother. - Albert Einstein
- Nursie 14y ago"The problem with quotes from the internet is it is hard to verify their authenticity" - Abraham Lincoln
- lifeisstillgood 14y agoTotally worth a T-shirt http://www.cafepress.co.uk/cp/customize/product2.aspx?from=CustomDesigner&number=726533417 http://www.cafepress.co.uk/cp/customize/product2.aspx?from=C...
- deleted 14y ago[deleted]
- tptacek 14y agoIt 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.
- chc 14y agoThere'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.
- deleted 14y ago[deleted]
- lawnchair_larry 14y agoCorrection, absolutely do not use OpenSSL.
- 0xABADC0DA 14y agoThe 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.
- tptacek 14y agoDon'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.
- baddox 14y agoExcept that one point in this article seems to be that you're still screwed even if you're using a well-respected library.