Re: [TLS] analysis of wider impact of TLS1.3 replayabe data

Erik Nygren <> Sun, 13 March 2016 22:33 UTC

Return-Path: <>
Received: from localhost (localhost []) by (Postfix) with ESMTP id 375F512D87E for <>; Sun, 13 Mar 2016 15:33:26 -0700 (PDT)
X-Virus-Scanned: amavisd-new at
X-Spam-Flag: NO
X-Spam-Score: -2.349
X-Spam-Status: No, score=-2.349 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.249, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.001, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_LOW=-0.7, SPF_PASS=-0.001] autolearn=ham autolearn_force=no
Authentication-Results: (amavisd-new); dkim=pass (2048-bit key)
Received: from ([]) by localhost ( []) (amavisd-new, port 10024) with ESMTP id ZgRfcsIURpRC for <>; Sun, 13 Mar 2016 15:33:23 -0700 (PDT)
Received: from ( [IPv6:2607:f8b0:4003:c01::234]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by (Postfix) with ESMTPS id B4AD412D875 for <>; Sun, 13 Mar 2016 15:33:22 -0700 (PDT)
Received: by with SMTP id fz5so159925606obc.0 for <>; Sun, 13 Mar 2016 15:33:22 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc; bh=F5a7Ij3Akx55t+/qV6w82r7gAKAyom8JIjT2OXl3cbs=; b=ImsEISymqtJXyKqB6BFGaMs8khqn+cbK4xr4WsOWbWQn0OWi18eUVZEAPBLznLTyfO N0JqikKmYKSG9brwbl81F+rcNjdY/Dborn8RzkO1/jFmUfTm/Hw32270qIgRB4s2kgEs ICoE8Y7LXBmo/tk7W0ViN87qf2lYEyiscV97epuTx8o/bNfjwGIHTUkk8C5XQ6XI4b9N rRYITDK88epJHZ+sBSFNzXKye2G309MAMdKozFmPrWZ//oIQF28yb/TaS0qYmyn5Vzb4 cFdo9R0u+K/21hkvS9nDoW+XLKCwPmRPipHYlHggetG14ZEydWxlx2nv3u1r0UrnVyrm vW1Q==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;; s=20130820; h=x-gm-message-state:mime-version:sender:in-reply-to:references:date :message-id:subject:from:to:cc; bh=F5a7Ij3Akx55t+/qV6w82r7gAKAyom8JIjT2OXl3cbs=; b=abVq5wduXlBzPtNRnSGDxxahffVjVJJfZVzs1xw9AN7y4vQh/hqilx5WYggIura6p4 t1FlB2G3X7KBs3f9AOqn5bftEvqD9jZnGj/LXWX8cbDsCljh17aye7x1RqZh4k2hPsDS ZozKbFf2bbOEGfCTje0RnKPu3PIDDibC7pz2wYzw724IALEyyEQ42ipib3qwQrdnxT2o 24J2cbzCMjpS4eQhWgzS+2TB9090JX/NwNil0XLiWDyxLi2JGQHnrcIlzwuXGN9gz+j+ W2JbB8PoJf92PHRbeBlH7EPkfdjbjxyghS6ajLGU9oK3gr0dGxyfPr8SmlTlFepVAUFz Eb0w==
X-Gm-Message-State: AD7BkJLT7I50cHwzVBVkOwnFp1r5OKABQa+DZYUlauYYbp2DIner+H38f27mxVsjSqI1sCZJlkUEJsX17iyvEg==
MIME-Version: 1.0
X-Received: by with SMTP id yc3mr11624540obc.57.1457908402042; Sun, 13 Mar 2016 15:33:22 -0700 (PDT)
Received: by with HTTP; Sun, 13 Mar 2016 15:33:21 -0700 (PDT)
In-Reply-To: <>
References: <> <> <> <> <> <> <> <>
Date: Sun, 13 Mar 2016 18:33:21 -0400
X-Google-Sender-Auth: VQJH_udGQVXQ2-GkVLCZoiRln8E
Message-ID: <>
From: Erik Nygren <>
To: Eric Rescorla <>
Content-Type: multipart/alternative; boundary=089e0158b2546b44af052df5c096
Archived-At: <>
Cc: "" <>
Subject: Re: [TLS] analysis of wider impact of TLS1.3 replayabe data
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." <>
List-Unsubscribe: <>, <>
List-Archive: <>
List-Post: <>
List-Help: <>
List-Subscribe: <>, <>
X-List-Received-Date: Sun, 13 Mar 2016 22:33:26 -0000

On Sun, Mar 13, 2016 at 12:21 PM, Eric Rescorla <> wrote:

> On Sun, Mar 13, 2016 at 3:51 PM, Yoav Nir <> wrote:
>> > On 13 Mar 2016, at 4:45 PM, Salz, Rich <> wrote:
>> >
>> >> I also think it is prudent to assume that implementers will turn on
>> replayable
>> >> data even if nobody has figured out the consequences.
>> >
>> > I very much agree.  Customers, particularly those in the mobile field,
>> will look at this and say "I can avoid an extra RTT?  *TURN IT ON*" without
>> fully understanding, or perhaps even really caring about, the security
>> implications.
>> Perhaps, and I think IoT devices are likely to do so as well.
>> Is OpenSSL going to implement this? Are all the browsers?
> There are already patches in preparation for this for NSS and I expect
> Firefox to
> implement it, as long as we have any indication that a reasonable numbers
> of
> servers will accept it.

I share some of the concerns expressed in this thread that 0RTT has the
risk of becoming an attractive nuisance.  Once browsers start supporting
it, server operators will feel competitive pressure to support it.  And
this will then put additional pressure onto more browsers to support it,
possibly pushing the edges where it is safe.

For example, when is HTTP GET safe vs not safe and who makes this call?
Especially if you have a browser that assumes that GET should be idempotent
and can be sent via 0RTT early data, a web developer whose never heard of
the word "idempotent" and builds an app with GET with side-effects but
assumes its safe since it's over TLS, and a server operator who is just
turning on a vendor provided feature which their users requested, not to
mention perhaps having a CDN or load-balancing-tls-terminating-proxy that
doesn't have a good way to convey the risks across two connections.  One
idea for HTTP that I'm increasingly in-favor of might be to define a new
method ("GET0"?)  and require that browsers use one of these new methods in
the early data request to expose this as high in the stack as possible.

It seems like there is a level of diminishing returns here if we compare
some of the options (not meant to be strictly ordered below):

1) We have old-school cleartext over TCP which has 1RTT before client data
(due to SYN/SYNACK)
2) We have TCP + TLS 1.[012] which has both the SYN/SYNACK plus the 2RTT
behavior means 3RTT before client data.
3) We have TCP TFO + TLS 1.3 1RTT which yields 1RTT before client data  (or
back to the same as #1 for resumption)
4) We have TCP (no TFO) + TLS 1.3 0RTT which also yields 1RTT before client
data for resumption
5) Then there's TCP TFO + TLS 1.3 0RTT which yields 0RTT before client data
for resumption
6) And finally there's old-school cleartext TCP TFO which has 0RTT before
client data, but which people are very hesitant to use for HTTP due to
replay issues.

