News for hackers. Stuff that matters.
Re:False Start: Google proposal reduces SSL handshake to sin... by Matt_Cutts on Thursday May 19, 2011 @07:22PM (#2565735)
I love this. More info in the Google blog post: http://blog.chromium.org/2011/05/ssl-falsestart-performance-...
Re:False Start: Google proposal reduces SSL handshake to sin... by gwern on Friday May 20, 2011 @10:29AM (#2567776)
> To answer this question, we compiled a list of all known https websites from the Google index, and tested SSL FalseStart with all of them. The result of that test was encouraging: 94.6% succeeded, 5% timed out, and 0.4% failed. The sites that timed out were verified to be sites that are no longer running, so we could ignore them.

It's nifty being a Googler.

Re:False Start: Google proposal reduces SSL handshake to sin... by pbiggar on Friday May 20, 2011 @11:07AM (#2567947)
Very funky to have a list of "all known https sites"
Re:False Start: Google proposal reduces SSL handshake to sin... by emily37 on Thursday May 19, 2011 @09:58PM (#2566099)
Google also has a proposal called Snap Start that reduces the handshake to zero round trips when the browser has performed a full handshake with the server in the past: http://tools.ietf.org/id/draft-agl-tls-snapstart-00.html. It's much more complex and requires adoption in both servers and browsers so I don't think they're working on it anymore, but maybe someday.

Certificate validation can be even more of a bottleneck than RTTs to the server; I worked on a paper that's in submission where we gathered OCSP response times in the wild, and median times for some responders were as high as 500ms.

Re:False Start: Google proposal reduces SSL handshake to sin... by cagenut on Thursday May 19, 2011 @07:56PM (#2565825)
Hah, when they say "only a handful of vendors" that includes load balancer vendors like F5 and A10, which truckloads of ecommerce sites rely on for ssl offload. Its a simple code update to fix, but I remember doing a 4am loadbalancer reboot when my CTO's chrome auto-updated and all of a sudden he couldn't get to our https stuff (the important stuff).
Re:False Start: Google proposal reduces SSL handshake to sin... by illumin8 on Thursday May 19, 2011 @10:42PM (#2566195)
Interesting - we use F5 load balancers for SSL offload, as do a huge percentage of the interwebs. If F5 didn't support False Start, I suspect a good deal more than 0.4% of the SSL websites would be affected.

Do you think maybe it's something like an older version of F5 BigIP firmware that doesn't support False Start?

Re:False Start: Google proposal reduces SSL handshake to sin... by cagenut on Thursday May 19, 2011 @10:48PM (#2566207)
Yea thats what I meant by 'simple code update'. All the vendors have long since put out fixes.
Re:False Start: Google proposal reduces SSL handshake to sin... by killerswan on Friday May 20, 2011 @03:44AM (#2566831)
No surprise there: the faster SSL gets, the more people will want to buy F5 and others to simplify deployment of it.
Re:False Start: Google proposal reduces SSL handshake to sin... by StavrosK on Thursday May 19, 2011 @07:06PM (#2565694)
This is potentially huge. SSL latency is a big issue when you want to make your site load faster, and this would basically eliminate the biggest reason to not turn SSL on. If this becomes standard, I can't see any of my sites, at least, using plain HTTP by default.
Re:False Start: Google proposal reduces SSL handshake to sin... by drivebyacct2 on Thursday May 19, 2011 @07:17PM (#2565721)
I thought that SSL latency (and additional server load) was due to encryption overhead, not the handshake.
Re:False Start: Google proposal reduces SSL handshake to sin... by brown9-2 on Thursday May 19, 2011 @08:56PM (#2565983)
Take a look at this article which measures handshake latency versus encryption latency, it's very well-written: http://www.semicomplete.com/blog/geekery/ssl-latency.html :

Anyway. The point is, no matter how fast your SSL accelerators (hardware loadbalancer, etc), if your SSL end points aren't near the user, then your first connect will be slow. As shown above, 22ms for the crypto piece of SSL handshake, which means 300ms of the SSL portion above was likely network latency and some other overhead.

Once SSL is established, though, it switches to a block cipher (3DES, etc) which is much faster and the resource (network, cpu) overhead is pretty tiny by comparison.

Summarizing from above: Using SSL incurs a 3.5x latency overhead for each handshake, but afterwards it's generally fast like plain TCP. If you accept this conclusion, let's examine how this can affect website performance.

Re:False Start: Google proposal reduces SSL handshake to sin... by dangrossman on Thursday May 19, 2011 @07:31PM (#2565763)
Compared to an extra 100-1000 millisecond trip each way to communicate between the browser and the server during the handshake, the CPU time to do the encryption is nothing.
Re:False Start: Google proposal reduces SSL handshake to sin... by smithian on Thursday May 19, 2011 @07:37PM (#2565776)
Where in the world are you getting 1000 ms rtt's? Sat link?
Re:False Start: Google proposal reduces SSL handshake to sin... by rtomayko on Thursday May 19, 2011 @08:05PM (#2565857)
Best case you have to do three RTs for a full SSL handshake (without false start anyway), so a RTT of 300ms will bring you pretty close to that 1000ms. We (github.com) certainly have average 1000ms SSL handshakes in Asia -- we're 5 RTs for an SSL handshake presently. It's extremely annoying.
Re:False Start: Google proposal reduces SSL handshake to sin... by smithian on Thursday May 19, 2011 @09:30PM (#2566039)
Sure, I manage servers in the US, Japan and Australia so I'm well acquainted with how latency sucks. I was questioning the idea that there was a possibility of "an extra 100-1000 millisecond trip each way" - Taken literally, this would mean up to a 2000ms RTT (1000 ms each way). I get ~230ms RTT between Sydney and NYC, and 320 from Sydney to Hamburg going around the wrong way. for reference, 2000 ms is 74% of the RTT to the moon.
Re:False Start: Google proposal reduces SSL handshake to sin... by phillmv on Thursday May 19, 2011 @10:41PM (#2566192)
Oh, I would argue that latency often has no correlation to distance.
Re:False Start: Google proposal reduces SSL handshake to sin... by smithian on Thursday May 19, 2011 @11:46PM (#2566309)
When you're talking about SSL handshakes, where else is the latency going to come from?
Re:False Start: Google proposal reduces SSL handshake to sin... by TeMPOraL on Friday May 20, 2011 @04:10AM (#2566900)
Re:False Start: Google proposal reduces SSL handshake to sin... by InclinedPlane on Thursday May 19, 2011 @08:21PM (#2565904)
Not everyone lives within a few hundred miles of the web server they're using.
Re:False Start: Google proposal reduces SSL handshake to sin... by yuhong on Thursday May 19, 2011 @09:34PM (#2566050)
Not to mention the WildBlue etc satellite Internet often used in rural areas.
Re:False Start: Google proposal reduces SSL handshake to sin... by saranagati on Thursday May 19, 2011 @08:22PM (#2565909)
the ssl handshake latency isn't why sysadmins don't want to implement everything over https. the reason (or at least 5 years ago when sysadmin was my primary role) is because the additional cpu power it takes to encrypt all the data is huge.
Re:False Start: Google proposal reduces SSL handshake to sin... by rdl on Thursday May 19, 2011 @08:27PM (#2565918)
That's not really true now. CPUs have gotten faster, the speed of light has remained the same, and actually with users on crappy wireless/cell connections (and, increasingly, international), network latency is even more of an issue now.
Re:False Start: Google proposal reduces SSL handshake to sin... by dangrossman on Thursday May 19, 2011 @08:37PM (#2565950)
I don't think that's really the case anymore. CPUs have just gotten that much faster. I run a node.js server with https on Linode's cheapest VPS that handles hundreds of requests per second. The server load is at ~0.00 most of the day.
Re:False Start: Google proposal reduces SSL handshake to sin... by nessence on Thursday May 19, 2011 @09:45PM (#2566074)
This doesn't help adoption like the article suggests; what it does do is shave a few milliseconds and overhead off the initial connection which is great for thin or long pipes (low bandwidth or high latency). Otherwise, in contrast to the article's statement about SSL not being implemented because of the encryption overhead, false start doesn't change much.

The bigger picture is that false-start will make google's upcoming SPDY handshake faster too; then, because SPDY is a more aggressive with the initial connection (CWND, push support), the packets saved by false start are used to push content. Without false-start, an initial SPDY connection would be encumbered.

Re:False Start: Google proposal reduces SSL handshake to sin... by JeffRodriguez on Thursday May 19, 2011 @08:07PM (#2565866)
Google's been doing a lot of work on SSL performance for a while now:

http://www.imperialviolet.org/2010/06/25/overclocking-ssl.ht...

SSL everywhere!

Re:False Start: Google proposal reduces SSL handshake to sin... by sbierwagen on Thursday May 19, 2011 @06:57PM (#2565676)
Re:False Start: Google proposal reduces SSL handshake to sin... by jacques_chester on Thursday May 19, 2011 @07:47PM (#2565798)
Quickly eyeballing that Internet-Draft, here's the core change:

> If certain conditions are met, application data can be sent when the handshake is only partially complete ...

I'm surprised this hasn't be done before -- spammers have used this idea with SMTP for years, for example. Well done Messrs Langley, Modadugu and Moeller.

Re:False Start: Google proposal reduces SSL handshake to sin... by tptacek on Thursday May 19, 2011 @09:48PM (#2566079)
The integrity of the TLS handshake is one of the fundamental and most important promises the TLS protocol makes. This proposal overtly changes the security boundaries of that handshake. It is only because the shout-outs on this I-D are a who's-who of SSL/TLS design that this stands a decent chance at adoption.

TLS clients can do a bunch of different things, but, unlike in SMTP, where it's mostly reasonable to do whatever servers will let you get away with, both sides need to follow the protocol to the letter to make TLS do what it's supposed to do.

Re:False Start: Google proposal reduces SSL handshake to sin... by jacques_chester on Thursday May 19, 2011 @09:58PM (#2566102)
A wild security expert appears!

> This proposal overtly changes the security boundaries of that handshake.

Could you outline that in more detail?

Re:False Start: Google proposal reduces SSL handshake to sin... by tptacek on Thursday May 19, 2011 @11:01PM (#2566233)
You're no longer waiting for both sides to confirm (cryptographically) that they received the same handshake packets. A special mechanism (whitelisted ciphersuites) has to be introduced to ensure that a downgrader adversary can't trick a client into coughing up weakly-encrypted application data by mucking with the handshake.
Re:False Start: Google proposal reduces SSL handshake to sin... by pickettd on Saturday May 21, 2011 @10:32AM (#2570921)
The TLS handshake is to work out identities and exactly what type of encryption etc they want/support. Then before sending any actual data they encrypt a "Finished" message and both sides verify they can read the message. The server will only be able to create a correct "Finished" message if it has the private key to go along with the presented certificate.

It seems to me like the overt change in the handshake security boundary is that in a FalseStart handshake, a man-in-the-middle attacker can make the initiating side send application data encrypted with relatively arbitrary parameters (until the TLS implementation realizes it can't decrypt the final handshake message properly). There is a good chance this is just annoying (like, on a denial-of-service level of attack) but my intuition is there could be some application circumstances where this is a significant problem. Off the top of my head I can't come up with a specific example however - so I could just be imagining things :)

There are also operating system/application level architecture challenges as well. For example, I'm not sure the idea of FalseStart is compatible with the calling convention of Windows SSL/TLS (InitializeSecurityContext and AcceptSecurityContext) given the separation between transport layer and security context negotiation components. And because of that existing convention, the recommendation in sections 4 and 5 of the draft that "TLS implementations allow the application layer to query whether the handshake has completed" could be potentially tricky for applications using Schannel (Windows SSL/TLS).

"Creating an Schannel Security Context" : http://msdn.microsoft.com/en-us/library/aa374781(v=VS.85).as...

Re:False Start: Google proposal reduces SSL handshake to sin... by ivank on Thursday May 19, 2011 @08:29PM (#2565930)
The False Start blacklist, in case anyone else is curious: http://src.chromium.org/svn/trunk/src/net/base/ssl_false_sta... (about 4141 entries right now)
Re:False Start: Google proposal reduces SSL handshake to sin... by wmf on Thursday May 19, 2011 @08:49PM (#2565973)
Looks like Exchange and some SSL VPNs have a little standard compliance work to do.
Re:False Start: Google proposal reduces SSL handshake to sin... by tptacek on Thursday May 19, 2011 @09:50PM (#2566082)
From the TLS 1.2 RFC:

  The Finished message is the first one protected with the just
  negotiated algorithms, keys, and secrets.  Recipients of Finished
  messages MUST verify that the contents are correct.  Once a side
  has sent its Finished message and received and validated the
  Finished message from its peer, it may begin to send and receive
  application data over the connection.
Hard to blame the servers for this.
Re:False Start: Google proposal reduces SSL handshake to sin... by plasma on Thursday May 19, 2011 @07:52PM (#2565811)
I thought SSL pages/resources aren't cached like they would be normally under regular HTTP, so there would still be extra latency (for repeat visits) if you ever visited a website that required SSL everywhere (like say Github).

Or is my assumption wrong here?

Re:False Start: Google proposal reduces SSL handshake to sin... by briansmith on Thursday May 19, 2011 @11:27PM (#2566265)
This used to be true, but it isn't true any more on modern web browsers. In particular, Firefox improved its caching policies for HTTPS in version 4.
Re:False Start: Google proposal reduces SSL handshake to sin... by mike-cardwell on Friday May 20, 2011 @08:00AM (#2567286)
https content is generally only cached in memory by the browser.

But if the response contains a Cache-Control header that explicitly specifies that the content is public, it can be cached to disk, just like http content. Eg:

Cache-Control: public, max-age=86400

Re:False Start: Google proposal reduces SSL handshake to sin... by JeffRodriguez on Thursday May 19, 2011 @08:09PM (#2565871)
It's a browser configuration thing, but I think you're right about the default.

Maybe a more intelligent approach would be to use "don't cache" if the server doesn't specify any caching headers. Otherwise, follow the server's recommendation.

Re:False Start: Google proposal reduces SSL handshake to sin... by TeHCrAzY on Thursday May 19, 2011 @08:16PM (#2565890)
Its not something that could be changed from the current "default" without high risk of big impact.

There would be need to introduce a new header to trigger SSL based caching, and migrate towards simply not sending the old/normal cache header.

Re:False Start: Google proposal reduces SSL handshake to sin... by TeHCrAzY on Thursday May 19, 2011 @08:18PM (#2565899)
You can see the direct result of that: lots of ajax'y functionality, and the reduction of full page refreshes.
Re:False Start: Google proposal reduces SSL handshake to sin... by Joakal on Thursday May 19, 2011 @07:57PM (#2565831)
Would this eliminate the need for SSL caches? [0]

[0] http://wiki.nginx.org/HttpSslModule