Re: [TLS] Protected Renegotiation -- refined proposal

Martin Rex <mrex@sap.com> Sun, 15 November 2009 01: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 EEAA93A68ED for <tls@core3.amsl.com>; Sat, 14 Nov 2009 17:45:07 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -6.178
X-Spam-Level:
X-Spam-Status: No, score=-6.178 tagged_above=-999 required=5 tests=[AWL=0.071, BAYES_00=-2.599, HELO_EQ_DE=0.35, 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 YPCHCqX7EnWc for <tls@core3.amsl.com>; Sat, 14 Nov 2009 17:45:07 -0800 (PST)
Received: from smtpde01.sap-ag.de (smtpde01.sap-ag.de [155.56.68.171]) by core3.amsl.com (Postfix) with ESMTP id AC5EA3A685A for <tls@ietf.org>; Sat, 14 Nov 2009 17:45:06 -0800 (PST)
Received: from mail.sap.corp by smtpde01.sap-ag.de (26) with ESMTP id nAF1jaJg020447 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sun, 15 Nov 2009 02:45:36 +0100 (MET)
From: Martin Rex <mrex@sap.com>
Message-Id: <200911150145.nAF1jZEf017404@fs4113.wdf.sap.corp>
To: ekr@networkresonance.com
Date: Sun, 15 Nov 2009 02:45:35 +0100
In-Reply-To: <20091114074136.3BFB969F59C@kilo.networkresonance.com> from "Eric Rescorla" at Nov 14, 9 09:41:31 am
MIME-Version: 1.0
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit
X-Scanner: Virus Scanner virwal05
X-SAP: out
Cc: tls@ietf.org
Subject: Re: [TLS] Protected Renegotiation -- refined proposal
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: Sun, 15 Nov 2009 01:45:08 -0000

Eric,

Maybe you remember my privat Email to Steve and Marsh (you were cc)
3 hours after I had posted my observation about the MITM susceptibility
of the TLS renegotiation:


  An approach to fixing the situation would be to use a TLS extension
  to securely identify the session that is to be renegotiated.

  Fixed clients would have to identify the TLS session that they
  want to renegotiate.  Once the fixed clients are shipped, the
  fixed servers can require clients to identify the to-be-renegotiated
  session and abort if they don't.

  In the initial in-the-clear TLS-handshake, the clients should indicate
  with this extension (and and empty extension data) that the clients
  supports secure renegotiation, so that the server may defer the
  sending of a ClientCertificateRequest in the initial handshake
  to a later renegotiation.

This matches the TLS extension RI that you published the next day.


Cryptographically, the approach of the TLS extension RI looks fine,
but I having thought about it for a few days, I really dislike
how this fix is integrated into the protocol.


The lack of protection of the renegotiation is a flaw of the SSL/TLS
base protocol, and so it REALLY should be fixed there.  If the
original SSL protocol had used different finished calculations for
initial and renegotiate handshakes, then we wouldn't have the
problem that a clients initial handshake can be proxied into the
renegotiation of the server.

Now that we know that this was a stupid mistake, we should not
continue with this mistake.  The original TLS renegotiation is
a security problem and should be entirely abandoned.

Changing the finished message calculation for the TLS renegotiation
by virtually adding the verify_data from the currents session finished
messages to the handshake messages (hashes) of the renegotiation
handshake is the most natural solution.  There really is no point
in wasting the network bandwith and send the verify_data over the
network.

What we should add to the protocol is the signaling of this protocol
change Client->Server and Server->Client through the ClientHello
and ServerHello handshake messages.  The most interoperable signaling
C->S is a specially assigned ciphersuites ID, we probably do not need
to discuss that.  I'm open to sugestions for the S->C signaling.
Since the Server will signal only when he sees the clients signal
in the ClientHello, you could at that point actually change the
ServerHello message.  Changing the ServerHello is NOT going to
break anything here!

IMNSHO the IETF should _NOT_ continue to support the insecure original
TLS renegotiation, the implementors can decide themselves whether they
want to or need to offer their customers that configuration option
and use the original Finished message calculation if the negotiation
(=signaling C->S and S->C) indicates that at least one of the peers
has not been updated.  


TLS v1.3 should REALLY require that only the modified finished
message calculation may be used for TLS renegotiation.  Supporting
the original TLS renegotiation in TLS v1.3 would be unreasonable,
and if we use the TLS extension RI, then we would have to keep
that band-aid forever wasting network bandwidth.


And all those vendors and implementors who have added a reconnect-fallback
to their TLS clients,

  - I do not want the IETF recommend them to trash this fallback
  - I do not want the IETF leave the fallback handshake unprotected

If we do NOT use the TLS extension RI on the initial handshake, but
instead a different signaling, then both of this is unnecessary,
the vendors can have their TLS client still signal and use the
protected renegotiation, encounter less connection drops and the
ability to produce better error messages.


I do admit that tunneling the Finished Messages through TLS extensions
in ClientHello and ServerHello into the Handshake message hash might
require ~20 lines of code less for TLS implementations that already
implement the extensions code.  Personally, I think the un-usability
that comes with a strict requirement for TLS extensions and the
uncertainty for the fallbacks, the impaired error reporting and
the waste of network bandwidth saves the consumers of this
technology MUCH MUCH more every day in the future.

And every implementer that doesn't have TLS extensions all of the codebase
that he maintains will have to add much more for tls extensions than
for the actual fix.



I guess, I will have to write an I-D so that we can let the
community decide (this probably is no longer an TLS WG internal
decision, because it affects the internet as a whole).


-Martin