News for hackers. Stuff that matters.
Re:Google disables compression for OpenSSL in Chrome - SSL e... by cperciva on Wednesday September 12, 2012 @11:44AM (#4511175)
Yes. There's absolutely zero excuse for including compression as part of a cryptographic protocol.
Re:Google disables compression for OpenSSL in Chrome - SSL e... by tptacek on Wednesday September 12, 2012 @11:45AM (#4511180)
Can you point to an instance where you said anything like that, here or anywhere else, before last week?

It's easy for me to believe that you've internalized "minimize data-dependent branches in crypto code" and thus wouldn't have designed a compressed encrypted transport.

It is very hard for me to believe that you would have spotted this flaw immediately had anyone pointed out to you that TLS supported compression.

There is well-regarded (though not by me) crypto advice recommending that people compress before encrypting, to destroy structure in the plaintext.

Re:Google disables compression for OpenSSL in Chrome - SSL e... by sanxiyn on Wednesday September 12, 2012 @11:56AM (#4511242)
This paper published in 2002 does discuss this attack. http://www.iacr.org/cryptodb/data/paper.php?pubkey=3091

"... both the SSH and TLS protocols support an option for on-the-fly compression. Potential security implications of using compression algorithms are of practical importance to people designing systems that might use both compression and encryption."

Re:Google disables compression for OpenSSL in Chrome - SSL e... by tptacek on Wednesday September 12, 2012 @11:58AM (#4511258)
Yep. Great paper. Thanks for finding this.
Re:Google disables compression for OpenSSL in Chrome - SSL e... by cperciva on Wednesday September 12, 2012 @11:54AM (#4511232)
It is very hard for me to believe that you would have spotted this flaw immediately had anyone pointed out to you that TLS supported compression.

I'm not claiming that I'd have noticed this particular attack. I'm saying that having compression in a supposedly secure transport layer was an obviously bad idea even before it was clear how it could be exploited. I don't need to get into a car accident to know that driving at night with my car's headlights turned off is a bad idea.

There is well-regarded (though not by me) crypto advice recommending that people compress before encrypting, to destroy structure in the plaintext.

There's a huge difference between compressing data and compressing an authentication channel. This is why compression should not be included in the secure channel -- it should be left up to the higher-level code to decide if compression is (a) completely pointless or (b) will leak information dangerously.

Re:Google disables compression for OpenSSL in Chrome - SSL e... by tptacek on Wednesday September 12, 2012 @12:01PM (#4511277)
These are things that are obvious in hindsight. They may have been obvious to you before; or, as I'm claiming, they may just fit snugly into your (probably correct) philosophy about secure channel design.

But compression in TLS is not a relic of the 1990s; it's something that looks to have gained its earliest adoption in SSL/TLS at about the same time as Elliptic Curve.

My issue here isn't that you're wrong; it's that I think this is an extremely clever attack that says something profound about designing cryptosystems, and I wouldn't want to see Thai's and Juliano's (or Pornin's, if he's "wrong" about the prediction) work minimized by a glib comment about TLS.

Re:Google disables compression for OpenSSL in Chrome - SSL e... by cperciva on Wednesday September 12, 2012 @12:09PM (#4511325)
compression [...] looks to have gained its earliest adoption in SSL/TLS at about the same time as Elliptic Curve

I guess by that point they had thrown in everything but the kitchen sink, and decided they might as well throw in the kitchen sink too.

I wouldn't want to see Thai's and Juliano's (or Pornin's, if he's "wrong" about the prediction) work minimized by a glib comment about TLS.

Oh, of course. I'm just irritated (as usual) by the fact that people continue to use SSL/TLS "because it's the standard" despite the fact that it's a phenomenally broken standard. There's places where you can't avoid it (HTTPS), but where it can be avoided...

Re:Google disables compression for OpenSSL in Chrome - SSL e... by tptacek on Wednesday September 12, 2012 @12:13PM (#4511349)
Your perspective on HTTPS/TLS is that it has a history of vulnerabilities because it is poorly designed.

My perspective on HTTPS/TLS is that it has a history of vulnerabilities because it is the most carefully studied cryptosystem in human history.

I agree to disagree with you on this.

Re:Google disables compression for OpenSSL in Chrome - SSL e... by cperciva on Wednesday September 12, 2012 @12:18PM (#4511381)
My perspective is that we know how to design protocols which are provably secure.

Your perspective is... I'm not quite sure, actually. Maybe you just don't believe in mathematical proofs?

As you say, agree to disagree -- but I'm not going to stop pointing and laughing every time a new SSL/TLS vulnerability comes out. :-)

Re:Google disables compression for OpenSSL in Chrome - SSL e... by tptacek on Wednesday September 12, 2012 @12:23PM (#4511416)
That protocols without security proofs can survive in the real world, and protocols with security proofs still fall to implementation bugs, and that if you were going to bet on incidence of protocol design flaws vs. implementation flaws, the safe bet is on implementation flaws.
Re:Google disables compression for OpenSSL in Chrome - SSL e... by peterwwillis on Wednesday September 12, 2012 @02:58PM (#4512378)
The level of civility in this thread is great, but I would pay money to see a DEF CON panel debate between you two where you each had to take a shot every 8 minutes. We could get Mikko Hypponen to moderate and pour shots!
Re:Google disables compression for OpenSSL in Chrome - SSL e... by tptacek on Wednesday September 12, 2012 @03:01PM (#4512402)
(a) I would lose the debate, (b) it would be boring, (c) I can drink Colin under the table.
Re:Google disables compression for OpenSSL in Chrome - SSL e... by cperciva on Wednesday September 12, 2012 @08:10PM (#4514018)
(d) I would probably end up in the hospital.

There's a reason why I don't drink -- type 1 diabetes and large quantities of alcohol don't interoperate well.

Re:Google disables compression for OpenSSL in Chrome - SSL e... by luu on Wednesday September 12, 2012 @01:17PM (#4511745)
If you've got a provably secure protocol, what's the problem with formally verifying the implementation of the protocol?

I work in an area where bugs are very scary, so we use formal verification, and that's on top of having many more testers than developers.

From the perspective of this naive outsider, I'd would have expected FV to be worth it for security sensitive protocols. Is it that the protocols are too complex to be verified, or is it just not considered to be worth the effort?

Re:Google disables compression for OpenSSL in Chrome - SSL e... by tptacek on Wednesday September 12, 2012 @01:21PM (#4511759)
I'm not making an argument against formal methods. I'm saying that if you replaced TLS with a protocol with a design proof, you could easily end up less secure.
Re:Google disables compression for OpenSSL in Chrome - SSL e... by sausagefeet on Wednesday September 12, 2012 @03:20PM (#4512559)
Have there been any proposed contenders to TLS/SSL?
Re:Google disables compression for OpenSSL in Chrome - SSL e... by Daniel_Newby on Wednesday September 12, 2012 @03:48PM (#4512722)
SSH and IPv6 come to mind.
Re:Google disables compression for OpenSSL in Chrome - SSL e... by sausagefeet on Wednesday September 12, 2012 @11:54PM (#4514712)
For HTTP traffic?
Re:Google disables compression for OpenSSL in Chrome - SSL e... by geofft on Wednesday September 12, 2012 @12:46PM (#4511558)
Vulnerabilities don't arise by study, they arise because of vulnerabilities. We have plenty of well-studied crypto that is fine, ranging from SHA to Kerberos.

Colin is right that we know how to prove that cryptographic systems have certain security properties. The academic literature is filled with laments about TLS and proofs of fixed versions of it.

Re:Google disables compression for OpenSSL in Chrome - SSL e... by tptacek on Wednesday September 12, 2012 @12:49PM (#4511575)
SHA? The Secure Hash Algorithm? The Secure Hash Algorithm with the length extension property? The Secure Hash Algorithm with the length extension property that was specifically forbidden from the SHA-3 contestants because it creates implementation vulnerabilities in the real world? That SHA?

Also, how does one compare a cryptographic hash function core to an entire cryptographic protocol to produce a statement about the fallibility of crypto design?

Re:Google disables compression for OpenSSL in Chrome - SSL e... by tlb on Wednesday September 12, 2012 @12:04PM (#4511299)
You'd have the same problem if HTTP supported compression of the request headers & body. It's because it only supports compression of the response body that there isn't any leakage already.
Re:Google disables compression for OpenSSL in Chrome - SSL e... by caf on Wednesday September 12, 2012 @10:29PM (#4514475)
This is true, but it reinforces why the compression should not be done at the secure transport layer, and should instead be left to higher levels: only HTTP knows which parts of the request are potentially unsafe to include in the same compression state.

(Even if HTTP probably just got lucky here rather than deliberately making the right choice, it's still the only layer that had the chance to make the right choice).

Re:Google disables compression for OpenSSL in Chrome - SSL e... by tryeng on Wednesday September 12, 2012 @06:19PM (#4513567)
Compression itself in a cryptographic protocol is not the issue here. The problem starts when you let an attacker add chosen plain-text before or after the secret in the same compressed and encrypted stream.

Compression before encryption is not a problem if the sender is the only person that decides what is in the message to be sent. Compression doesn't make it vulnerable to chosen plain-text attacks either. Mixing victims's and attacker's data before compression and encryption will leak data, yes.

Re:Google disables compression for OpenSSL in Chrome - SSL e... by tptacek on Wednesday September 12, 2012 @06:35PM (#4513633)
This isn't true in theory or in practice.

In theory, protocols which fall to attacks when attackers have control of some of the message are said to be vulnerable to "chosen plaintext attacks" (if the attacker only gets 1 shot per message) or "adaptive chosen plaintext attacks" (if the attacker gets many bites at the same apple). Sound protocols don't have feasible adaptive chosen plaintext attacks.

In practice, most protocols can be coerced into carrying some data controlled by attackers. Sneaking some attacker-controlled data into a message is a very low bar for an attacker to clear.

It's true that content-controlled Javascript code makes it distinctively easy for an attacker to spirit their data into the plaintext, but don't let that confuse you. For the HTTPS/TLS cryptosystem to be sound, attackers can't use this property to decrypt the content they didn't add to the message.

Re:Google disables compression for OpenSSL in Chrome - SSL e... by zurn on Wednesday September 12, 2012 @11:57AM (#4511250)
The excuses I've heard for it include 1) can't do compression after the crypto, and 2) it reduces ciphertext available to attackers. SSH and PGP do it too.
Re:Google disables compression for OpenSSL in Chrome - SSL e... by tptacek on Wednesday September 12, 2012 @12:06PM (#4511309)
What it does is eliminate the structure of the plaintext. Lots of practical crypto implementation attacks depend on plaintext structure, especially in their most naive and straightforward implementations.

A conceptual purist like Colin Percival would argue, correctly, that if there's an attack against a cryptosystem that benefits from knowing the distribution of bytes in the plaintext, that's a damning statement about the cryptosystem itself.

But compression does "break" some exploits.

Re:Google disables compression for OpenSSL in Chrome - SSL e... by zimbatm on Wednesday September 12, 2012 @12:22PM (#4511411)
What's the issue with that ? Isn't it possible to design a compression algorithm that is efficient and less predictable at the same time ? Or is it more of a general concept that I don't know of ?
Re:Google disables compression for OpenSSL in Chrome - SSL e... by caf on Wednesday September 12, 2012 @10:33PM (#4514497)
It's because compression inherently creates a side-channel: the size of the message is now a function of the plaintext contents.