News for hackers. Stuff that matters.
Re:Amazon Web Services signature version 1 is insecure by jgrahamc on Thursday December 18, 2008 @03:21AM (#401944)
This is a lovely reminder that designing cryptographic protocols is hard. Even something as simple as signing a bit of data can have nasty pitfalls.
Re:Amazon Web Services signature version 1 is insecure by cperciva on Thursday December 18, 2008 @03:30AM (#401955)
I wouldn't say that this shows that designing cryptographic protocols is hard. "Use hashing and signature methods which don't have collisions" is a simple rule, both to remember and to apply -- no harder than "drive on the right side of the road" (or "drive on the left side of the road", depending on your country).

Would you say that driving is hard because people have to remember which side of the road to drive on?

Re:Amazon Web Services signature version 1 is insecure by tptacek on Thursday December 18, 2008 @12:26PM (#402320)
If there were 40 sides of the road to choose from, and the side you drove on depended on the time of day and the color of your car, then yes, Colin, I would say driving on the correct side of the road would be hard too.

Have you ever, in your whole career, worked with a team that wrote their own crypto and got it right in version 1? Because I haven't.

Re:Amazon Web Services signature version 1 is insecure by cperciva on Thursday December 18, 2008 @12:50PM (#402347)
Have you ever, in your whole career, worked with a team that wrote their own crypto and got it right in version 1? Because I haven't.

As far as I know, I got the crypto right in tarsnap. If I didn't, please let me know. :-)

Re:Amazon Web Services signature version 1 is insecure by tptacek on Thursday December 18, 2008 @01:01PM (#402370)
I don't think you really answered my question, Colin; I think that's a cop-out answer. =)
Re:Amazon Web Services signature version 1 is insecure by cperciva on Thursday December 18, 2008 @01:09PM (#402385)
Maybe I misunderstood your question. I thought that "as far as I know, I got the crypto right in [product where I wrote my own crypto protocols]" was a pretty clear answer to "have you ever written your own crypto and gotten it right?"
Re:Amazon Web Services signature version 1 is insecure by tptacek on Thursday December 18, 2008 @01:33PM (#402419)
I was asking if you'd ever worked with a team of (other, I implied unsuccessfully) developers who got a cryptosystem right on the first try.
Re:Amazon Web Services signature version 1 is insecure by cperciva on Thursday December 18, 2008 @01:39PM (#402426)
Ok, that explains it. I didn't catch the fact that you were excluding the degenerate case of a one-person team. :-)
Re:Amazon Web Services signature version 1 is insecure by tptacek on Thursday December 18, 2008 @01:39PM (#402427)
I also assumed you'd like your own stuff. But, now that we understand each other: was that an answer to my original question?
Re:Amazon Web Services signature version 1 is insecure by cperciva on Thursday December 18, 2008 @01:48PM (#402440)
I believe I got the crypto right in version 1 of tarsnap, but I wasn't working as part of a (non-degenerate) team. I've never done crypto with a team -- so my answer to your (clarified) question must be a vacuous "no".
Re:Amazon Web Services signature version 1 is insecure by tptacek on Thursday December 18, 2008 @01:53PM (#402447)
But you've worked against a couple teams now that got it wrong (Amazon, OpenSSL). Do you agree that the evidence supports my argument?
Re:Amazon Web Services signature version 1 is insecure by cperciva on Thursday December 18, 2008 @02:21PM (#402504)
Not really, no. Amazon screwed up on a well-known widely-understood rule; there aren't 40 different sides of the road involved with "hash collisions are bad".

Similarly, the one cryptographic complaint I have about OpenSSL (as opposed to non-cryptographic security bugs) is their lack of attention to side channels, and the same applies here -- we KNOW that side channels are bad. The fact that the OpenSSL developers haven't made any systematic attempt to prevent them doesn't mean that cryptography is hard; it just means that the OpenSSL developers are careless.

Re:Amazon Web Services signature version 1 is insecure by brl on Thursday December 18, 2008 @02:45PM (#402541)
That's an interesting criticism of OpenSSL. Do you know of a general purpose cryptographic library that has done a better job than OpenSSL at hardening against side-channel attacks?

By default, OpenSSL has: RSA blinding, constant time montgomery multiplication, careful review and correction of the conditional branches which were attacked in that amazing series of branch prediction papers.

Doesn't seem to me that OpenSSL developers are careless and indifferent about side-channel attacks.

Re:Amazon Web Services signature version 1 is insecure by cperciva on Thursday December 18, 2008 @03:27PM (#402597)
Do you know of a general purpose cryptographic library that has done a better job than OpenSSL at hardening against side-channel attacks?

No, I don't know of any better cryptographic library. (This is why I said a few days ago that writing a better cryptographic library was something I'd like to do if I was rich.)

Doesn't seem to me that OpenSSL developers are careless and indifferent about side-channel attacks.

They're playing whack-a-mole. There are over a thousand conditional branches in the large integer arithmetic code alone. The fact that nobody has pointed out how to exploit them yet doesn't mean that they're not exploitable.

Re:Amazon Web Services signature version 1 is insecure by tptacek on Thursday December 18, 2008 @02:46PM (#402546)
How does the fact that the typical mistakes are well-known and predictable damage my argument?
Re:Amazon Web Services signature version 1 is insecure by cperciva on Thursday December 18, 2008 @03:19PM (#402587)
It indicates that there's nothing particularly special about cryptography. People make dumb mistakes, but that's the same in every field.
Re:Amazon Web Services signature version 1 is insecure by tptacek on Thursday December 18, 2008 @04:44PM (#402670)
People make dumb mistakes all the time, but usually all that happens is that the pie graph doesn't render properly, or the query doesn't use the indices. That's the difference between security bugs and application bugs.

Inviting crypto to the party invites a whole host of new security bugs that you simply cannot have if you don't go down that road in the first place.

Re:Amazon Web Services signature version 1 is insecure by brl on Thursday December 18, 2008 @02:00PM (#402461)
Even expert designed and peer reviewed cryptographic standards usually need a couple of versions to get rid of all the holes-big-enough-to-drive-a-van-through. :)
Re:Amazon Web Services signature version 1 is insecure by tptacek on Thursday December 18, 2008 @02:08PM (#402472)
Examples: SSLv2, RADIUS, DNSSEC, SSH.
Re:Amazon Web Services signature version 1 is insecure by brl on Thursday December 18, 2008 @02:15PM (#402489)
...WEP, Kerberos, GSM, PPTP
Re:Amazon Web Services signature version 1 is insecure by tptacek on Thursday December 18, 2008 @02:18PM (#402498)
They never got WEP or PPTP right. ;)
Re:Amazon Web Services signature version 1 is insecure by jgrahamc on Thursday December 18, 2008 @05:39AM (#402007)
My assumption is that the Amazon people felt that by using HMAC-SHA1 they were secure because that's a well known way of hashing and signing something. The pitfall was in their implementation. They have such a simple system, yet they managed to make a mistake.

This sort of problem is one of the reasons that I made the crypto in tumbler (http://tumbler.sf.net/) as simple as possible because I was sure that if I did anything but total simplicity I would screw it up.

Re:Amazon Web Services signature version 1 is insecure by tptacek on Thursday December 18, 2008 @12:30PM (#402324)
And because Tumbler is basically a dumbed-down version of the RADIUS protocol, you still wound up with the same major security flaw: if you sniff a Tumbler message off the wire, you can crack it with an incremental SHA256 cracker (which is much faster than Unix crypt).

You told people to pick good "passwords"; you should change the language to say "generate good 128 bit random strings".