Re: [TLS] Quest for Unified Solution to TLS Renegotiation

Marsh Ray <marsh@extendedsubset.com> Wed, 25 November 2009 21:37 UTC

Return-Path: <marsh@extendedsubset.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 C1D5D3A6950 for <tls@core3.amsl.com>; Wed, 25 Nov 2009 13:37:46 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.163
X-Spam-Level:
X-Spam-Status: No, score=-2.163 tagged_above=-999 required=5 tests=[AWL=-0.164, BAYES_00=-2.599, J_CHICKENPOX_55=0.6]
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 gO5483zq7JC7 for <tls@core3.amsl.com>; Wed, 25 Nov 2009 13:37:45 -0800 (PST)
Received: from mho-02-ewr.mailhop.org (mho-02-ewr.mailhop.org [204.13.248.72]) by core3.amsl.com (Postfix) with ESMTP id D4C563A6921 for <tls@ietf.org>; Wed, 25 Nov 2009 13:37:45 -0800 (PST)
Received: from xs01.extendedsubset.com ([69.164.193.58]) by mho-02-ewr.mailhop.org with esmtpa (Exim 4.68) (envelope-from <marsh@extendedsubset.com>) id 1NDPYS-000MgO-Ia; Wed, 25 Nov 2009 21:37:40 +0000
Received: from [127.0.0.1] (localhost [127.0.0.1]) by xs01.extendedsubset.com (Postfix) with ESMTP id 84387603A; Wed, 25 Nov 2009 21:37:39 +0000 (UTC)
X-Mail-Handler: MailHop Outbound by DynDNS
X-Originating-IP: 69.164.193.58
X-Report-Abuse-To: abuse@dyndns.com (see http://www.dyndns.com/services/mailhop/outbound_abuse.html for abuse reporting information)
X-MHO-User: U2FsdGVkX18FuCRaOlKdSi+9TJBTDo7fyEalpfGTPfM=
Message-ID: <4B0DA3A0.5000805@extendedsubset.com>
Date: Wed, 25 Nov 2009 15:37:36 -0600
From: Marsh Ray <marsh@extendedsubset.com>
User-Agent: Thunderbird 2.0.0.23 (Windows/20090812)
MIME-Version: 1.0
To: Michael D'Errico <mike-list@pobox.com>
References: <4B0D9B94.9080205@pobox.com>
In-Reply-To: <4B0D9B94.9080205@pobox.com>
X-Enigmail-Version: 0.96.0
OpenPGP: id=1E36DBF2
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 7bit
Cc: TLS Working Group <tls@ietf.org>
Subject: Re: [TLS] Quest for Unified Solution to TLS Renegotiation
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: Wed, 25 Nov 2009 21:37:46 -0000

Michael D'Errico wrote:
> I think that it would be good to find a unified solution that
> everybody is happy with, and believe that this may be it:
> 
>   1) Client-to-Server signalling can be done in either of
>      two ways:
> 
>      A) an empty Secure_Renegotiation (SR) extension, or
>      B) a "magic" cipher suite
> 
>   2) Server-to-Client signal is always an empty SR extension
> 
>   3) Incorporate previous verify_data into Finished calc.

I like it!

> The particulars:
> 
> A client that currently sends any other extensions MUST also
> send the empty SR extension.

Is the server's behavior defined if he does not? E.g. alert message,
terminate, format C: /y, etc.

Wouldn't a robust implementation have to look out for that condition anyway?

Does this requirement amount to "this will never happen so you don't
have to bother testing for it (until your product hits the net)"?

> A client that currently does not send any extensions MAY send
> the empty SR extension, or MAY send the magic cipher suite.

Can he send both (is the 'or' inclusive)? What happens when the server
receives both?

Can a patched client send neither?

> In response to either 1A or 1B, the server responds with an
> empty SR extension.

The (patched) server MUST respond with ...

If the server does not respond with the extension the client MAY,
depending on external configuration, elect to continue the handshake
insecurely, or alert+abort (specifics).

The client SHOULD check that the extension_data is in fact empty (i.e.,
just its two length bytes of 00 00), and alert+aborting if not.

> The only ugliness is this apparently-
> unsolicited extension returned by the server in response to
> the magic cipher suite. I used to be against this, but have
> since decided that it is no more ugly than flipping a version
> bit or any of the other ideas.

RFC 4346 (TLS 1.1) (and earlier versions)
http://tools.ietf.org/html/rfc4346#section-7.4.1.3
says Server Hello doesn't have extensions at all, yet it is updated by
RFC 4366 which adds them. What we are doing is no different AFAICT.

> It remains to be decided if adding the verify_data to the
> handshake message stream is the right way to do (3), or if
> changing the PRF in some way is better, such as changing the
> seed to be the handshake message hash appended with the old
> verify_data, or some other method.

I think most people are comfortable with that approach.

Suggestions:

This extension applies equally to ALL handshakes on a single connection
regardless of whether they are an initial handshake or a renegotiation.

Client and server MUST negotiate the use of SR in the same manner
(including the choice of magic ciphersuite or Client Hello extension)
for all handshakes on a single connection.

Clients and servers SHOULD detect the case where the other party has
inconsistently negotiated the use of (or not using) SR and immediately
discard buffered data and alert+abort.

> Benefits:
> 
> All versions including SSLv3 are fixed and able to renegotiate
> safely.

Hooray!

> This is entirely backward-compatible with SSLv3, even SSLv2
> ClientHello.  It is better than RI because when the magic
> cipher suite is used there, the server can not check the
> verify_data from the client (since it is not sent), so it
> can not renegotiate with those old clients at all.

Yippee!

> Using an empty extension is much more lightweight a use of
> extensions than RI since there is no need to pack the verify_
> data into it when sending, or to extract the data when
> receiving.

It saves 24 bytes in each direction!

> Clients that don't want to add full support for extensions do
> not need to -- they can just check for the existence of the
> empty SR extension which is a fixed 6-byte string.

Hard for anyone to complain about that, considering nobody was really
happy with the alternatives.

> I would fully support this "new"[*] solution.  Anybody else?

I support the solution!

Can we get the "bits on the wire" part drafted without unnecessary other
baggage?

- Marsh