Re: [TLS] Making post-handshake messages optional in TLS 1.3 (#676)

Nick Sullivan <nicholas.sullivan@gmail.com> Sat, 08 October 2016 16:32 UTC

Return-Path: <nicholas.sullivan@gmail.com>
X-Original-To: tls@ietfa.amsl.com
Delivered-To: tls@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id D993F1294FD for <tls@ietfa.amsl.com>; Sat, 8 Oct 2016 09:32:45 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.699
X-Spam-Level:
X-Spam-Status: No, score=-2.699 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FREEMAIL_FROM=0.001, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_LOW=-0.7, SPF_PASS=-0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com
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 u2kptrQY4Ihy for <tls@ietfa.amsl.com>; Sat, 8 Oct 2016 09:32:43 -0700 (PDT)
Received: from mail-it0-x232.google.com (mail-it0-x232.google.com [IPv6:2607:f8b0:4001:c0b::232]) (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 9885E1288B8 for <TLS@ietf.org>; Sat, 8 Oct 2016 09:32:43 -0700 (PDT)
Received: by mail-it0-x232.google.com with SMTP id k64so6984107itb.0 for <TLS@ietf.org>; Sat, 08 Oct 2016 09:32:43 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=nEuC9+F6SrpQN3BYDJsqOAbxy7fs5xSnRKd9nDNVBcA=; b=SjYOlDmirw2m18YIPT7uszB2bupAqi53H1ixU0sCvClOU8BpB6YPtajnwsZGSiL/AX 3v8AK5liBims3EarMy6+zVCyqQ8MknDpvX6G/S+eJ6EH3zUCx+RzdOZn7vrxbSiVCPkJ l2D+xEfuwpxsgv4b7VywAt1RMHreE9lTP+B36820yAdnV20QweaOdMXSnCGSVfuKqQRZ TfJSY5jbrSRTcjBc5hyrn09a/wCVbgy2lMzttfuNaFw0FXPY+YFclQfX8sqv8DhatiEY M3JYWEE2p0pm+5y4B6NnU/AEAbSz0C/xzL6GTPYkkyYA1XPm4kku/Fblkpy/5daOzwin nXwA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=nEuC9+F6SrpQN3BYDJsqOAbxy7fs5xSnRKd9nDNVBcA=; b=a8yQKvHvatBCvVnQhP98WgFJ+bI468PR0Cv45EMg7OyQvPf9nP6prJCG4AadwefUW0 bvk6mnpDmlrP3IBsvIRg3SoOr9uaxeo5QfyrZqS6FDeSOQBpc4yI4kCvR88M31lRBu85 BN/rczivCSu6t+VFKYQyfUVNXd+yvopyw/EJmZD6YnH5HYzvB4ZsS8HGkCJ8YUbZa4UR H0+ad72HX/6vO9Q8zxujmNhZ9WpjqXiiHMhd0FVKfoyn07r0A2Wc66xjnb6o74Wp1a58 6tejuCPl3n0p/xjtnU5TiXBBTIfNK0kCfAcWHb666EGgg+OS8tOQzeThLI7JpGICgR7K Gf5g==
X-Gm-Message-State: AA6/9RkGUKlp/RnEYAIYBHsC37JPIDV2tAmuz0D78N8g3ZhuNtu2562np27AB3XINVxpNtuYoL2O6FBBGR8hMw==
X-Received: by 10.36.253.200 with SMTP id m191mr3355509ith.35.1475944362963; Sat, 08 Oct 2016 09:32:42 -0700 (PDT)
MIME-Version: 1.0
References: <CAOjisRznhk-Fww=EnRg7zXO-zaHWyNgi0g+reRBj+y3ZOhwMhw@mail.gmail.com> <20161008090257.GB10692@LK-Perkele-V2.elisa-laajakaista.fi> <CAF8qwaC4qoUqf=f6yKgfk6RAy1odcvDeMWFntMMXQ6TbJXFsYQ@mail.gmail.com>
In-Reply-To: <CAF8qwaC4qoUqf=f6yKgfk6RAy1odcvDeMWFntMMXQ6TbJXFsYQ@mail.gmail.com>
From: Nick Sullivan <nicholas.sullivan@gmail.com>
Date: Sat, 08 Oct 2016 16:32:32 +0000
Message-ID: <CAOjisRwcoToEUxfTDF_Mcb3bekqT-b9cHv5M-G8Wvy5h+yfY7A@mail.gmail.com>
To: David Benjamin <davidben@chromium.org>, Ilari Liusvaara <ilariliusvaara@welho.com>
Content-Type: multipart/alternative; boundary=94eb2c0361e2767ca3053e5d13ca
Archived-At: <https://mailarchive.ietf.org/arch/msg/tls/Nw2Ci0OIlN63LYvfHDwq8Q6nFCk>
Cc: "tls@ietf.org" <TLS@ietf.org>
Subject: Re: [TLS] Making post-handshake messages optional in TLS 1.3 (#676)
X-BeenThere: tls@ietf.org
X-Mailman-Version: 2.1.17
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: <https://mailarchive.ietf.org/arch/browse/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: Sat, 08 Oct 2016 16:32:46 -0000

I'm not proposing any new post-handshake authentication mechanisms or
anything relating to HTTP/2 renegotiation in this change. I'm simply making
support for the existing post-handshake messages optional.

With this change, if the client does not opt in, unexpected
CertificateRequests are fatal to the connection. Same with unexpected
KeyUpdates and SessionTickets. This will hopefully reduce the complexity of
TLS 1.3 implementations that don't need these features.

Nick

On Sat, Oct 8, 2016 at 8:06 AM David Benjamin <davidben@chromium.org>; wrote:

> On Sat, Oct 8, 2016 at 5:03 AM Ilari Liusvaara <ilariliusvaara@welho.com>;
> wrote:
>
> On Sat, Oct 08, 2016 at 01:03:21AM +0000, Nick Sullivan wrote:
>
> > There has been a lot of discussion lately about post-handshake messages
>
> > that do not contain application data and how to handle them. This PR is
> an
>
> > attempt to make the story more explicit by adding a new post_handshake
>
> > extension to TLS 1.3.
>
> >
>
> > Supporting all types of post-handshake messages can require extra
>
> > complexity and logic, even when the features that these messages enable
> are
>
> > not needed. Some types of connections/implementations don't need to
> support
>
> > key updates (some unidirectional connections), session tickets (pure PSK
>
> > implementations) and post-handshake client auth (most browsers). These
> are
>
> > all currently SHOULDs in the spec and they don't need to be.
>
>
>
> Post-handshake authentication is the only one of these that is genuinely
>
> annoying. This is because you can't even reject it without a MAC, that
>
> additionally continues the handshake hash.
>
>
>
> KeyUpdate is rather simple, and NST can just be ignored (leading to some
>
> waste in bandwidth).
>
>
> Yeah, after the fix to how KeyUpdate is acked, I don't think we'd have
> problems with either of the way, while post-handshake auth is indeed
> horrific.
>
>
>
> Furthermore, the post-handshake authentication mechanism doesn't look to
>
> be featureful enough for kind of post-handshake auth e.g. HTTP/2 wants,
>
> And there are serious questions about how it should interact with
>
> applications.
>
>
> An extension also doesn't really capture things if we intend for, say,
> this to be used for legacy protocols like HTTP/1.1 (where we don't have as
> rich a framing layer) but not HTTP/2 (where we do and can use it as a
> substrate for all this silliness). I was anticipating that, if this ends up
> being used in the HTTP world like renego is, it would be like our renego
> stuff: off by default, forbidden in HTTP/2, and with all interleave
> forbidden.
>
> Further, what useful thing could a server even do with this extension?
> Decline to do post-handshake auth doesn't work. Either the application
> protocol doesn't use post-handshake auth (please pick this one) or it does.
> One doesn't need to send a client_writes_first extension in HTTP/1.1.
>
> Post-handshake auth another knob on the TLS <-> application protocol
> boundary. This means each application protocol must specify for itself what
> post-handshake auth means: what to do with the context field, when it may
> be received, what it does to application flow, etc. Then the spec must be
> clear that if the application protocol does not opt in, CertificateRequest
> is forbidden. A CertificateRequest at an unexpected point (say, half-way
> through a HTTP/1.1 body) is also forbidden. Also make it clear this is for
> legacy protocols and new ones do not use it.
>
> This is analogous to how HTTP/2 forbids renego at the spec level. (TLS 1.2
> got the "defaults" for renego wrong.) No one ever wrote down the exact
> rules for the client-auth/renego hack in HTTP/1.1, but whatever spec does
> this for post-handshake auth should do the same for renego.
>
> It is a lot of spec work for such a tiny-seeming feature, but this is
> consistent with how messy the feature actually is.
>
> David
>