Re: [TLS] Closing on 0-RTT

Bill Cox <waywardgeek@google.com> Tue, 13 June 2017 22:24 UTC

Return-Path: <waywardgeek@google.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 13A69131A1E for <tls@ietfa.amsl.com>; Tue, 13 Jun 2017 15:24:29 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2
X-Spam-Level:
X-Spam-Status: No, score=-2 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RP_MATCHES_RCVD=-0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (2048-bit key) header.d=google.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 A76gxYpvUBcq for <tls@ietfa.amsl.com>; Tue, 13 Jun 2017 15:24:26 -0700 (PDT)
Received: from mail-yb0-x22b.google.com (mail-yb0-x22b.google.com [IPv6:2607:f8b0:4002:c09::22b]) (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 BE2F2131A0B for <tls@ietf.org>; Tue, 13 Jun 2017 15:24:26 -0700 (PDT)
Received: by mail-yb0-x22b.google.com with SMTP id 4so39856485ybl.1 for <tls@ietf.org>; Tue, 13 Jun 2017 15:24:26 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=m3WU9w6Tr8JBwMJI7k85a/+f8ryEqUSfV6y2dCGg77E=; b=nXdw8VhGms61kghfVsBzXPkA7d0bA2w93iOYhikxHxOTvskan0tINhggIL8H4f8KDY qbochCEJJqknEDHpS7mXhwGw2Lp5bmft3KkcKvuausPii8aYjtIbSPwITXM/alDDJ4zw d/cuu0zrBZJdeyFiKZIq6tNZkaXx8Md2NbH+qfwkD+TqCNDwNKRO1q/mUFLXoQ39q/0E UDlzuLtC1dpeIcoiM/PUOaX2soaezzhizDPvGrlu/UuhJnWgceKKE660I7NZYeUV57Cr wPzkeN6g55KLMaxUMkkyWe/I2Jtf+4cED03J6ZRoYV2GxJkiGjwnXcVCb2bA41wme0XM YoBg==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=m3WU9w6Tr8JBwMJI7k85a/+f8ryEqUSfV6y2dCGg77E=; b=rt+aVDK9Qoy7/fpXF4RwuRbwiZcOGj8u8Tkqyo2OJZGuImu85QKw1N8awbx/SM4ZME 1JmxyadLfBf/ZJXc44Hx5mMeGYSe2+FoKuXxEMDQdK22r68GDYD4xkQLWQAUdooq9W8c yReShEhXqDcApQ/zqIpWEhxcTXdpYFFhq2gzC077/DL0jiyeStFYJGePTFskJ+YH6daj C0unXw9HWywL4B2gMAwN8l8/O+ccFfEXNnKSiCZsP3IRthqfkf1Q2lKuZqFpejdl5ptg 3pCfvJJv8FsEy1DPo1Z/MwfGLp74k2ePxhY1hNbSbugn45duBJAFpEJmuIdAonF+IF2G TFUQ==
X-Gm-Message-State: AKS2vOzjzQLv55AEUD07GgsivgMXbSx3/eBJlgG9vnVYsxTyYD9UJNoT nKCnMMcX1NHgZ4fKlc3apuw0wCiOnBB1
X-Received: by 10.37.165.98 with SMTP id h89mr4829394ybi.10.1497392665778; Tue, 13 Jun 2017 15:24:25 -0700 (PDT)
MIME-Version: 1.0
Received: by 10.13.222.67 with HTTP; Tue, 13 Jun 2017 15:24:24 -0700 (PDT)
In-Reply-To: <20170613205113.GA13223@LK-Perkele-V2.elisa-laajakaista.fi>
References: <CABcZeBNLo51y4-MYS6NTQn9OWg5jTYYpwxn1fiKKNL5bWA37TA@mail.gmail.com> <20170613113232.GC8983@LK-Perkele-V2.elisa-laajakaista.fi> <CAH9QtQG0uk+eUozJxxMRwvcROO7x5FhKd5zDbwpCKuXj9zrecQ@mail.gmail.com> <20170613205113.GA13223@LK-Perkele-V2.elisa-laajakaista.fi>
From: Bill Cox <waywardgeek@google.com>
Date: Tue, 13 Jun 2017 15:24:24 -0700
Message-ID: <CAH9QtQFez=tUVJOd7ztBaWFtVs5dAAojg8JrixGqjwqN5go+8A@mail.gmail.com>
To: Ilari Liusvaara <ilariliusvaara@welho.com>
Cc: Eric Rescorla <ekr@rtfm.com>, "tls@ietf.org" <tls@ietf.org>
Content-Type: multipart/alternative; boundary="94eb2c19f018ef77780551dee55f"
Archived-At: <https://mailarchive.ietf.org/arch/msg/tls/-9Xw0hg5ro7Z1OgCjTyLM_PB0oo>
Subject: Re: [TLS] Closing on 0-RTT
X-BeenThere: tls@ietf.org
X-Mailman-Version: 2.1.22
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: Tue, 13 Jun 2017 22:24:29 -0000

On Tue, Jun 13, 2017 at 1:51 PM, Ilari Liusvaara <ilariliusvaara@welho.com>
wrote:

> >   - Note that 0-RTT exporters are not safe for authentication on servers
> > that do not enforce single-use tickets, or for clients that do not
> > recompute authentication signatures on retransmission of early data.
>
> "Single-use tickets" imply global anti-replay.
>

I assumed "gobal anti-replay" meant there would be a globally synchronized
cache of valid single-use tickets.  It sounds like you mean "global
anti-replay" includes schemes using orbit/metro/server bound tickets, since
they can support single-use tickets.  In that case, I agree with you, but I
think the phrase "single-use tickets" may be less confusing.  Maybe just
say "anti-replay" instead of "global anti-replay"?

And the latter part is way too obscure. I have no idea how it is
> trying to fix ClientHello replay resulting the same exporter
> output.
>

I don't know what you mean by "resulting the same exporter output."  Auth
signatures in a 1-RTT fallback need to be recomputed using the 1-RTT
exporter to avoid having the same signature accepted twice.  Maybe this is
too specific and should be left out.

> Even this is only partially true.  Anti-replay can be built above the TLS
> > layer.  I'm considering doing token-binding replay defense in the
> > authentication backend, to help ensure the token-binding guarantee: that
> > auth tokens taken from one device cannot be used from another device
> > without continued access to the first device's signing oracle.
> > Unfortunately, 0-RTT master resumption secrets are a new kind of auth
> > bearer token, and the token binding spec does not cover them.
>
> Doing stuff like this gets more and more complicated and fragile as
> one moves up the layer stack.
>

It depends on the task.  Moving channel ID from the TLS layer to token
binding in the HTTP layer should simplify the TLS state machine enough to
justify the change.  Anti-replay in the TLS layer would be good for 0-RTT
token binding, but the cost and complexity of running the whole user-facing
fleet of servers with anti-replay caches is huge, many times higher than
the cost of token-binding anti-replay in the backend.  Also, the
authentication backend is where bound tokens are currently verified, so
putting the anti-replay there seems like the appropriate layer.

I'm still not sure this scheme is worth implementing, but without it, I do
not think we can support client certificates or token binding over 0-RTT.
It doesn't really matter for the TLS 1.3 spec.  I'm just pointing out that
the statement "0-RTT auth is insecure without anti-replay defense" is not
100% accurate.  There are other ways to improve the security.

Bill