Re: [TLS] Alternative ESNI?

Nico Williams <nico@cryptonector.com> Mon, 17 December 2018 23:33 UTC

Return-Path: <nico@cryptonector.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 D6654130DD4 for <tls@ietfa.amsl.com>; Mon, 17 Dec 2018 15:33:28 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2
X-Spam-Level:
X-Spam-Status: No, score=-2 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, RCVD_IN_DNSWL_NONE=-0.0001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (1024-bit key) header.d=cryptonector.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 4Uv8PwabJWi9 for <tls@ietfa.amsl.com>; Mon, 17 Dec 2018 15:33:26 -0800 (PST)
Received: from insect.birch.relay.mailchannels.net (insect.birch.relay.mailchannels.net [23.83.209.93]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 5190D130DCA for <tls@ietf.org>; Mon, 17 Dec 2018 15:33:22 -0800 (PST)
X-Sender-Id: dreamhost|x-authsender|nico@cryptonector.com
Received: from relay.mailchannels.net (localhost [127.0.0.1]) by relay.mailchannels.net (Postfix) with ESMTP id 4057B3E4158; Mon, 17 Dec 2018 23:33:19 +0000 (UTC)
Received: from pdx1-sub0-mail-a9.g.dreamhost.com (unknown [100.96.11.179]) (Authenticated sender: dreamhost) by relay.mailchannels.net (Postfix) with ESMTPA id D58A13E3D40; Mon, 17 Dec 2018 23:33:18 +0000 (UTC)
X-Sender-Id: dreamhost|x-authsender|nico@cryptonector.com
Received: from pdx1-sub0-mail-a9.g.dreamhost.com (pop.dreamhost.com [64.90.62.162]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384) by 0.0.0.0:2500 (trex/5.16.2); Mon, 17 Dec 2018 23:33:19 +0000
X-MC-Relay: Neutral
X-MailChannels-SenderId: dreamhost|x-authsender|nico@cryptonector.com
X-MailChannels-Auth-Id: dreamhost
X-Befitting-Belong: 06f3458c35dbb024_1545089599016_3994681551
X-MC-Loop-Signature: 1545089599016:919225126
X-MC-Ingress-Time: 1545089599015
Received: from pdx1-sub0-mail-a9.g.dreamhost.com (localhost [127.0.0.1]) by pdx1-sub0-mail-a9.g.dreamhost.com (Postfix) with ESMTP id 8C9F480437; Mon, 17 Dec 2018 15:33:18 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=cryptonector.com; h=date :from:to:cc:subject:message-id:references:mime-version :content-type:in-reply-to; s=cryptonector.com; bh=V2XG4qOnaAYsTi nFB9JXA2MJ72M=; b=bEKnJ0EUmRJcHUql+ZEu+9yAGfx4vhgoH904M5HSs4TTNv C7WQ80798BQKHdwPAqJbKWHQfQW5srYS76eq1rqMPPcIN7g5762wgVrN3oNrrTWo rMdzTnz5utnnvS4OEM3L9WnLG52HRaxMZJcWgFoWxgWoyUaxibZ5138FwOElk=
Received: from localhost (unknown [24.28.108.183]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: nico@cryptonector.com) by pdx1-sub0-mail-a9.g.dreamhost.com (Postfix) with ESMTPSA id 93F8580430; Mon, 17 Dec 2018 15:33:16 -0800 (PST)
Date: Mon, 17 Dec 2018 17:33:14 -0600
X-DH-BACKEND: pdx1-sub0-mail-a9
From: Nico Williams <nico@cryptonector.com>
To: Stephen Farrell <stephen.farrell@cs.tcd.ie>
Cc: tls@ietf.org
Message-ID: <20181217233313.GL15561@localhost>
References: <20181215025346.GJ15561@localhost> <d297696e-5199-779a-697c-a5c3249555f2@cs.tcd.ie>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Disposition: inline
In-Reply-To: <d297696e-5199-779a-697c-a5c3249555f2@cs.tcd.ie>
User-Agent: Mutt/1.5.24 (2015-08-30)
X-VR-OUT-STATUS: OK
X-VR-OUT-SCORE: -100
X-VR-OUT-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgedtkedrudeigedguddvucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuggftfghnshhusghstghrihgsvgdpffftgfetoffjqffuvfenuceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmnecujfgurhepfffhvffukfhfgggtuggjfgesthdtredttdervdenucfhrhhomheppfhitghoucghihhllhhirghmshcuoehnihgtohestghrhihpthhonhgvtghtohhrrdgtohhmqeenucfkphepvdegrddvkedruddtkedrudekfeenucfrrghrrghmpehmohguvgepshhmthhppdhhvghloheplhhotggrlhhhohhsthdpihhnvghtpedvgedrvdekrddutdekrddukeefpdhrvghtuhhrnhdqphgrthhhpefpihgtohcuhghilhhlihgrmhhsuceonhhitghosegtrhihphhtohhnvggtthhorhdrtghomheqpdhmrghilhhfrhhomhepnhhitghosegtrhihphhtohhnvggtthhorhdrtghomhdpnhhrtghpthhtohepnhhitghosegtrhihphhtohhnvggtthhorhdrtghomhenucevlhhushhtvghrufhiiigvpedt
Archived-At: <https://mailarchive.ietf.org/arch/msg/tls/0QoqWd80VMnaKRQF3NVAKB3VsAw>
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: Mon, 17 Dec 2018 23:33:29 -0000

On Sat, Dec 15, 2018 at 01:08:50PM +0000, Stephen Farrell wrote:
> On 15/12/2018 02:53, Nico Williams 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.
> 
> I agree this is worth exploring, though am not sure if it'd be
> better in the end. (I chatted with Viktor about this and said
> I'd try see if I could make it work once I've gotten further
> along coding up the current draft.)

Perhaps this alternative ESNI protocol can complement the current ESNI
proposal.

The idea would be to allow sites that cannot orchestrate ESNI keyshares
across multiple CDNs to opt for this alternative by publishing in DNS
only the fronting domainname(s).  Only then would one pay the extra
round trip price to get ESNI, and only if the client wants it (but the
client should want it).

A client that finds a domain's fronting domain but not ESNI keys would
engage in the active attack resistant variant I posted with the fronting
domainname as the public SNI, and the server would know to respond with
the HRR.

The key is that we need to be able to deploy an ESNI protocol widely and
easily, but if ESNI keyshare orchestration is a big brake on deployment,
then it might take a long time to get traction.

(Note that I never said that DoH/DPRIV would not be needed.  The
alternative would allow simple manual, local configuration, whereas
publishing ESNI keyshares does not.)

> I don't see any point in considering the variant with the easy
> active attack though; as ekr said, I think that was considered

Agreed.  I included it mostly to show how we got to the one that is
resistant to active attacks.  I thought it'd be useful to do that, but
instead it seems to have given everyone something bad to latch onto :(

> before and I'd say that'll just confuse matters and is better
> omitted, so I'm only really considering your figure 2 below.

I agree.

> >         ClientHello
> >         + key_share             -------->
> >                                                         ServerHello
> >                                                         + key_share
> >                                              {EncryptedExtensions*}
> >                                                       {Certificate}
> >                                                 {CertificateVerify}
> >                                 <--------       {HelloRetryRequest}
> >         ClientHello
> >         + key_share
> >         {EncryptedExtensions}   -------->
> >                                               {EncryptedExtensions}
> >                                               {CertificateRequest*}
> >                                                       {Certificate}
> >                                                 {CertificateVerify}
> >                                                          {Finished}
> >                                 <--------       [Application Data*]
> >         {Certificate*}
> >         {CertificateVerify*}
> >         {Finished}              -------->
> >         [Application Data]      <------->        [Application Data]
> > 
> >               Figure 2: Alternative ESNI w/ active protection
> > 
> 
> Some questions:
> 
> - How are you proposing the client knows of the existence of the
>   hidden service? (Aside from local configuration, which is always
>   possible.)

DNS (DPRIV, DoH).

Local config isn't really possible if it means the user has to type in
keyshares.

> - How does the server know to include the HRR in it's answers? (IOW,
>   what ESNI signal is present in the client's 1st flight?

The client uses the fronting domainname as the public SNI payload.  The
server, knowing via local configuration that it has no ESNI keyshares in
DNS, responds with the HRR as above.

> - Ought that be some more general signal? e,g. "client wants to send
>   some EncryptedExtensions, let's do an extra RTT." (I'd like that
>   I think, but the counter argument might be that that's overreach
>   and we'd be better to just stick with an ESNI model that we're
>   confident can get some deployment.)

Yes and no.  In order to get ESNI widely adopted it will probably help
to have a way to trigger this denies the censors an unambiguous "pst,
hey, let's do this thing so the censors don't know your name" signal.

But for that I would think that yes, we'd want a general signal about
this.

> - Given HRR was a kludge for backwards compatibility could changing
>   where that occurs in the protocol trigger more middlebox messes?

Dunno.

> - This seems like supporting the split mode behaviour [1] could be a
>   lot more complex, as this scheme is more embedded in the h/s. Is
>   that fair? (Note: I'm not sure the split mode is really easy in
>   any circumstances though, so that mightn't be a killer argument.)

See above, and below.

Maybe we do both, the current ESNI proposal and this as an alternative
for when ESNI keyshare orchestration is difficult, and in that case you
don't get to do split mode.

> - In tls1.3 the HRR has an accompanying key_share, if pursuing this
>   further I'd say you'd want to consider whether or not that is
>   better to include. (That is, your server's first flight above has
>   a SH and then HRR but only one key_share - it might be better to
>   have a key_share in each, and that might even enable a more
>   tractable split mode model if the cover server could handoff the
>   rest of the h/s after that maybe.)

Ohhh, nice!  That's brilliant!  One of the keyshares (the HRR's) could
be the one shared with the middlebox for split mode.  The client would
derive two sets of handshake traffic keys then.  (If split mode is not
used then the HRR can have the same keyshare as the SH, then only one
set of handshake traffic keys need be derived.  In encrypted extensions
we'd need to identify which key was used -- maybe, the recipient can
always try decrypting with both keys.)

Nico
--