Re: [TLS] Security concerns around co-locating TLS and non-secure

Martin Rex <mrex@sap.com> Thu, 11 November 2010 22:45 UTC

Return-Path: <mrex@sap.com>
X-Original-To: tls@core3.amsl.com
Delivered-To: tls@core3.amsl.com
Received: from localhost (localhost [127.0.0.1]) by core3.amsl.com (Postfix) with ESMTP id D5A503A6A33 for <tls@core3.amsl.com>; Thu, 11 Nov 2010 14:45:50 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -8.152
X-Spam-Level:
X-Spam-Status: No, score=-8.152 tagged_above=-999 required=5 tests=[AWL=-1.891, BAYES_00=-2.599, FRT_STOCK2=3.988, HELO_EQ_DE=0.35, RCVD_IN_DNSWL_HI=-8]
Received: from mail.ietf.org ([64.170.98.32]) by localhost (core3.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id vdFlAAmEpIqA for <tls@core3.amsl.com>; Thu, 11 Nov 2010 14:45:49 -0800 (PST)
Received: from smtpde02.sap-ag.de (smtpde02.sap-ag.de [155.56.68.140]) by core3.amsl.com (Postfix) with ESMTP id 921833A6452 for <tls@ietf.org>; Thu, 11 Nov 2010 14:45:49 -0800 (PST)
Received: from mail.sap.corp by smtpde02.sap-ag.de (26) with ESMTP id oABMkIJ0001082 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Thu, 11 Nov 2010 23:46:18 +0100 (MET)
From: Martin Rex <mrex@sap.com>
Message-Id: <201011112246.oABMkHI5018216@fs4113.wdf.sap.corp>
To: Nicolas.Williams@oracle.com
Date: Thu, 11 Nov 2010 23:46:17 +0100
In-Reply-To: <20101109212541.GL6536@oracle.com> from "Nicolas Williams" at Nov 9, 10 03:25:41 pm
MIME-Version: 1.0
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit
X-Scanner: Virus Scanner virwal07
X-SAP: out
Cc: tls@ietf.org
Subject: Re: [TLS] Security concerns around co-locating TLS and non-secure
X-BeenThere: tls@ietf.org
X-Mailman-Version: 2.1.9
Precedence: list
Reply-To: mrex@sap.com
List-Id: "This is the mailing list for the Transport Layer Security working group of the IETF." <tls.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/listinfo/tls>, <mailto:tls-request@ietf.org?subject=unsubscribe>
List-Archive: <http://www.ietf.org/mail-archive/web/tls>
List-Post: <mailto:tls@ietf.org>
List-Help: <mailto:tls-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/tls>, <mailto:tls-request@ietf.org?subject=subscribe>
X-List-Received-Date: Thu, 11 Nov 2010 22:45:50 -0000

Michael D'Errico wrote:
> - what do you mean by expensive?  Google has published research results
> showing that enabling TLS on their services required no more/different
> hardware than they were using prior to switching on TLS.

They were probably comparing apples and oranges plus their specific
application is absolutely no indicator how much of an impact this
would have on _other_ applications.

When I heard this the first time, I quickly tried searching via
the orange https://www.google.com and immediately noticed the
difference to the Web-2.0 http://www.google.com apple that
ping-pongs every keypress.


> 
> > The figure I heard second-hand from some large non-financial web
> > sites that use TLS for logon, but then switch back to HTTP for the
> > rest of the session (and thus have been subject to the FireSheep
> > plugin) is that keeping TLS on for the whole session would increase
> > the size of their server farm by 10%. I find it incredible that e.g.
> > RC4 + HMAC would add 10% in this day of multi-core, but there you
> > have it.
> 
> I suspect the issue is that session resumption is generally not feasible
> due to a) lack of implementation of session resumption without
> server-side state, b) the need to cluster services making it difficult
> to share server-side session resumption state.  Which would mean that
> every TLS connection involves public key operations.

For those services that use either a NAT or DNS-A-round-robin load
balancing, TLS session caching might be an issue.  Especially
when clients are still using HTTP 1.0 (i.e. no keep-alive), like
when they're behind a proxy and use HTTP/1.0 by default for proxy
traversal -- which appears to be the default for a certain (huge)
installed base...

Trying to load off server state on the client as a TLS session cookie
might not be a solution for many scenarios, because it is simply not
available in many implementations and the server-side state might
be "huge" whereas the communication frequency and message size
might be tiny -- which easily results in a _magnitude_ higher load
when switching from HTTP to HTTPS.


Another issue might be poor application design -- which is not
necessarily obvious to "apps folks", when the server app is
performing HUGE amounts of small network writes, but didn't
use setsockopt(TCP_NODELAY) -- so that the Nagle algorithm
has been covertly easing the resulting pain for the network.


If such an app or web server plugin is suddenly called over TLS/HTTPS,
the performance impact as well as the increase in network bandwidth
might be even more than the order of one magnitude, because most SSL
APIs will produce SSL records for every single write call.
I've seen that happening -- and was disappointed how painful
and slow the education of application programmers progressed
in paying more attention to such design issues and fixing them.

In the case I encountered, it was a Microsoft IIS plugin producing
a dynamic HTML page full of javascript with context-sensitive contents
of drop-down boxes.  Originally the IIS reply was 97 distinct
SSL records to deliver only 3500 bytes.  After educating the
apps developers and fixing the app, the exact record boundaries
and number of records varied, 25-27 distinct records for 3500 bytes,
a fragmentation that seemed to be caused by IIS itself.


I've recently encountered similarily questionable behaviour
from a smartphone app, where a _picture_ upload to a TLS server
uses SSL records with 1320 bytes max.  That is the kind of
stuff that impacts your server's performance by more than 10%.


-Martin