Re: [TLS] simplistic renego protection

Michael D'Errico <mike-list@pobox.com> Tue, 17 November 2009 16:24 UTC

Return-Path: <mike-list@pobox.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 A3C243A6767 for <tls@core3.amsl.com>; Tue, 17 Nov 2009 08:24:32 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.46
X-Spam-Level:
X-Spam-Status: No, score=-2.46 tagged_above=-999 required=5 tests=[AWL=0.139, BAYES_00=-2.599]
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 mhMJ6Ggh5KCD for <tls@core3.amsl.com>; Tue, 17 Nov 2009 08:24:31 -0800 (PST)
Received: from sasl.smtp.pobox.com (a-pb-sasl-sd.pobox.com [64.74.157.62]) by core3.amsl.com (Postfix) with ESMTP id 735833A6774 for <tls@ietf.org>; Tue, 17 Nov 2009 08:24:31 -0800 (PST)
Received: from sasl.smtp.pobox.com (unknown [127.0.0.1]) by a-pb-sasl-sd.pobox.com (Postfix) with ESMTP id CE2D09FB69 for <tls@ietf.org>; Tue, 17 Nov 2009 11:24:29 -0500 (EST)
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=pobox.com; h=message-id :date:from:mime-version:to:subject:references:in-reply-to :content-type:content-transfer-encoding; s=sasl; bh=jxusXo8m08OF 98wMPXZoyNFrE9U=; b=BmDTYOMg2zYLnvcatm2CZZaIwK0VVzjBelDC70kHXe82 JLB0ZKpmbpdWeAfwTNExiX1hsqfaoQqA7N1ndXM7cYw6LuBmkoZ29vvwNAIadRLQ eGRx0JQJOY+zeLxoXzH8UBLLtxaE7P97QyJUHrmGQuMOH2sD3qnA3LpIZY8zGN8=
DomainKey-Signature: a=rsa-sha1; c=nofws; d=pobox.com; h=message-id:date :from:mime-version:to:subject:references:in-reply-to :content-type:content-transfer-encoding; q=dns; s=sasl; b=LwoKQH taWBzXaBfHFjDKgHyTFpIDIDgDlCUTCbKjLcvpdelffq4rIl0kPc8eY1SvD69vGw Krpp7mso55hs64nxytkhRVFa02nzve8RUuKYRs+IhYSyy+PbRUi4YzrqxSYH/VlI 7ZGtSF4ZMnNg44zhzmTJUwxAZJXlhmkZeR0vI=
Received: from a-pb-sasl-sd.pobox.com (unknown [127.0.0.1]) by a-pb-sasl-sd.pobox.com (Postfix) with ESMTP id CA4319FB68 for <tls@ietf.org>; Tue, 17 Nov 2009 11:24:29 -0500 (EST)
Received: from administrators-macbook-pro.local (unknown [24.234.114.35]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by a-pb-sasl-sd.pobox.com (Postfix) with ESMTPSA id 5E23A9FB67 for <tls@ietf.org>; Tue, 17 Nov 2009 11:24:29 -0500 (EST)
Message-ID: <4B02CE81.1000607@pobox.com>
Date: Tue, 17 Nov 2009 08:25:37 -0800
From: Michael D'Errico <mike-list@pobox.com>
User-Agent: Thunderbird 2.0.0.23 (Macintosh/20090812)
MIME-Version: 1.0
To: tls@ietf.org
References: <200911161725.nAGHPWaA014181@fs4113.wdf.sap.corp> <089F31C221374096B0FE619F@446E7922C82D299DB29D899F> <4B02A084.9030903@cs.tcd.ie>
In-Reply-To: <4B02A084.9030903@cs.tcd.ie>
Content-Type: text/plain; charset="ISO-8859-1"; format="flowed"
Content-Transfer-Encoding: 7bit
X-Pobox-Relay-ID: AE6FCA14-D395-11DE-B1F7-EF34BBB5EC2E-38729857!a-pb-sasl-sd.pobox.com
Subject: Re: [TLS] simplistic renego protection
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: Tue, 17 Nov 2009 16:24:32 -0000

Stephen Farrell wrote:
> 
> Chris Newman wrote:
>> --On November 16, 2009 18:25:32 +0100 Martin Rex <mrex@sap.com> wrote:
>>> But when a proposal enters the IETF process, the IETF and the
>>> working group should discuss it based on its technical merits.
>> The IETF is about rough consensus and running code.  Technical merit is
>> one aspect of that.  Time to market can be important.  Technical
>> maturity of the specification can be important.  The best or perfect
>> proposal often takes longer to develop than the good enough proposal and
>> thus loses.  Just look at how badly HTTP is designed when it comes to
>> authentication -- but it was good enough to standardize.  The HTTP
>> Next-Generation working group failed because HTTP is good enough.
>>
>> draft-rescorla-tls-renegotiation-00 already has lots of running code;
>> and that's a traditional IETF litmus test that correctly makes
>> alternative proposals far less attractive.
> 
> Having watched the recent list traffic I find the above convincing.
> I'd love to see a -01 of the above containing the changes EKR has
> mentioned already, and then a WGLC on that.

I went back and re-read all his messages and the only change EKR
suggested was to use a magic cipher suite *only as a fallback* if
an initial attempt to use RI failed.  All other suggestions did not
convince him to make any changes.  I could be wrong, but that is
how the messages read.

Plus I've pointed out that RI does not protect the combination of a
lenient client and lenient server!  This is a severe drawback since
patched peers are still vulnerable during the transition period
where some servers remain lenient (allow current insecure
renegotiation).  The following fixes that since there is no fallback
needed and no reason for a client to not signal its support in every
handshake.

The whole point of RI is to get the previous handshake's verify_data
into the handshake messages of the current session.  This can be
done without extensions and does not require any fallback logic.

You just need three things:

   1) a client-to-server signal
   2) a server-to-client signal
   3) somehow incorporate the previous verify_data in the handshake

(1) can be achieved by simply incorporating a magic cipher suite in
the ClientHello.  Since that is the *only* change to the handshake,
it has zero possible interoperability problems.  Extensions are
known to be problematic; web browsers have extremely complicated
logic including reconnecting and falling back to not using extensions
to try to accommodate the various server implementations.  This magic
cipher suite signal would be used in all handshakes since it can not
cause any problems.  Existing browser fallback logic would not get
any more complicated.

(2) can be done many ways but I think Martin came up with a better
idea than the alert message I proposed.  It is to toggle the upper
bit of the low-order byte of the version in the ServerHello.  For
SSLv3, 0x0300 would become 0x0380; TLS 1.0, 0x0301 would become 0x0381,
etc.  This is forward-compatible too; the next version of TLS would
be 4.0, 0x0400.  This signal would be used in all handshakes from
SSLv3 through TLS 1.2.  The version in the record layer would NOT
change.

(3) can be done in a variety of ways.  RI sends the data over the
wire, but this is unnecessary since both the client and server know
it already.  EKR doesn't like the idea of a "virtual" handshake
message, but this is an easier way to incorporate the data than
requiring changes to three PRF computations (SSLv3, TLS 1.0/1.1, and
TLS 1.2).

I'm open to suggestions for a better (3) or even better (1) and (2),
though those seem sufficiently simple.

Mike