News for hackers. Stuff that matters.
Re:Why I don't touch crypto by tptacek on Thursday July 11, 2013 @01:45PM (#6027675)
No, some "tried and true" methods of using crypto are in one of Schneier's books, _Practical Cryptography_. _Practical_ is great, but it's not complete, a fact mitigated by the effort Schneier and Furgusen go to in that book to convince people not to write casual crypto.

The methods described in _Applied Cryptography_ are unfortunately well-tried, but few of them are true. _Applied_ is an almanac of cryptographic concepts. Where _Practical_ tries hard to present best practices at every point in the book, _Applied_ instead strives for the broadest coverage; it's a survey, not an instruction guide. Unfortunately for all of us, ~20 years of _Applied_ readers have tried to put directly into practice the material in that book, much of which is (relevant to modern standards) half-baked.

It's also important to know that _Practical_ is also showing its age. There are very common, very serious vulnerabilities that _Practical_ does very little to prevent. For instance, "Design Rule 4" in _Practical_, "The Horton Principle", implies that message authentication should precede encryption. This construction is now disfavored; protocols that use mac-then-encrypt have been broken with side channels abetted by attacker chosen ciphertext.

Other concepts missing from _Practical_: elliptic curve --- particularly given endangered status of RSA, which would be a nit if not for the extremely detailed coverage Schneier gives to more theoretical threats to AES, (EC)DSA parameter tampering, the notion of minimizing randomness from cryptosystems, the modern AE modes, an in-depth treatment of side channels (where "in-depth" might mean "at least as much coverage as is given to the question of what block cipher mode to use") --- particularly error oracles, applications of hash collisions, RSA message formatting (it doesn't even cover OAEP), and secure key derivation.

I write this from a place of love; _Practical Cryptography_ is one of my all-time favorite software security books. It's one of those books you can "read backwards" to learn how to break systems in addition to learning how to build them. With age, though, _Practical_ is becoming more useful as a breaker's guide and less and a builder's guide.

There is no book anywhere that a generalist developer can read to learn how to build a secure cryptosystem from scratch, and generalist developers should be relying instead on high-level libraries like Keyczar and Nacl.

I don't know a think about Satoshi's competence (I couldn't, because nobody knows who he is), but Moxie Marlinspike has spent over 15 years building his competence. If you're Moxie, build whatever you want.

Re:Why I don't touch crypto by Osmium on Thursday July 11, 2013 @03:07PM (#6028397)
If I remember rightly, they actually say in Practical Cryptography that some of the worst crypto they've seen comes from people who've read Applied Cryptography and then decided to roll their own. Which is presumably one of the dangers in writing an "accessible" cryptography textbook is that then people who read it think they understand it... (I say this as a fan of Applied Cryptography, but more as an academic text -- I'd never dream of writing crypto code myself)
Re:Why I don't touch crypto by tptacek on Thursday July 11, 2013 @03:09PM (#6028411)
Applied is a good _book_; it's fun and interesting to read. But people should read it as pop science.
Re:Why I don't touch crypto by dfc on Thursday July 11, 2013 @05:25PM (#6029325)
What is the deal with Practical Cryptography versus Cryptography Engineering? I have frequently seen people say they are the "same book." How similar are they? The publication date is seven years apart. Did they just add a new foreword and change the title?
Re:Why I don't touch crypto by jessaustin on Friday July 12, 2013 @01:51PM (#6033951)
The very few changes from Practical to Engineering, summarized:

* Added a co-author (Tadayoshi Kohno)

* Added handy exercises for self-study (presumably the work of Kohno)

* Buried the opening "Design Philosophy" chapter in the following "Context" chapter, in a more nuanced, mature form

* Drops a discussion of UMAC for one of GMAC which is similar in that they both eschew the use of normal hash functions for something called a "universal" hash

* Discussion of OCB and CCM modes is updated with info about CWC and GCM, since that took place in the publishing interim

* Index is only a page longer, but seems more complete

* Reduced from 410 pages to 353, with a font that appears slightly larger and much less LaTeX-ugly; perhaps the kerning is better too?

That's all I found in 15 minutes of skimming. Note that flaws which were understandable in Practical are more glaring in Engineering: recommending XML where JSON would be better, advocating MAC-then-encrypt rather than encrypt-then-MAC, etc. I probably would not have purchased Engineering if I had realized how minor its updates were. It would be better to purchase if you don't own either book, though.

Re:Why I don't touch crypto by pbsd on Thursday July 11, 2013 @06:38PM (#6029749)
They are the same book; Cryptography Engineering is simply the 2nd edition, although they decided to change the title for some reason.
Re:Why I don't touch crypto by tptacek on Thursday July 11, 2013 @08:24PM (#6030164)
Everyone in our practice has a copy of one or the other, and the differences aren't at all significant. I'd buy whichever one you can get cheaper.
[deleted]
Re:Why I don't touch crypto by tptacek on Thursday July 11, 2013 @01:59PM (#6027794)
What a dumb comment; as if "security contractors" had anything to do with the quality of books, or didn't work in a field that overwhelmingly rewarded publishing vulnerability information.
Re:Why I don't touch crypto by dobbsbob on Thursday July 11, 2013 @02:31PM (#6028102)
That's why I wrote you should research all the new info like the Doom principal (encrypt then MAC) www.thoughtcrime.org/blog/the-cryptographic-doom-principle/

I dont think this is easy at all just lots of articles saying dont even try it, when I bet theres more than competent people here like you who could probably pull off impressive alpha software for long and thorough peer review instead of us all being stuck with decades old clunky software like Truecrypt or GnuPG Assistant.

Who knows maybe in a year cryptocat will be excellent software at least the devs listen to auditors now

Re:Why I don't touch crypto by tptacek on Thursday July 11, 2013 @02:41PM (#6028192)
In other words, you think that the people writing crypto software should simply do the work to become competent cryptographers. I strongly agree with you.

I find your sentiment about GnuPG a little galling. GnuPG is widely trusted and one of the most reviewed cryptosystems in the world; you advocate that it should be replaced --- by Cryptocat, no less --- because you find it "clunky". It's as if the thought hadn't occurred to you that a better exercise than designing one's own vanity cryptosystem might instead be to come up with a new UX for an existing trustworthy system.

I'm curious as to what web application you foresee supplanting Truecrypt, which is a full-disk encryption system whose entire UX is "enter the password to access this disk".

Re:Why I don't touch crypto by dobbsbob on Thursday July 11, 2013 @03:11PM (#6028424)
I wrote replace GnuPG Assistant not GnuPG. I have never had a problem using command line gpg or GPA but seems millions of ppl can't figure it out so they don't use it, thus NSA wins. I also dont think cryptocat should replace it (dont know where I inferred it should).

TC is clunky and has distro rights problems so a lot of releases like Tails are dumping it.

Re:Why I don't touch crypto by stplsd on Thursday July 11, 2013 @02:40PM (#6028186)
Any comments about "Handbook of Applied Cryptography"?

http://cacr.uwaterloo.ca/hac/

Re:Why I don't touch crypto by tptacek on Thursday July 11, 2013 @02:42PM (#6028197)