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

Colm MacCárthaigh <colm@allcosts.net> Wed, 24 May 2017 15:32 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 574C812EB0D for <tls@ietfa.amsl.com>; Wed, 24 May 2017 08:32:41 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.198
X-Spam-Level:
X-Spam-Status: No, score=-1.198 tagged_above=-999 required=5 tests=[BAYES_05=-0.5, 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 qKiPuO_O060z for <tls@ietfa.amsl.com>; Wed, 24 May 2017 08:32:36 -0700 (PDT)
Received: from mail-yw0-x22e.google.com (mail-yw0-x22e.google.com [IPv6:2607:f8b0:4002:c05::22e]) (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 0940612EB0A for <tls@ietf.org>; Wed, 24 May 2017 08:32:36 -0700 (PDT)
Received: by mail-yw0-x22e.google.com with SMTP id l74so91022235ywe.2 for <tls@ietf.org>; Wed, 24 May 2017 08:32:36 -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=mWnk5ZJewVfH/xTJBc8jDV0vGTDP0KnRHMjJXRg7EJY=; b=XBHav5/B5thILCWJbpTmuvHVAmW1ueEAL5dkCKd40AqcCAf08NdXPQ8tDyyTgnMp7e vP+5FhDLYQnK+bJEr15+hjZ6Q/C6QEmUfZ6fhb56o7fgSmzSoBAuAMQ74HWtrPNQXiDy XvtZqk+DmVhfFYs/hRkOkjTExYF2PdnX6q0h0ky98OGb9H54gp3LcdWRk4X/X+fmFxtJ Q1aTfJ2nUXKgf21b3PVFNgA3DK4tl643GevVs5+yZzA+fUKdD0ym6WxtFFoDTcqxTXrV LSxMgydCAQ3+UBTuBSW420UQ90cjrkEvGM7Q53+rvLTyNoBvZhrbFJMXJYKHUBe3QsK+ 2UFg==
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=mWnk5ZJewVfH/xTJBc8jDV0vGTDP0KnRHMjJXRg7EJY=; b=d965y8DvOw+mD47PrH3ekNmXYT+Rr+fIgt03JnLLlbkq0UPxMnS00eSSIE2GWPcDDp 46WPPTGKYk+i3pp1Xd2wOqMYRkkKTcN3pK9qdh7hiLa+P5VKz8tLDKWUSbqksS24M3m/ 0Uo3hF7MlXQAaOMMyQ6CTX/t2oba8LjK1jh3X9sMEYLlgImNY32pGNdZAiEgS2wVR38k qFD4Jjyc8vBknt7XNq1wKIXMLCzQADyvzOKc9JdtsmGdwbQkpUbWxkl+UPrOw9kC60tA qGWQnWr2d7x39R15tgNThzsTxMrsWhVw8gPPs5g+9WHmXQw42+2KePoYDKj56XPV3sjk S+cA==
X-Gm-Message-State: AODbwcA+XynmoF1fGcoDamN/wLP8CQOxJYyWqvOMZD7w5nRUSD8l4aXI f4htSYqeArEOUD8UCk/u6qSWALjy8Ldp
X-Received: by 10.129.96.69 with SMTP id u66mr30648341ywb.241.1495639955134; Wed, 24 May 2017 08:32:35 -0700 (PDT)
MIME-Version: 1.0
Received: by 10.129.93.70 with HTTP; Wed, 24 May 2017 08:32:34 -0700 (PDT)
In-Reply-To: <20170524143042.GA31858@LK-Perkele-V2.elisa-laajakaista.fi>
References: <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> <071fb4df-56e6-d82a-87de-3db084235021@akamai.com> <20170524143042.GA31858@LK-Perkele-V2.elisa-laajakaista.fi>
From: Colm MacCárthaigh <colm@allcosts.net>
Date: Wed, 24 May 2017 08:32:34 -0700
Message-ID: <CAAF6GDf5MtnX+45BPyFDGcE+QW5a3-cEZ-6CDPSDWD+8HZ5J=g@mail.gmail.com>
To: Ilari Liusvaara <ilariliusvaara@welho.com>
Cc: Benjamin Kaduk <bkaduk@akamai.com>, "tls@ietf.org" <tls@ietf.org>
Content-Type: multipart/alternative; boundary="001a11471c003d533b055046d096"
Archived-At: <https://mailarchive.ietf.org/arch/msg/tls/Bc-qoFKeeHUm9AYmeGaFB-qC8Ws>
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: Wed, 24 May 2017 15:32:41 -0000

On Wed, May 24, 2017 at 7:30 AM, Ilari Liusvaara <ilariliusvaara@welho.com>
wrote:
>
> > Right, this would bring replays down from the millions hypothesized for
> > the weak time-based thing to more like tens, which is kind of in the
> > regime that we are currently in with (at least some) application
> behavior.
>
> Actually, even tens of replays at TLS level is quite dangerous,
> especially if to different servers (bad information leaks via cache
> attacks).
>

It hard stops replays, but does nothing about retries, and I think that's
ok. The client is in much more control of retries, and it's similar (if not
identical) to what can happen today with an interrupted TCP or TLS
connection. If a client permits hundreds, or millions of forced retries, I
think that's more appropriately handled at the client/application level,
but keep in mind there are typically seconds between the retries and the
rate of attack is slow.

Replays are when an attacker can send the same data at-will and it's
completely unknown to the client, it can happen out of band over different
network connectivity, in a very short and sharp interval of time, possibly
even to different server endpoints, and can be used by attackers to gather
information. These I think need to be mitigated at the TLS level; and
should be hard-stopped.

> Another crazy idea would be to just say that servers MUST limit the use
> > of a single binder to at most 100 times, with the usual case being just
> > once, to allow for alternative designs that have weaker distributed
> > consensus requirements (but still describe these current two methods as
> > examples of ways to do so).
>
> You actually need strong distributed consensus about all accepted
> 0-RTT here.
>

This pattern doesn't need strong consensus. If you have 10 servers, you
could give each 10 goes at the ticket, and let each exhaust its 10 attempts
without any coordination or consensus. You likely won't get to "exactly
100", but you will get to "at most 100 times".

But the inner critical section would be inherently more complicated.  For
the at most once case we need to a critical section that performs an
exclusive-read-and-delete atomically. It's a mutex lock or a clever
construction of atomic instructions.  For "at most N" we now need to
perform a decrement and write in the critical section, and it becomes more
like a semaphore.

It's probably not a pattern that's worth the trade-offs.

-- 
Colm