[TLS] A new TLS version negotiation mechanism

Dave Garrett <davemgarrett@gmail.com> Sun, 08 March 2015 17:39 UTC

Return-Path: <davemgarrett@gmail.com>
X-Original-To: tls@ietfa.amsl.com
Delivered-To: tls@ietfa.amsl.com
Received: from localhost (ietfa.amsl.com [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 016241A0060 for <tls@ietfa.amsl.com>; Sun, 8 Mar 2015 10:39:53 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: 0.7
X-Spam-Level:
X-Spam-Status: No, score=0.7 tagged_above=-999 required=5 tests=[BAYES_50=0.8, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FREEMAIL_FROM=0.001, SPF_PASS=-0.001] autolearn=ham
Received: from mail.ietf.org ([4.31.198.44]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id h7oJ2cwwRC9g for <tls@ietfa.amsl.com>; Sun, 8 Mar 2015 10:39:50 -0700 (PDT)
Received: from mail-qg0-x22f.google.com (mail-qg0-x22f.google.com [IPv6:2607:f8b0:400d:c04::22f]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 1D5DD1A005B for <tls@ietf.org>; Sun, 8 Mar 2015 10:39:50 -0700 (PDT)
Received: by qgea108 with SMTP id a108so23651335qge.8 for <tls@ietf.org>; Sun, 08 Mar 2015 10:39:49 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:subject:date:user-agent:mime-version:to:content-type :content-transfer-encoding:message-id; bh=ovE5nl8i1PNGCoSw1lbpsiHhEmCzrrKqYyA+CqrC3/o=; b=cGyW7N8oihhAasghH5qnuuRVnnrYYrVfX+isSu5KrnHk0HJpPWdf1MX5iaND0FGgLJ D4swWdN3Qo/ZriaX8SiZJ6vMatbWFjCCfzMaN+M6b/th4+sESL6BmXadaaBejiju76au DawqEA6bju399oVl6bbaRJ3eZqjCFpUwx7EsWy+OqriC0pCOZaZThnK1QjaJPmigicEh Uj0Vm7YV7X0I2pwgwkvt8jkM1bTRSUC3cFgYmkDhME/WRCZFLUCqJFPaDSyjoLTCvgb1 eIlgXxmqSeo5qgT7liCbBCBq98/vjnlqzPeTOYmPtOatmSiIiP1o7kI5mZGjWMROXncG huFg==
X-Received: by 10.140.147.131 with SMTP id 125mr32036374qht.81.1425836389354; Sun, 08 Mar 2015 10:39:49 -0700 (PDT)
Received: from dave-laptop.localnet (pool-96-245-254-195.phlapa.fios.verizon.net. [96.245.254.195]) by mx.google.com with ESMTPSA id 38sm9955194qgt.43.2015.03.08.10.39.48 (version=TLSv1 cipher=RC4-SHA bits=128/128); Sun, 08 Mar 2015 10:39:48 -0700 (PDT)
From: Dave Garrett <davemgarrett@gmail.com>
Date: Sun, 08 Mar 2015 12:39:47 -0500
User-Agent: KMail/1.13.5 (Linux/2.6.32-71-generic-pae; KDE/4.4.5; i686; ; )
MIME-Version: 1.0
To: "tls@ietf.org" <tls@ietf.org>, Eric Rescorla <ekr@rtfm.com>
Content-Type: Text/Plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Message-Id: <201503081339.47927.davemgarrett@gmail.com>
Archived-At: <http://mailarchive.ietf.org/arch/msg/tls/i-vxIBQ1GtMpPF7P8ZciIayYKI4>
Subject: [TLS] A new TLS version negotiation mechanism
X-BeenThere: tls@ietf.org
X-Mailman-Version: 2.1.15
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/options/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, 08 Mar 2015 17:39:53 -0000

A basic proposal for a new TLS version negotiation mechanism for TLS 1.3+. It'll be needed to handle draft implementations, if desired, and I think it might just be wanted for all negotiation. TLS 1.3 version intolerance is currently surveyed to be in the ~1.5% range [1]. The simplest method is to do so via a new mandatory extension, as has been suggested by people before. Here's a straightforward outline to get the ball rolling.

Versions would be negotiated with a new "Extended TLS Version Negotiation" extension with the following contents:

struct {
  uint8 versions<0..2^8-1>;
} SupportedVersions;

where versions contains an ordered list of the supported TLS minor versions. A block of numbers would be reserved for draft versions. (e.g. ID 32+ for drafts)

ClientHello would include the extension with its supported versions list. IFF a server receives the extension, then it would include its corresponding set in its ServerHello. (if no version is negotiated, this would make error reporting/diagnosis much better) The ServerHello.version would still be set to the version picked by the server, now the highest supported version from the client's set that the server supports. The ClientHello.version in this negotiation mechanism would be frozen to {3,3} (TLS 1.2) for clients willing to negotiate TLS 1.2. Clients could set this to {0,0} to force only the new mechanism with no negotiation with servers not supporting it (i.e. if TLS 1.0-1.2 are all undesirable). The set of valid values for this field would be limited to exactly 5.

Additionally, I propose dropping the TLSCiphertext.version field entirely. (needs PR #51 [2] or similar; PR #51 primarily proposes encrypting ContentType, also a good idea) It's a waste of 2 bytes per record. TLSPlaintext.version would have to stay for backwards compatibility (see PR #51). Version handling would be restricted to just the hellos.

Why?
1) Too many implementations botched the existing version negotiation mechanism.
    This one requires nothing new for existing implementations to handle. (transparent fallback to TLS 1.2)
2) This method allows for non-continuous version support to be negotiated.
    (e.g. client supports 1.2, 1.3, 1.5; server without 1.5 can negotiate 1.3 instead of trying unsupported 1.4)
3) Draft implementations would be easily negotiable using the same method as release.
    (HTTP/2 benefited from widespread testing of drafts; doing so here could be helpful too)
4) Client implementations are not encouraged to go back to the old habit of insecure fallback, nor rely on SCSV for TLS 1.3+.
5) This could be used with TLS 1.0-1.2 as an alternative to SCSV that Microsoft could tolerate. They don't like SCSV as-is [3], and I tend to agree with their sentiment.
6) In the event of handshake failure due to an unsuitable version selected by the server, the client will have received a SupportedVersions set from the server to know exactly what is and is not supported.

Why not?
1) Kinda ugly to freeze a hello field and hack in a new negotiation method.
2) Some people don't like advertising all supported versions openly.
    (TLS 1.0-1.2 could be left out of the list to force only old implementations to consider them)
3) Failing to connect to the broken ~1.5% of servers that can't negotiate correctly is the "Right Thing To Do".
4) A few extra bytes in the hello messages. (though, far fewer overall if record layer is changed as proposed)

I would prefer to get PR #107 [4] committed prior to a brand new mechanism, if possible.

[1] http://www.ietf.org/mail-archive/web/tls/current/msg15141.html
[2] https://github.com/tlswg/tls13-spec/pull/51
[3] http://www.ietf.org/mail-archive/web/tls/current/msg15391.html
[4] https://github.com/tlswg/tls13-spec/pull/107


Comments?


Dave