Overclocking SSL
imperialviolet.org
imperialviolet.org
Can somebody please explain what this means. Sounds bad!
If an attacker records the traffic, then factors or steals the public key, they can decrypt the session key and read the traffic.
With ephemeral Diffie-Hellman, a random DH public value is generated for each connection and the server signs it with its public key. Each side then performs key agreement to generate the session key. Now, an attacker can solve the discreet logarithm and decrypt the traffic, but they have to break each connection separately.
The trick in the future is to perform Diffie-Hellman much faster (answer: write tuned code to work in an elliptic curve group) and then to perform EDH without the latency hit (longer term).
I think snap start would work for resuming connections that were originally started with (EC)DHE key exchange. And, with an optimal OCSP stapling + snap start configuration, the only types of handshakes that would be done would be full non-snap-start handshakes (with OCSP responses stapled to them) and snap start resuming handshakes. This leads me to believe that snap start only needs to be defined for the resuming case; if snap start full handshakes are happening then it means something needs to be improved w.r.t. OCSP response caching. I believe this would make snap start much simpler.
Coincidentally, I was just working on reducing memory consumption in NSS, probably very similar to the way that you reduced it in OpenSSL. I am curious as to why Google is doing its optimizations for servers using OpenSSL and for clients using NSS. What makes NSS less suitable for servers than OpenSSL?
The latency implications of DHE are a problem: it pretty much requires an extra round trip. As you mention, we could amortise that over several connections using resumption, and we might well do that. We can also do SSL connection pre-warming to get rid of the latency issues. We have lots of ideas, but not an army of people working on them I'm afraid :)
To answer your other question: our use of different SSL libraries on the client and server side are largely historical. Having said that, OpenSSL is easier to hack away on. Personally, I find that, at the small scale, NSS code is cleaner. However, on the larger scale OpenSSL wins. Once I get past the insane OpenSSL code style, I prefer hacking on OpenSSL.
With RSA key exchange, if somebody ever gets your RSA private key, they can decrypt all past and future traffic that was protected with that key. With ephemeral Diffie-Hellman key exchange, even with the RSA private key, they cannot decrypt that past and future traffic, because each session has its own unique encryption keys that are independent of the RSA keys. They can only impersonate you to intercept future traffic, and only if they set up a MITM attack, but that kind of active attack is MUCH harder to execute (especially undetected) than the passive attacks that RSA key exchange allows. And, again, it doesn't allow them to decrypt past traffic at all.
This advantage of ephemeral key exchange is called "perfect forward secrecy."
For example, let's say you are a dictator and you want to decrypt some encrypted GMail sessions you suspect were done by dissidents in your country last month. If those sessions were done with RSA key exchange, you could steal the RSA private key from Google today (admittedly a very difficult task) and then decrypt those past sessions. If (EC)DHE key exchange was used, it would be practically impossible (no exaggeration) to ever decrypt them.
Speaking for those of us living with long-latency links to the US (South Africa), unnecessary HTTPS on websites is a major PITA.