Re: [TLS] Fwd: New Version Notification for draft-belyavskiy-fakesni-00.txt

Stephen Farrell <stephen.farrell@cs.tcd.ie> Thu, 21 February 2019 00:40 UTC

Return-Path: <stephen.farrell@cs.tcd.ie>
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 6B94B130F12 for <tls@ietfa.amsl.com>; Wed, 20 Feb 2019 16:40:05 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -4.301
X-Spam-Level:
X-Spam-Status: No, score=-4.301 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_MED=-2.3, SPF_PASS=-0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (1024-bit key) header.d=cs.tcd.ie
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 DlKgDZfSgnqu for <tls@ietfa.amsl.com>; Wed, 20 Feb 2019 16:40:02 -0800 (PST)
Received: from mercury.scss.tcd.ie (mercury.scss.tcd.ie [134.226.56.6]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 18AEF130F39 for <tls@ietf.org>; Wed, 20 Feb 2019 16:40:01 -0800 (PST)
Received: from localhost (localhost [127.0.0.1]) by mercury.scss.tcd.ie (Postfix) with ESMTP id 1D748BE3E; Thu, 21 Feb 2019 00:39:59 +0000 (GMT)
X-Virus-Scanned: Debian amavisd-new at scss.tcd.ie
Received: from mercury.scss.tcd.ie ([127.0.0.1]) by localhost (mercury.scss.tcd.ie [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id wRZi8fNYRJ3v; Thu, 21 Feb 2019 00:39:57 +0000 (GMT)
Received: from [10.244.2.138] (95-45-153-252-dynamic.agg2.phb.bdt-fng.eircom.net [95.45.153.252]) by mercury.scss.tcd.ie (Postfix) with ESMTPSA id 4CA4BBE39; Thu, 21 Feb 2019 00:39:57 +0000 (GMT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=cs.tcd.ie; s=mail; t=1550709597; bh=1aRTb33nCOLkJoKiYM86gfdGhvthsWmVTeYeCKXDhXA=; h=To:References:From:Subject:Date:In-Reply-To:From; b=38q6gb2QRwhsTLznC/134LGJuBGHZIh7YldKOGmzFzf/GG5uY0OllQ5oiYCiJ4m6g nqImL/VDZk8xJGqq6O6ufMc4ngcrN03eLK+0ndDCdZi0FCtxD4Fyp/YkLI9fKIJen0 d1zxHO8T+M3DTOsUdr7MwSONzLf8Aa26Iv2TevgA=
To: Christian Huitema <huitema@huitema.net>, tls@ietf.org
References: <155060540091.20709.12797700493315209480.idtracker@ietfa.amsl.com> <CADqLbzLt3sJhisojiEDA93zOymBE0QjVxT2T+NAZjYSGm2Nzmg@mail.gmail.com> <1550634231892.18369@cs.auckland.ac.nz> <CADqLbz+zYNTwCidJhrR9DFaj3NqJszdx4bg=qkzwptMY9mYXrg@mail.gmail.com> <1550647276159.53158@cs.auckland.ac.nz> <CADqLbzKppD9MjQ9fX=gbXNFXgKkFE5jeLVnWcyoAt8ZZHAPX4w@mail.gmail.com> <CADqLbzL6epMoAs4Pe0XYB8XjrTJ52zLY_TGdpq0yMAs2Ax9_ug@mail.gmail.com> <0e9b3999-0e0a-d3e0-e9e3-a6c691fa37d1@huitema.net>
From: Stephen Farrell <stephen.farrell@cs.tcd.ie>
Openpgp: id=5BB5A6EA5765D2C5863CAE275AB2FAF17B172BEA; url=
Autocrypt: addr=stephen.farrell@cs.tcd.ie; prefer-encrypt=mutual; keydata= mQINBFo9UDIBEADUH4ZPcUnX5WWRWO4kEkHea5Y5eEvZjSwe/YA+G0nrTuOU9nemCP5PMvmh 5Cg8gBTy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fBoiALb0+dQHNHDtFnNGY3Oe8z1M9c5aDG3/s29QbJ +w7hEKKo9YMAEQEAAYkCJQQYAQgADwUCWj1QMgIbDAUJCZQmAAAKCRBasvrxexcr6qwvD/9b Rek3kfN8Q+jGrKl8qwY8HC5s4mhdDJZI/JP2FImf5J2+d5/e8UJ4fcsT79E0/FqX3Z9wZr6h sofPqLh1/YzDsYkZDHTYSGrlWGP/I5kXwUmFnBZHzM3WGrL3S7ZmCYMdudhykxXXjq7M6Do1 oxM8JofrXGtwBTLv5wfvvygJouVCVe87Ge7mCeY5vey1eUi4zSSF1zPpR6gg64w2g4TXM5qt SwkZVOv1g475LsGlYWRuJV8TA67yp1zJI7HkNqCo8KyHX0DPOh9c+Sd9ZX4aqKfqH9HIpnCL AYEgj7vofeix7gM3kQQmwynqq32bQGQBrKJEYp2vfeO30VsVx4dzuuiC5lyjUccVmw5D72J0 FlGrfEm0kw6D1qwyBg0SAMqamKN6XDdjhNAtXIaoA2UMZK/vZGGUKbqTgDdk0fnzOyb2zvXK CiPFKqIPAqKaDHg0JHdGI3KpQdRNLLzgx083EqEc6IAwWA6jSz+6lZDV6XDgF0lYqAYIkg3+ 6OUXUv6plMlwSHquiOc/MQXHfgUP5//Ra5JuiuyCj954FD+MBKIj8eWROfnzyEnBplVHGSDI ZLzL3pvV14dcsoajdeIH45i8DxnVm64BvEFHtLNlnliMrLOrk4shfmWyUqNlzilXN2BTFVFH 4MrnagFdcFnWYp1JPh96ZKjiqBwMv/H0kw==
Message-ID: <7519be36-2cb1-af8e-a313-a8ae9e799c70@cs.tcd.ie>
Date: Thu, 21 Feb 2019 00:39:56 +0000
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.4.0
MIME-Version: 1.0
In-Reply-To: <0e9b3999-0e0a-d3e0-e9e3-a6c691fa37d1@huitema.net>
Content-Type: multipart/signed; micalg="pgp-sha512"; protocol="application/pgp-signature"; boundary="au1RPrfKu3u3Sz0HNEBR5BgmFo88dS8CF"
Archived-At: <https://mailarchive.ietf.org/arch/msg/tls/ANoQev3lzUh7e86GgUJ5pv9SgaU>
Subject: Re: [TLS] Fwd: New Version Notification for draft-belyavskiy-fakesni-00.txt
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: Thu, 21 Feb 2019 00:40:05 -0000


On 20/02/2019 23:48, Christian Huitema wrote:
> 
> Out of all the requirements listed in the encryption requirements draft,
> the requirement to "not stand out" is probably the hardest to comply
> with. 

Yep. I think it'd be worthwhile spending a bit of time to see if
we could do better on that based on the esni -02 draft and how
we guess that'll evolve. The ESNI greasing PR would help here as
it'd mean plenty of ESNI extensions in ClientHello's if people
really did grease in sufficient numbers. If that got to the level
where blocking all ESNI wasn't feasible, then maybe that's good
enough.

But there is something attractive about a stealthy-ESNI scheme
so maybe it's worth spending a bit of time trying to see if we
can find one. I'd be up for taking a shot at that in Prague if
any other interested folks'll be there, are familiar enough
with esni-02 and it's PRs and would like to give it a shot over
a beer. (Just informally, it's a bit of a stretch-goal I figure,
so not worth getting excited about for now - anyway ping me offlist
if you'll be there and would be interested and I'll suggest a
time/place for a stealthy beer & chat.)

> The current ESNI draft works but usage of ESNI can still be
> detected. As Dmitri points out, there are locales where standing out
> will enable censorship. So, what to do? Well, if we want to not stand
> out yet carry some information, that's pretty much the definition of a
> hidden channel.
> 
> Would it be possible to engineer a hidden channel in the TLS 1.3 Hello?
> I bet that's quite doable. I am sure that fields like "opaque
> Random[32]" or "opaque legacy_session_id<0..32>" could be used
> creatively, and there are other fields in common extensions that could
> also be of service. Of course, "could be done" does not mean that the
> IETF will want to standardize it.

Right. And even if the IETF did want to standardise something,
that doesn't mean people would implement nor deploy. It's a
hard problem. Dave Plonka and I were chatting over beer recently
and came up with the idea below that we raised offlist with a few
folks who're interested in ESNI. It got a "mixed" response is
the best I could claim, where "mixed" varied from some enthusiasm
from one person to a very clear "no, don't like/want that" from
another but with silence in-between (the silence being the real
killer;-)

But maybe if we get a few folks and beers together a better
analysis will emerge...

Cheers,
S.

The idea is an extension to the ESNI scheme that can work in some
cases, is more bandwidth efficient and is stealthier in that one cannot
tell just from passively watching one TLS h/s that ESNI is in use.

Unless all the conditions required below are met, ESNI works according
to the (evolution of the) -02 draft. (I.e. if you can, then do this,
if not, use the approach that's in -02 or whatever that turns into.)

The TLS client needs to have a working IPv6 address.  The TLS server
needs to be contactable on any address that matches its /64 prefix.
The TLS server probably needs to sort of randomly change the AAAA
it publishes in a yet to be determined manner. That might be like
an IPv6 privacy address or might have to be a new flavour of server
privacy address.

ESNI calls for a key share to be published in the DNS below the name of
the TLS server.  Let's call that public key share g^D. (Even if using
ECC, I find it easier to think in terms of multiplicative groups;-)
This is the same as the -02 draft.

Similarly, let's use g^A for the client key share in the ClientHello
and g^B for the server's equivalent share.

Assume that all public shares are from the same group, so g^AD makes
just as much sense as g^AB. (We'd need to mandate that the client
MUST first pick the group for g^A ignoring what's possible based on
ESNIKeys as we don't want the ESNI tail wagging the TLS1.3 dog.)

We add another (optional) field to the ESNIKeys RR value that contains
an IPv6 /64 prefix for the TLS server. And perhaps a flag that says
that clobbering the low-order 64 bits of the IPv6 address is ok, i.e.
a flag that says a client can use this trick instead of the (evolution
of) the -02 scheme.

The idea is to use g^AD and the TLS ClientHello random number to
encrypt (a truncated hash of) the name that would otherwise be sent as
an SNI value.

That encryption has to produce a 64-bit output.

The output of the encryption is used as the IID of the IPv6 address
used to contact the server.

So something like:

    Z = g^AD
    K = KDF(Z,client-random)
    IID = E64(K,H64(servername))

H64 could be a simple truncated SHA-256.
E64 could be 3-DES in ECB mode:-)

Instead of a client-chosen random challenge (as per the -02 draft), in
this case the EncryptedExtensions returned by the server contains the
full (non-truncated) hash of the servername.

Some notes on the above:

- layering, smayering:-)
- yes, this is IPv6-only which puts off at least some implementers
- yes, the server needs to know the hashed SNI ahead of getting
  the first flight from the client for this scheme to be workable
- yes, not all wildcard cert scenarios might work with this (but
  some would)
- if it's ok for the EncryptedExtensions ESNI value to be fixed
  per hidden server (as proposed above) then that maybe makes the
  split-server mode much easier and more realistic, but...
- the above may be vulnerable to some attacks from which the -02
  version doesn't suffer (e.g. that allow an attacker to confirm
  that a client's CH is for some hidden service if the bad actor
  has guessed the right server already) - pondering such needs
  more work