News for hackers. Stuff that matters.
Re:Cryptographic Right Answers by tptacek on Thursday June 11, 2009 @01:01PM (#653092)
Your first point, about how well-studied HMAC is vs. CCM, is one of those points that makes a lot of sense in an academic context and much less sense in practice. In an academic context you assume both implementations are sound. In a practical context, you have to consider how likely it is that the implementor is going to make unsound choices.

The same goes double for your second point. Yes, if you have to implement the MAC yourself, you clearly want to use HMAC rather than trying to get CBC-MAC right. But if you're in a place where you have to implement your own MAC, you are doomed for a bunch of other reasons. CCM is preferable to HMAC because it's likely you're going to simply be able to change CTR to CCM and have it.

Re:Cryptographic Right Answers by cperciva on Thursday June 11, 2009 @01:09PM (#653109)
Yes, if you have to implement the MAC yourself...

I didn't say anything about implementing the MAC yourself. Someone has to implement it, though -- and no matter who writes the code, HMAC-SHA256 is far more likely to be right and not leaking data via side channels than CBC-MAC is.

Re:Cryptographic Right Answers by tptacek on Thursday June 11, 2009 @02:43PM (#653330)
Bespoke CBC-MAC is an almost-certain disaster. HMAC-SHA256 has some obvious implementation failure modes. It's less easy to see how someone screws up typing "CCM" into their library.

The point is that there are already shrink-wrapped AE constructions (like CCM or EAX) that you can pick up off the shelf and use; HMAC designs are more likely to be bespoke.

Re:Cryptographic Right Answers by cperciva on Thursday June 11, 2009 @03:26PM (#653413)
It's less easy to see how someone screws up typing "CCM" into their library.

If you trust the library, sure. But I've found that the same rules apply to crypto libraries as to everything else: Obscure and complicated features are far more likely to be buggy.

No crypto library is ever going to ship with a broken HMAC-SHA256 -- but I can't say the same thing about AES-CCM.

Re:Cryptographic Right Answers by tptacek on Thursday June 11, 2009 @03:58PM (#653491)
Seriously, Colin? You're talking about people that don't know to use AES-256 instead of Blowfish, but do know enough to homebrew instead of using a library?

CCM and EAX aren't obscure. AE crypto has been in 3 of the last 4 designs I've had to review. The fourth prompted a recent blog post of mine.