Re: [TLS] simplistic renego protection

Nasko Oskov <noskov@microsoft.com> Tue, 17 November 2009 16:39 UTC

Return-Path: <noskov@microsoft.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 1F55B3A698D for <tls@core3.amsl.com>; Tue, 17 Nov 2009 08:39:07 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -10.599
X-Spam-Level:
X-Spam-Status: No, score=-10.599 tagged_above=-999 required=5 tests=[BAYES_00=-2.599, 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 8S2PfQwXED6P for <tls@core3.amsl.com>; Tue, 17 Nov 2009 08:39:06 -0800 (PST)
Received: from smtp.microsoft.com (mail3.microsoft.com [131.107.115.214]) by core3.amsl.com (Postfix) with ESMTP id 39E733A698C for <tls@ietf.org>; Tue, 17 Nov 2009 08:39:06 -0800 (PST)
Received: from TK5EX14MLTC102.redmond.corp.microsoft.com (157.54.79.180) by TK5-EXGWY-E803.partners.extranet.microsoft.com (10.251.56.169) with Microsoft SMTP Server (TLS) id 8.2.176.0; Tue, 17 Nov 2009 08:39:25 -0800
Received: from TK5EX14MLTW652.wingroup.windeploy.ntdev.microsoft.com (157.54.71.68) by TK5EX14MLTC102.redmond.corp.microsoft.com (157.54.79.180) with Microsoft SMTP Server id 14.0.639.20; Tue, 17 Nov 2009 08:39:01 -0800
Received: from TK5EX14MBXW653.wingroup.windeploy.ntdev.microsoft.com ([169.254.3.181]) by TK5EX14MLTW652.wingroup.windeploy.ntdev.microsoft.com ([157.54.71.68]) with mapi; Tue, 17 Nov 2009 08:39:01 -0800
From: Nasko Oskov <noskov@microsoft.com>
To: Michael D'Errico <mike-list@pobox.com>, "tls@ietf.org" <tls@ietf.org>
Thread-Topic: [TLS] simplistic renego protection
Thread-Index: AQHKZuHMGiEOTOvqREmP25vm9DLXVpE6Lr6AgACX+ACAADbTgP//fVpw
Date: Tue, 17 Nov 2009 16:38:09 +0000
Deferred-Delivery: Tue, 17 Nov 2009 16:39:00 +0000
Message-ID: <B197003731D4874CA41DE7B446BBA3E829CC8286@TK5EX14MBXW653.wingroup.windeploy.ntdev.microsoft.com>
References: <200911161725.nAGHPWaA014181@fs4113.wdf.sap.corp> <089F31C221374096B0FE619F@446E7922C82D299DB29D899F> <4B02A084.9030903@cs.tcd.ie> <4B02CE81.1000607@pobox.com>
In-Reply-To: <4B02CE81.1000607@pobox.com>
Accept-Language: en-US
Content-Language: en-US
X-MS-Has-Attach:
X-MS-TNEF-Correlator:
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: quoted-printable
MIME-Version: 1.0
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:39:07 -0000

Michael D'Errico wrote:
>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.

It was indicated that some implementations use random value for the
timestamp part of the random values exchanged. If this is correct and there
are no interop issues with it, then we can use the timestamp as place to
include a few bits as well. If we reserve the top 4 bit of the most
significant byte, we can set them to predefined values to signal what we
want. The side effect will be forwarding time enough in the future to allow
us to move a newer version of the protocol:

$ date -d @`echo "ibase=16; F0000000" | bc`
Mon Aug  5 01:04:00 PST 2097
$ date -d @`echo "ibase=16; E0000000" | bc`
Tue Feb  1 03:39:44 PST 2089

The benefit of using the timestamp is that it will be the same signal both
ways. We don't have to alternate between cipher suites and other methods on
the other way. I believe this will also be easier to implement, since new
alert messages and unexpected server extensions will requre a lot more code
change and case specific logic.

Using two values allows both client and server to maintain the calculation
of the finished message intact, but have knowledge if the handshake is
expected to be initial or renegotiated. If expectations don't match,
handshaking is terminated.

Just an idea for signaling, since we are enumerating ideas.

Nasko