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

Colm MacCárthaigh <colm@allcosts.net> Tue, 23 May 2017 18:07 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 7ED0F129C70 for <tls@ietfa.amsl.com>; Tue, 23 May 2017 11:07:47 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.899
X-Spam-Level:
X-Spam-Status: No, score=-1.899 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_NONE=-0.0001] 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 DJtuKYS1SpdU for <tls@ietfa.amsl.com>; Tue, 23 May 2017 11:07:46 -0700 (PDT)
Received: from mail-yb0-x233.google.com (mail-yb0-x233.google.com [IPv6:2607:f8b0:4002:c09::233]) (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 EB43E129C6F for <tls@ietf.org>; Tue, 23 May 2017 11:07:45 -0700 (PDT)
Received: by mail-yb0-x233.google.com with SMTP id p143so39908378yba.2 for <tls@ietf.org>; Tue, 23 May 2017 11:07:45 -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; bh=EAgjVa5yoq+K0qPOFyGd3/Lv5g/7d1wX7nsgCFu90yE=; b=VmiA5m8KyC5pVcVNVlcjCfQSZkTiYTtPLl+RKJgOx6eCpf2g4fvS9iUqVH+vJmJGqO txmDeeFtQKhtejMVvG6e0V8Ezknl065PvMkcdhBH6AowsJ05wrowrWKiLSV9zO+fEtj5 kFmBLXkXkRRCXGbk9j5aJrltHDSYF28oh/XgxaJGpLBq1p3YOiog3KBPqg9nDLnoXwdg LnDeL9ikLD27xDSYgnuv2tvrKhR2PFsE/JOSiSmwm29nAzI7LBpZ1Ck5MilJyF/5H4WV dgB61+11oUbW5rD2GGWvRNsa5KivCCn+MV89rJz2fYEsCyEcHXLiomGW0FlgmSIO7mQi XuaA==
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; bh=EAgjVa5yoq+K0qPOFyGd3/Lv5g/7d1wX7nsgCFu90yE=; b=I3B7gxzj4c9N8ohRwQEuYKrjE77dO2xs6eeZu/ANir3BZP4krCRUl/5yhSpzVRyeel CvCe89gylcYikk0qaZcxgMMj7PyAJWcomaSCsJ5t9Lze0+bibNGTCDdswI/H5Y+ICXGq 7kq1LaQ8B8wCwuSfCdl8XNfnkTuEvT9W//FaeYO1ltOGna02a9OOXAys2WLq4ZiddTiF 54+yXjQPFt1a69KEeNxSWmcUeaUWQ2s2SqQwUGciPUBK7FpbR1ruITzTl8IqcLC8JQzt QsYlIy2qOB3QFWGU/SW/gEDdxSuPmbDtc8NDcyS3+GVTJ32bFA6ZshsIMbRbXOB96/iE mhGw==
X-Gm-Message-State: AODbwcD1/kTF0kCSKYM4zYK5BrlTynR/5RLe5D8sip0qc2ZHbFh/+vve 7OASRKVKfBJNATdu7qx75+iRGabWlzbG3zc=
X-Received: by 10.37.180.18 with SMTP id n18mr23321166ybj.116.1495562864717; Tue, 23 May 2017 11:07:44 -0700 (PDT)
MIME-Version: 1.0
Received: by 10.129.93.70 with HTTP; Tue, 23 May 2017 11:07:43 -0700 (PDT)
In-Reply-To: <86A85A1E-A0A2-4692-ADB1-D5126E421B70@dukhovni.org>
References: <CAAF6GDcKZj9F-eKAeVj0Uw4aX_EgQ4DuJczL4=fsaFyG9Yjcgw@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> <CAAF6GDeNWpKM_Uu5zN70gW9L=WSLZVJhi=OZwYOC3y24zuphpQ@mail.gmail.com> <f8f8db4a-7d4e-590b-25c2-b1cbac6b5313@huitema.net> <CAAF6GDcarzUXiEAxBm9RaLQT5A3B=2TPkngEavEY=wQMHU=9Gw@mail.gmail.com> <1c188f36-c197-20f7-48e4-5d75ac4a2211@akamai.com> <CAAF6GDfCRD3nQmr0JB75CxLkqjmDiWn9co0DXCJHwS3TK625WA@mail.gmail.com> <55096b5d-dc74-fae4-57e3-83d4355d6050@huitema.net> <86A85A1E-A0A2-4692-ADB1-D5126E421B70@dukhovni.org>
From: Colm MacCárthaigh <colm@allcosts.net>
Date: Tue, 23 May 2017 11:07:43 -0700
Message-ID: <CAAF6GDeum-XLt+f3_q9CRabC7Ro_0quu90jWVhaWeYbJntfzZA@mail.gmail.com>
To: TLS WG <tls@ietf.org>
Content-Type: multipart/alternative; boundary="f403045e6aa24ae4ef055034dda4"
Archived-At: <https://mailarchive.ietf.org/arch/msg/tls/eSLj2xrExcP2iwU-B-l9QHT0BOs>
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, 23 May 2017 18:07:47 -0000

On Tue, May 23, 2017 at 10:50 AM, Viktor Dukhovni <ietf-dane@dukhovni.org>
wrote:

> The fix is to amend DNSpriv to require stateless (random rather
> than say round-robit) RRset rotation.  With random rotation, the
> next RRset order is independent of previous queries.
>

That's a good fix for that specific local problem. But next, consider a
different one; what if a DNS provider has q-tuple rate-limiting for DOS
attacks? That's not an unusual measure for large providers - even bind9 has
support for it. Well with stateless 0RTT I can replay the clients query
over and over until the rate-limiting trips; now I have a DOS attack *and*
a privacy-defeating attack; because the rate limit exposes what the query
was for.


> Secondly, even with the 0-RTT leak, while privacy against an active
> attacker might not be assured for all users, there is fact privacy
> for most users, especially against a purely passive adversary.
>

My reference here isn't really meant as a criticism of DNSPriv - we should
make DNS private and secure, that's awesome, and it's a small attack in the
overall context of DNS. It's meant like Christian said; it is really really
hard to make an application protocol idempotent and side-effect free and
very smart people are often wrong about assuming that they are. I see
at-most-once 0-RTT mitigation as essential to avoiding a lot of real world
security issues here, because of that difficulty.


> To the extent that DNSpriv over TLS happens at all, 0-RTT
> will be used for DNS, and will be used statelessly (allowing
> replays).


That's not good for users, and seems like another very strong reason to
make it clear in the TLS draft that that it is not secure. FWIW; DNSCurve
includes nonces to avoid attacks like this:
https://dnscurve.org/replays.html (which means keeping state).

Stateless mechanisms simply aren't secure. We wish they were; because it is
so attractive operationally - just as it would be nice if my MD5
accelerators were still useful. But they don't hold up. We've even seen
this before with DTLS; where replay tolerance opened up the window to
several cryptographic attacks. It's an all-round bad idea.

I've seen a number of arguments here that essentially boil down to "We'd
like to keep it anyway, because it is so operationally convenient". Is that
really how this process works? Don't demonstrable real-world attacks
deserve deference?

-- 
Colm