Of these, #3 and #4 yield similar performance (with some limitations around
#3, such as requiring the same server IP or server IP prefix in some newer

>From this, a few thoughts jump to mind from this:

* We get many of the same benefits 0RTT with using TCP TFO (TCP FastOpen)
and TLS 1.3 1RTT mode together as we get when using TLS 1.3 0RTT and stock
TCP.  TFO seems much safer here since its replay risks are at a lower level
that should be safe for TLS outside of the 0RTT context.  Note that there
are some issues with middleboxes sometimes breaking badly (blocking all
connections from a client IP for 30 seconds) when it tries to use TFO as
discussed recently in TCPM, but we may all want to focus some effort on
getting those fixed.
* We'll almost certainly want to make sure that any UDP-based protocol
(DTLS 1.3 or QUIC-over-TLS-1.3) can do a true 1RTT handshake safely in a
common case.  (ie, in a way that mirrors TCP TFO + TLS 1.3 1RTT.)  I
suspect this will be the bare minimum for getting QUIC to switch to use TLS
* It seems like the risks around TLS 1.3 0RTT and TFO are similar (with TCP
being a protocol not trying to provide security properties).  If people
have been very wary to enable TFO for cleartext HTTP due to risks from
duplicated packets, shouldn't we be even more worried about TLS 1.3 0RTT
since the next-layer-up semantic issues and risks are similar, but TLS 1.3
0RTT potentially even has fewer mitigators?  (eg, we don't bind the server
IP in cryptographically to the request the client is making --- although
that might be an interesting addition to help make TLS 1.3 0RTT safer?)

There may also be some hacks that make TLS 1.3 0RTT marginally safer,
although I'm sure there are situations where they don't work and they may
just provide a false sense of security:
* Have the client include a time-delta-relative-to-PSK-issuance, as Martin
suggested.  (To allow the server to bound the duration of replay attacks.)
* Include the server IP in the client_hello for 0RTT  (to prevent replays
against different clusters).  There are a bunch of NAT-style scenarios
where this breaks, but it might help in a few places.  This also doesn't
help for server clusters using anycast.
* The anti-replay nonce (which helps in some places, but isn't possible to
implement sanely in many other scenarios).

At a minimum, I agree with the suggestion that we should require underlying
protocols to specify where and how it is safe to use.  (Although which of
the browsers discussing implementing is willing to wait for this draft for
HTTP to be mature enough?  I'm actually quite curious here.)


[All opinions expressed here are my own.]