Re: [TLS] Security review of TLS1.3 0-RTT

Benjamin Kaduk <bkaduk@akamai.com> Tue, 02 May 2017 19:20 UTC

Return-Path: <bkaduk@akamai.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 0509312EBAE for <tls@ietfa.amsl.com>; Tue, 2 May 2017 12:20:12 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.701
X-Spam-Level:
X-Spam-Status: No, score=-2.701 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_LOW=-0.7, RP_MATCHES_RCVD=-0.001, SPF_PASS=-0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (1024-bit key) header.d=akamai.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 U34z-VX7yJjR for <tls@ietfa.amsl.com>; Tue, 2 May 2017 12:20:09 -0700 (PDT)
Received: from prod-mail-xrelay07.akamai.com (prod-mail-xrelay07.akamai.com [23.79.238.175]) by ietfa.amsl.com (Postfix) with ESMTP id B5A5512EA7A for <tls@ietf.org>; Tue, 2 May 2017 12:17:18 -0700 (PDT)
Received: from prod-mail-xrelay07.akamai.com (localhost.localdomain [127.0.0.1]) by postfix.imss70 (Postfix) with ESMTP id DDF8D4334AC; Tue, 2 May 2017 19:17:17 +0000 (GMT)
Received: from prod-mail-relay10.akamai.com (prod-mail-relay10.akamai.com [172.27.118.251]) by prod-mail-xrelay07.akamai.com (Postfix) with ESMTP id C7A98433403; Tue, 2 May 2017 19:17:17 +0000 (GMT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=akamai.com; s=a1; t=1493752637; bh=VWYxeHfPhn5xIeGBEC+2/xfhVwteMWcXxYYIh2r9r7I=; l=8573; h=To:References:Cc:From:Date:In-Reply-To:From; b=JbwPEjD7Qtze6lGcw/MMVMuo1TXO9B8Mu81tlLPab7hnLF6+feaUlLzpGstyYWuMP +4cmwkbrqSyij76kip9CO0CGG1j62jOVqJ5Rppk3AnoV8VdIm0znloslXG7Z199WmD rtureKmGGIlj06553S6IZF+i2Forq1cwSZa19qZU=
Received: from [172.19.17.86] (bos-lpczi.kendall.corp.akamai.com [172.19.17.86]) by prod-mail-relay10.akamai.com (Postfix) with ESMTP id 7F20E1FCF3; Tue, 2 May 2017 19:17:17 +0000 (GMT)
To: Nico Williams <nico@cryptonector.com>, Colm MacCárthaigh <colm@allcosts.net>
References: <CAAF6GDcKZj9F-eKAeVj0Uw4aX_EgQ4DuJczL4=fsaFyG9Yjcgw@mail.gmail.com> <C29356B3-6D71-4088-9AB3-4954327F1E7B@dukhovni.org> <20170502173905.GC10188@localhost> <CAAF6GDeYc5o=eeeyV6HhK9vrLngB-Y=Ed5BdedrE8h2-py4oAw@mail.gmail.com> <20170502180049.GE10188@localhost> <CAAF6GDecd=x-Ob_eO1vSWr6cb6jAeyHBx7zf6cpX=GfxBosfLQ@mail.gmail.com> <20170502182529.GG10188@localhost>
Cc: TLS WG <tls@ietf.org>
From: Benjamin Kaduk <bkaduk@akamai.com>
X-Enigmail-Draft-Status: N1110
Message-ID: <466fad64-5acd-d888-1574-10f95b2ab7bc@akamai.com>
Date: Tue, 02 May 2017 14:17:17 -0500
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0
MIME-Version: 1.0
In-Reply-To: <20170502182529.GG10188@localhost>
Content-Type: multipart/alternative; boundary="------------DE480319999F43CAB9484CEA"
Archived-At: <https://mailarchive.ietf.org/arch/msg/tls/6TX0PXaQymOMSDiCGGCgcrpLlSE>
Subject: Re: [TLS] Security review of TLS1.3 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, 02 May 2017 19:20:12 -0000

[replying to the part of your message I did not already cherry-pick and
reply to...]

On 05/02/2017 01:25 PM, Nico Williams wrote:
> On Tue, May 02, 2017 at 11:17:42AM -0700, Colm MacCárthaigh wrote:
>> On Tue, May 2, 2017 at 11:00 AM, Nico Williams <nico@cryptonector.com>
>> wrote:
>>> I would think that the ticket itself is enough for that when using
>>> 0-rtt.  I.e., if you don't want connection correlation to be possible,
>>> you can't use 0-rtt.
>> I don't think so. If the ticket is encrypted when it issued, I don't follow
>> how it could be used to correlate the original connection with the 0-RTT
>> connection.
> The ticket's _ciphertext_ is not visible to the eavesdropper when it is
> issued, but it IS visible to the eavesdropper when it is used in 0-rtt.
> The client cannot change the ticket's _ciphertext_.  Therefore the
> eavesdropper can correlate 0-rtt connections when tickets are reused.
> The obfuscated ticket age is irrelevant to that.
>
> Now, I understand that the obfuscated ticket age goes in the clear in
> 0-rtt connections, and that if the attacker could work out the
> unobfuscated time then the attacker could correlate not just the 0-rtt
> ticket-reusing connections with each other, but also some earliere
> ticket-establishing connection(s) observed at that time.
>
> I find the obfuscated ticket age business a bit silly, but maybe I'm
> missing something.  The client should really send an [encrypted]
> authenticator that includes a timestamp, thus allowing the server to
> detect replays and so on -- just like Kerberos.  Then this problem
> wouldn't happen.

It's just to provide a little extra benefit on top of TLS 1.2 of
unlinkability in some situations.  In TLS 1.2, the session ticket was
sent unencrypted, so the ticket ciphertext is always available to the
attacker for correlation of ticket use to the original connection  (and
thus to other resumptions from that original connection).  With TLS 1.3,
the first time the observer sees the ticket ciphertext is when the
client uses it.  If the client only uses the ticket once, the naive
conclusion is that the resumption is not linkable to anything else --
the original connection or other resumptions from the same original
connection.  But, because we have this ticket age anti-replay mechanism,
the ticket age could be used to link resumptions from the original
session together, as described shortly.  This only matters when the
client has multiple tickets to use that were granted at the same
time/session, since if the client is reusing tickets then the ticket
ciphertext links the reuse, as you already noted.  So, if the ticket_age
was in the clear, then the attacker could subtract that to find when the
ticket was issued, and correlate the multiple tickets that were issued
together.  Obfuscating the ticket age prevents that correlation.

That correlation was unavoidable with TLS 1.2 tickets; if you're happy
with the 1.2 behavior, you don't need to care about reusing tickets or
how obfuscated your ticket age is.  (This is Viktor's postfix case, as I
understand it.)

> In any case, given that ticket-reusing 0-rtt connections can be
> correlated with each other, the ability to further correlate them with a
> ticket-issuing connection(s) established earlier doesn't seem to be that
> much more of a big deal.

Agreed.  This whole anti-linkability thing is really in a very narrow
use case, and only when each ticket is used at most once.  (It's also a
very minor benefit, in my mind, compared to the other security
properties in scope.)

-Ben