Re: [TLS] SSH channel handbrake (Re: Multi-Threaded Applications over TLS)

Peter Gutmann <pgut001@cs.auckland.ac.nz> Thu, 23 April 2009 06:37 UTC

Return-Path: <pgut001@cs.auckland.ac.nz>
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 EC1543A67AE for <tls@core3.amsl.com>; Wed, 22 Apr 2009 23:37:14 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -6.012
X-Spam-Level:
X-Spam-Status: No, score=-6.012 tagged_above=-999 required=5 tests=[AWL=0.587, BAYES_00=-2.599, RCVD_IN_DNSWL_MED=-4]
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 lyPY+3rEMdCh for <tls@core3.amsl.com>; Wed, 22 Apr 2009 23:37:13 -0700 (PDT)
Received: from mailhost.auckland.ac.nz (moe.its.auckland.ac.nz [130.216.12.35]) by core3.amsl.com (Postfix) with ESMTP id 59C7C3A6945 for <tls@ietf.org>; Wed, 22 Apr 2009 23:37:11 -0700 (PDT)
Received: from localhost (localhost.localdomain [127.0.0.1]) by mailhost.auckland.ac.nz (Postfix) with ESMTP id 3290B170851; Thu, 23 Apr 2009 18:38:28 +1200 (NZST)
X-Virus-Scanned: by amavisd-new at mailhost.auckland.ac.nz
Received: from mailhost.auckland.ac.nz ([127.0.0.1]) by localhost (moe.its.auckland.ac.nz [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id shnGPS1KNHhT; Thu, 23 Apr 2009 18:38:28 +1200 (NZST)
Received: from iris.cs.auckland.ac.nz (iris.cs.auckland.ac.nz [130.216.33.152]) by mailhost.auckland.ac.nz (Postfix) with ESMTP id 66E75170736; Thu, 23 Apr 2009 18:38:23 +1200 (NZST)
Received: from wintermute01.cs.auckland.ac.nz (wintermute01.cs.auckland.ac.nz [130.216.34.38]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by iris.cs.auckland.ac.nz (Postfix) with ESMTP id 7CC60E0808A; Thu, 23 Apr 2009 18:38:17 +1200 (NZST)
Received: from pgut001 by wintermute01.cs.auckland.ac.nz with local (Exim 4.63) (envelope-from <pgut001@wintermute01.cs.auckland.ac.nz>) id 1LwsZd-0005N8-Bi; Thu, 23 Apr 2009 18:38:17 +1200
From: Peter Gutmann <pgut001@cs.auckland.ac.nz>
To: Nicolas.Williams@sun.com, pgut001@cs.auckland.ac.nz
In-Reply-To: <20090421155800.GG1500@Sun.COM>
Message-Id: <E1LwsZd-0005N8-Bi@wintermute01.cs.auckland.ac.nz>
Sender: pgut001 <pgut001@cs.auckland.ac.nz>
Date: Thu, 23 Apr 2009 18:38:17 +1200
Cc: tls@ietf.org
Subject: Re: [TLS] SSH channel handbrake (Re: Multi-Threaded Applications over TLS)
X-BeenThere: tls@ietf.org
X-Mailman-Version: 2.1.9
Precedence: list
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, 23 Apr 2009 06:37:15 -0000

Nicolas Williams <Nicolas.Williams@sun.com> writes:

>I don't believe that handbrake exists other than as an implementation
>artifact.

I agree, it's purely an implementation artefact.  On the other hand security
bugs in software don't exist other than as implemetation artefacts either, but
they're not going to go away if you ignore them.  The problem in this case
it's that it's a design for which the straightforward implementation (and even
many not-so-straightforward ones) produce very bad performance, and you need a
very carefully designed and coded implementation, and preferably the same one
at both ends of the link, to avoid problems.

>It's perfectly reasonable to have large channel windows, and even to grow the
>channel windows so as to avoid having to ever wait for an ACK.

No, that doens't work either, because my implementation does it and other 
implementations break in various unuusal ways once the window gets too large 
(there's a particular error message from OpenSSH which I can't recall at the 
moment that you can google for to see that other implementations run into the 
same problem).  More implementation artefacts there.

>The HPN OpenSSH patches don't make the window that dynamic, IIRC, but they do
>make it dynamic and get better performance, thus proving the point.

OTOH simply setting a huge-size window (assuming you don't run into one of the
implementations that exhibit artefacts :-) has the same effect.

The real problem though is that this is a fundamentally unsound design.  If
you put in a considerable amount of time and effort and whatever's at the
other end has done the same and if you're lucky enough, it won't be so bad,
but the default leads to quite poor performance.  From the SSH experience,
most implementations are going down the default path...

Peter.