Re: [TLS] 0-RTT (Was: Re: 0-RTT and Anti-Replay)

Nico Williams <> Wed, 13 May 2015 22:29 UTC

Return-Path: <>
Received: from localhost ( []) by (Postfix) with ESMTP id A8B3D1A9062 for <>; Wed, 13 May 2015 15:29:42 -0700 (PDT)
X-Virus-Scanned: amavisd-new at
X-Spam-Flag: NO
X-Spam-Score: -1.666
X-Spam-Status: No, score=-1.666 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, IP_NOT_FRIENDLY=0.334, RCVD_IN_DNSWL_NONE=-0.0001] autolearn=no
Received: from ([]) by localhost ( []) (amavisd-new, port 10024) with ESMTP id 3ORK5XSIZN0E for <>; Wed, 13 May 2015 15:29:41 -0700 (PDT)
Received: from ( []) by (Postfix) with ESMTP id 34F9F1ACEDE for <>; Wed, 13 May 2015 15:29:30 -0700 (PDT)
Received: from (localhost []) by (Postfix) with ESMTP id 0D790778093; Wed, 13 May 2015 15:29:30 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed;; h=date :from:to:cc:subject:message-id:references:mime-version :content-type:in-reply-to;; bh=kqam7CMbZclyy+ wIPook4jz98xY=; b=Zi/7VsVw7oqXlLf42diQSZ7ioIr07wxx5iv+uzayZMZ6qT KEAXa7hrKeVOtT5tQgVPpSkP89KNw+NtywPnWuByUZUkHC1DIqdcaelq/sE47SIr S5AHsHp5iT8s59GvIH6hiwW9FgSXvbvqelPVRioGk9UhUIxhbyg2pSdHe3OsQ=
Received: from localhost ( []) (Authenticated sender: by (Postfix) with ESMTPA id A981177808C; Wed, 13 May 2015 15:29:29 -0700 (PDT)
Date: Wed, 13 May 2015 17:29:29 -0500
From: Nico Williams <>
To: Ilari Liusvaara <>
Message-ID: <20150513222927.GZ7287@localhost>
References: <> <20150412165542.GA19481@LK-Perkele-VII>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <20150412165542.GA19481@LK-Perkele-VII>
User-Agent: Mutt/1.5.21 (2010-09-15)
Archived-At: <>
Cc: "" <>
Subject: Re: [TLS] 0-RTT (Was: Re: 0-RTT and Anti-Replay)
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." <>
List-Unsubscribe: <>, <>
List-Archive: <>
List-Post: <>
List-Help: <>
List-Subscribe: <>, <>
X-List-Received-Date: Wed, 13 May 2015 22:29:42 -0000

On Sun, Apr 12, 2015 at 07:55:42PM +0300, Ilari Liusvaara wrote:
> I thought about 0-RTT some more, here are some questions. Few
> might be protocol-relevant, most are only about guidance.
> 1) What is the recommended 0-RTT API model on server side
>    (also consider server apps or app implementations that don't
>    support 0-RTT)?

The app should request 0-RTT data; server should drop it if not
requested before receipt of ClientHello.

> 2) What are the semantics of successfully received 0-RTT transfer
>    (especially considering the client-side autoretransmit on
>    failure)?

Leave it to the app.  A replay cache option would be nice, but the app
probably needs to provide this itself (since, after all, it's not just a
question of "have we seen this before", but also, "have we processed
this before").

> 3) How does 0-RTT interact with ALPN (especially considering
>    potential for multiple protocol candidates)?

The client has committed to an application protocol.

Although that's not necessarily quite so true: elsewhere we're talking
about an RFC2712 (Kerberos in TLS) replacement where ideally we could
start sending GSS-API context tokens as early as possible (when the
client doesn't want confidentiality protection for its name).  Such a
protocol could still negotiate from N>1 application protocols.

(GSS-in-TLS as an application protocol using 0-RTT data is a perfect
example of a *safe* use of 0-RTT data, provided that the intention is to
also do channel binding.  Don't think about GSS too hard here.  Just
think about the point that some 0-RTT uses will be quite safe.)

> 4) Can handshake with attempted 0-RTT be securely downgraded to
>    v1.2 (obviously causes the 0-RTT to fail)?

Sure, but the 0-RTT data must get dropped.

> 5) There is potential footgun if 0-RTT is used with (DH-)PSK: The
>    PSK authenticates the connection immediately, but 0-RTT is
>    as replayable as ever. What to do with that?

0-RTT is a footgun.  Choice of ciphersuite seems a bit beside the point,
though it's possible that positive authentication status of the client
may cause applications to fire the footgun.  I'd insist on the
authentication status not being complete until the handshake completes
in all cases, and I'd insist on pointing out that the 0-RTT data is a
lot of rope.

> 6) The same as above, but when attempting to resume a session.
>    with a client certificate (since cc is property of session)?


> 7) What guidance to give regarding what data can be put to 0-RTT,
>    considering its replayability?

First, that it's replayable.  Second, that the application should only
send such data where doing so is idempotent, or where it is part of
something like an application-layer authentication protocol that will do
its own replay protection, or where the application has its own replay
detection cache.

> 8) If resumption attempt has 0-RTT data, what keying material is
>    used for the 0-RTT?

In principle, none.  However, a key derived from the resumption ticket's
session key would be nice.  See below.

The PSK case could be similar as well.

> 9) Can server roll over its 0-RTT keys without waiting for the
>    previous ones to expire?

In relation to (8)?  No.  But we could do something where we use
timestamps, a la Kerberos, to greatly reduce the time window that any
replay caches have to protect, at least for session resumption 0-RTT

> 10) How is attacker establishing a session (or at least decoding
>     server's first application flight) replaying captured
>     0-RTT data prevented (since that could leak quite a bit of
>     info about what's in 0-RTT blob)? Or not?

IIUC, it isn't.