3 ms·
Is there some kind of cryptography for idiots guide around? Something that explains how to use a high level cryptography library safely. A guide that recognize
by im3w1l 13y ago
Is there some kind of cryptography for idiots guide around?
Something that explains how to use a high level cryptography library safely. A guide that recognizes that the reader is probably stupid enough to create a buffer overflow if he even goes near C++. A guide that assumes the reader will use rand to generate keys if able to and not reminded multiple times not to. A guide for people who have never heard about side channels. A guide that seriously cautions not to hand over the plaintext to Eve even if she asks nicely.
- tptacek 13y agoIf you use the right library --- Nacl or Keyczar, or call out to PGP --- you don't need to be an expert to build cryptography into your application. In all the stories you read about some generalist developer blowing their users' feet off with bad crypto, what you're reading about is someone reinventing these libraries with vanity crypto.
- im3w1l 13y agoEdited, original from https://code.google.com/p/keyczar/wiki/CppTutorial https://code.google.com/p/keyczar/wiki/CppTutorial keyczar::Keyczar* crypter = keyczar::Crypter::Read(location); if (!crypter) return; crypter->set_compression(keyczar::Keyczar::ZLIB); std::string input = "Hey Alice, here is Eves message: [quote]"+superescape(evemessage)+"[/quote] Your Bob"; std::string ciphertext; bool result = crypter->Encrypt(input, &ciphertext); Ooops because, http://arstechnica.com/security/2012/09/many-ways-to-break-ssl-with-crime-attacks-experts-warn/ http://arstechnica.com/security/2012/09/many-ways-to-break-s...
- tptacek 13y agoSure. I think that speaks to my point; the compression side channel was novel enough that trained cryptographers missed it in Keyczar. (Just don't use compression with your encryption and avoid the issue entirely).
- im3w1l 13y agoWell, even if they removed it, our hypothetical library user could do it by themselves if not told not to.