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

Colm MacCárthaigh <colm@allcosts.net> Mon, 22 May 2017 17:24 UTC

Return-Path: <colm@allcosts.net>
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 8216912EB34 for <tls@ietfa.amsl.com>; Mon, 22 May 2017 10:24:17 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.598
X-Spam-Level:
X-Spam-Status: No, score=-2.598 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_LOW=-0.7, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (2048-bit key) header.d=allcosts-net.20150623.gappssmtp.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 agoiehJarbpT for <tls@ietfa.amsl.com>; Mon, 22 May 2017 10:24:15 -0700 (PDT)
Received: from mail-yw0-x22d.google.com (mail-yw0-x22d.google.com [IPv6:2607:f8b0:4002:c05::22d]) (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 B049D1200B9 for <tls@ietf.org>; Mon, 22 May 2017 10:24:15 -0700 (PDT)
Received: by mail-yw0-x22d.google.com with SMTP id l74so63175108ywe.2 for <tls@ietf.org>; Mon, 22 May 2017 10:24:15 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=allcosts-net.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=NyfbXEaP7bGFe1v7xCM99jmPmF4hs1t0zCgo8YPjuDc=; b=itDDI4fg7Zyb7rjxfbGbm3yBZhzfJVC7/IJDYks9q6BAJBXXdejKQzAbwm94f17cdJ xycHRngSictuunjftiy+Lm6M3BLY3BazvDRNTZz3ptpElp6l2lD3ESnA1U1eevVkEf74 wYLQ9UvTqKFzWp+WVALsPvzHGQjhSUDbR8uabdWqxBEQ3bH+iTJwJlt0uBPjteT0RRRp xXIixukmQlK0gVhmzeHqEkZzXeZxjW+u8/+t0V2oSeNmOSlNMSOct0QeApeqJgQlKyUH rWQIXzaIZBwVqsfARDmYXBkkDA0hQnYvzeUZIgjVVXScWtJckmvDo76IKMFiKtAIsW8V QMmA==
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=NyfbXEaP7bGFe1v7xCM99jmPmF4hs1t0zCgo8YPjuDc=; b=mVK/pOZe5aC/FYI4pDublKTsaWSlx/f1l+retZLhQ2Dc52M8oo8buUPphQ6Xi9NhP/ ozoP0GWeMcWnkW6261eD1iAdYEvVTz0NyMMVfTjG8JkfMLiUDZR05cTdSfB5wkgnMkOL i82oC7d2VPVEQ67dII/XFUdqs/XgESDONu3ZexK0YNMh4DNY+Dtz0UdOAeGmxsjRKcrE 3Lxy2GmjSVfzCyP78ARaQ++R2X3F8nygUcCA03jbuHlU6FJCN7Mrw4+pDolGoTm3Th7y 9vvkbPkYWFOBIR2Pug0UUWsYkVljekTZCvRHUoaaALt1C0qYdjqTAJLE4TXh67SWIHjy Z7dg==
X-Gm-Message-State: AODbwcDIf1J94Pap0/oqwDuo7NLZ6S92yKwvhr2cJrrm3Kh8vGcE4Twl rUmqfVv66Dhf7FwXIZzKxXdY3uoex4+c
X-Received: by 10.129.96.69 with SMTP id u66mr21656620ywb.241.1495473854833; Mon, 22 May 2017 10:24:14 -0700 (PDT)
MIME-Version: 1.0
Received: by 10.129.93.70 with HTTP; Mon, 22 May 2017 10:24:13 -0700 (PDT)
In-Reply-To: <MWHPR15MB1182F59E2B60534CB20EC9C4AFF80@MWHPR15MB1182.namprd15.prod.outlook.com>
References: <CAAF6GDcKZj9F-eKAeVj0Uw4aX_EgQ4DuJczL4=fsaFyG9Yjcgw@mail.gmail.com> <CABcZeBNcnW9zEPZ4mEje1_ejR3npNFz65rw-6qUPn7cQt1Nz9w@mail.gmail.com> <CAAF6GDe1_ih1aUShrzAHUuTzbLx6+0BdVexpGnq90RZsST8GvA@mail.gmail.com> <CABcZeBOX5NXuhgfap2S0naO9PFXv+K-+fZVPbgck6yciVnrYbQ@mail.gmail.com> <CABcZeBPuOupLTNKOtuCgOjYNdiuw571HM-pq1vNZz_8x-XX5mg@mail.gmail.com> <CABcZeBMqALJ10cU7FMUhv8k5Q=tw3yu1-5pdrKzOBM3=g5PHJw@mail.gmail.com> <20170519095316.GA30080@LK-Perkele-V2.elisa-laajakaista.fi> <CAAF6GDeuRMZx9MRynrxMp1fCvRS2jjr0vcqt0R89cJEkD6u=rQ@mail.gmail.com> <20170520101616.GC32428@LK-Perkele-V2.elisa-laajakaista.fi> <CABcZeBNj_X4qbXrH4732kQiAHrBpPZhW1nmn4Xnp-pm0gv1Psg@mail.gmail.com> <CAAF6GDcEKaBaJZU0q822KqoJDL5kyZJGbOBKsnU9tnpU=YvoxA@mail.gmail.com> <MWHPR15MB1182F59E2B60534CB20EC9C4AFF80@MWHPR15MB1182.namprd15.prod.outlook.com>
From: Colm MacCárthaigh <colm@allcosts.net>
Date: Mon, 22 May 2017 10:24:13 -0700
Message-ID: <CAAF6GDeNWpKM_Uu5zN70gW9L=WSLZVJhi=OZwYOC3y24zuphpQ@mail.gmail.com>
To: Kyle Nekritz <knekritz@fb.com>
Cc: Eric Rescorla <ekr@rtfm.com>, "tls@ietf.org" <tls@ietf.org>
Content-Type: multipart/alternative; boundary="001a11471c00e388320550202364"
Archived-At: <https://mailarchive.ietf.org/arch/msg/tls/-RZLfd1S-akcFzyLYsAWmRxQNIM>
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: Mon, 22 May 2017 17:24:17 -0000

On Mon, May 22, 2017 at 10:12 AM, Kyle Nekritz <knekritz@fb.com> wrote:

> The stateless technique certainly doesn’t solve all issues with replay.
> Neither do the other techniques, unless a fairly unrealistic (imo, in most
> use cases) retry strategy is used.
>


The stateless technique is insecure; plain and simple, and it is far more
easily exploited than issues that have caused us to deprecate cipher
suites. It should come out. It enables attacks that are materially
different from forced retries, such as cache probing and statistical
side-channel analysis.


> But the stateless technique is definitely an improvement over no
> anti-replay mechanism at all (for instance it reduces the possible number
> of rounds of a cache probing attack, assuming the cache TTL > replay
> window).
>

Today TLS has robust anti-replay; the comparison to "no anti-replay
mechanism at all" isn't relevant.



> Which mechanisms to use, and whether to enable 0-RTT in the first place
> (or PSK mode at all), should be decided considering the tradeoff between
> security/performance/implementation constraints, etc. In the case of DNS,
> most DNS security protocols (dnssec, etc.) do allow this kind of replay so
> I think it is a pretty reasonable tradeoff to consider.
>


This same argument could be made for keeping MD5, or RC4.  DNSSEC is not
concerned with secrecy. TLS is. This exact kind of replay would compromise
the secrecy of the data being transported.


> Additionally, I think the stateless technique is quite useful as a
> defense-in-depth mechanism.
>

It's tempting because it lowers the costs for implementors, but it's
absolutely not secure.  I seriously doubt that any application can be made
side-channel free in the manner that would be required to preserve secrecy.


> I highly doubt all deployments will end up correctly implementing a
> thorough anti-replay mechanism (whether accidentally or willfully).
>

This is why I think we should GREASE this and report (to users) any sites
that show any signs of replay tolerance.


> The stateless method is very cheap, and can be implemented entirely within
> a TLS library even in a distributed setup, only requiring access to an
> accurate clock. I’d much rather deployments without a robust and correct
> anti-replay mechanism break down to allowing replay over a number of
> seconds, rather than days (or longer).
>

I'd prefer if that were possible too, but it's not possible - it's
insecure.

-- 
Colm