Re: [TLS] Alternative ESNI?

Eric Rescorla <ekr@rtfm.com> Sat, 15 December 2018 04:02 UTC

Return-Path: <ekr@rtfm.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 418AF129BBF for <tls@ietfa.amsl.com>; Fri, 14 Dec 2018 20:02:16 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -3.358
X-Spam-Level:
X-Spam-Status: No, score=-3.358 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIMWL_WL_MED=-1.459, 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=rtfm-com.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 MmX9SiUtxoo3 for <tls@ietfa.amsl.com>; Fri, 14 Dec 2018 20:02:14 -0800 (PST)
Received: from mail-lj1-x232.google.com (mail-lj1-x232.google.com [IPv6:2a00:1450:4864:20::232]) (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 35AA6128CF3 for <tls@ietf.org>; Fri, 14 Dec 2018 20:02:14 -0800 (PST)
Received: by mail-lj1-x232.google.com with SMTP id n18-v6so6576031lji.7 for <tls@ietf.org>; Fri, 14 Dec 2018 20:02:14 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rtfm-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=hTeKd3+vEI/5YtA6vB2TKzhoQJHJDl3ux5Ns1vdLvXs=; b=xhHwY3eEQ66PX4E+k3UphmiEnY9BZDNcr4HFsKdncScpzJYSTrFelolC+mBdXiDPuS nuC4CxSmi8OeQnwnbDI1q4FdQjM7yKuuGrPalV51+WmmkV/oepISsAR2y9lG06ctPQuz Edhbg5/HC3XpASdOxlGPVj+r24w07yNJX3h86Bz/HwvOpbAv1iTYAUyHJtFriDMncIzW jEJQxnT5lMm7I2tnUqLO/alC0Uk8RLpCLSjsUZI7o+c6S53mI4AcpblKSxsi3ApZgLjV e5scaPAf7QB4uJb1isnO31u/xJW5slKj5ABRjg1kxCp0fxFM+XTBOJ413X3OslsbuRVb arTw==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=hTeKd3+vEI/5YtA6vB2TKzhoQJHJDl3ux5Ns1vdLvXs=; b=oXd53hEi5fFngc8d7AwsLAi6WJRg0WjfM++zji9NCTojZhx4fSVDymymD/kKeg2Qb6 BTcl4XZdIjnCyRzmUWY9fCS8NtNA5ICdjXGh12G6CC4vUorJ/xdQpUgXHqIXrDaMJBlC WQSOMIL3WLOtGmd8F6Q/Au3+IWBci0Ly5yfebOoU+bSP0zQhC+3RkNzs7XWdu4UxQJzB dM1UWvzNnveseoli6gCXOdUrFmqZeKRvalRpHkH3SVs5KClsx2O35285A3c9rPmBNtcB e7moCFaZ5p4TQjxTq3x/C8TzUhc8YQBxrsgPfjMYiibxZ6m6UVEj1Wcz1xd7W+C8HAZZ dB4g==
X-Gm-Message-State: AA+aEWYemqn44E2JgoAjblEzAKqeZqv188xhYTND31w0uJU5CAQa7/Ii xFe7L7flQAF3MNspHlSyya/QyJ9kX7WOrwzu37XwHjMl
X-Google-Smtp-Source: AFSGD/UnZngz7BSKNyB7Z1UsX5skC1uIFDCQ56FSVy4gFCkfn45kiS3woheZ165xdn/Jz4uTpBjA6SwLlknQibrRRDM=
X-Received: by 2002:a2e:91d1:: with SMTP id u17-v6mr3093222ljg.160.1544846532250; Fri, 14 Dec 2018 20:02:12 -0800 (PST)
MIME-Version: 1.0
References: <20181215025346.GJ15561@localhost>
In-Reply-To: <20181215025346.GJ15561@localhost>
From: Eric Rescorla <ekr@rtfm.com>
Date: Fri, 14 Dec 2018 20:01:35 -0800
Message-ID: <CABcZeBM_7LF-UDH8NR3Kad-8zSJBWwuNsDEJVAagHf1cV4Ow6g@mail.gmail.com>
To: Nico Williams <nico@cryptonector.com>
Cc: "<tls@ietf.org>" <tls@ietf.org>
Content-Type: multipart/alternative; boundary="000000000000c9a764057d079c4d"
Archived-At: <https://mailarchive.ietf.org/arch/msg/tls/9aNMyXyvck936Z428KY6xOut7dg>
Subject: Re: [TLS] Alternative ESNI?
X-BeenThere: tls@ietf.org
X-Mailman-Version: 2.1.29
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: Sat, 15 Dec 2018 04:02:17 -0000

On Fri, Dec 14, 2018 at 6:54 PM Nico Williams <nico@cryptonector.com> wrote:

> OpenSSL extracts and uses SNI from session resumption tickets.
>
> This gave Viktor Dukhovni and Matt Caswell an idea that I'll relay here
> on their behalf.
>
> Also, while we're at it, I'd like to note that SNI is not the only thing
> requiring privacy protection from the client.  There's also the PSK
> identity payload for non-resumption PSKs...  Not as important as SNI,
> perhaps, nonetheless I think we should maximize privacy, else we'll be
> engaging in repeated encrypted-{fill-in-the-blank} exercises.
>
> Our proposal makes DNS optional (for co-tenancy fronting discovery) and
> DNSSEC not necessary.
>
> The basic idea is to use a HelloRetryRequest to make a handshake traffic
> secret available to the client for it to use in its subsequent hanshake
> messages.  This form is susceptible to an SNI disclosure active attack
> -- same as the current ESNI proposal w/o DNSSEC.  This variant adds one
> round-trip to full handshakes.
>

We looked at this class of design during the initial work on TLS 1.3 because
(a) it has trivial active attacks, as you note and (b) we don't want people
to
have to accept an extra round trip in order to get ESNI, because that's a
major disincentive to doing it.

WRT to the active attack point, DNSSEC isn't necessary with the current ESNI
design. What's necessary is that the client be able to get the ESNIKeys
record
(and the A/AAAA records) securely wrt to the attacker trying to get the SNI.
However, in a large number of cases (e.g., an attacker on your local
network,
there are non-DNSSEC ways of obtaining this property, such as using DoH.
In addition, if the attacker controls DNS (or generally can observe DNS
traffic)
then getting the SNI encryption key securely isn't sufficient because the
attacker
can just learn the domain name from the DNS lookup (or return a unique
IP for each query and then use that to look up the SNI from the IP).





> We can then optionally piggy-back the server's Certificate and
> CertificateVerify along with the HelloRetryRequest (provided the
> client's initial key_share is acceptable to the server), and now we have
> authenticated the server under its fronted name, which means there is no
> active attack on the ESNI.  This still only adds just the one round-trip
> to full handshakes.  And look ma', now w/ no DNSSEC requirement to avoid
> active attacks.
>

This seems like a more invasive version of what David Benjamin et al.
proposed the
other day, just without the ESNI key at all. I don't think this is an
acceptable
general solution for latency reasons (as opposed to fallback), and of course
you still need some way to securely obtain the domain name you put in
the SNI, and if this isn't done with DNS, then you end up with a situation
where very few people use ESNI and so you stick out.

-Ekr