Re: [TLS] About encrypting SNI

Andy Lutomirski <luto@amacapital.net> Wed, 16 April 2014 18:55 UTC

Return-Path: <luto@amacapital.net>
X-Original-To: tls@ietfa.amsl.com
Delivered-To: tls@ietfa.amsl.com
Received: from localhost (ietfa.amsl.com [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id B45341A01C9 for <tls@ietfa.amsl.com>; Wed, 16 Apr 2014 11:55:54 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.979
X-Spam-Level:
X-Spam-Status: No, score=-1.979 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, FM_FORGED_GMAIL=0.622, RCVD_IN_DNSWL_LOW=-0.7, SPF_PASS=-0.001] autolearn=ham
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 vTfMIX0qrbbG for <tls@ietfa.amsl.com>; Wed, 16 Apr 2014 11:55:50 -0700 (PDT)
Received: from mail-lb0-f170.google.com (mail-lb0-f170.google.com [209.85.217.170]) by ietfa.amsl.com (Postfix) with ESMTP id 0CEE21A01DD for <tls@ietf.org>; Wed, 16 Apr 2014 11:55:49 -0700 (PDT)
Received: by mail-lb0-f170.google.com with SMTP id s7so8611494lbd.29 for <tls@ietf.org>; Wed, 16 Apr 2014 11:55:46 -0700 (PDT)
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc:content-type; bh=W0Az49bU2weYSOVxG029l0xySX473eq0b1WOtgBJBMg=; b=mtCFXnXQRsoNO2Oax7eKhgn/u8oUWtAeHRe9r2QH1Y2kaO4ywEjztFUPNGHn+JCx7P YODuNQ5NqJsf0LvtSlgDATpwjPPmqN+4LXE9iJiKUekumlw58MBAHLbTHwzZVQhQeLSs Pf2CTaRrxzGd5/2zavfl1MTyNBs78ok9huvifsg4XoW6zzDiXaarVnMZKlWR4XtAAsPn bZAGfeFDjbxQDjeTAmn6EGqxlHg1LL1xp2I3xp46hI/9lclbu07eOEVK1Ce+kDzeqXsf MSrl/ZZdbR7Sc14r6BiaAXxrDOUnlbxj+Q2QmtXDtJ2bifI1GWiWBS3/qD5zPHSYfCM8 MzMg==
X-Gm-Message-State: ALoCoQn0Dt7yUhEkWYI/lzy9Rq9DcHCBnlCseOqsLTvzNKlz4W01SqfzFX5DqPrtHM8QxVai3W3s
X-Received: by 10.152.234.130 with SMTP id ue2mr6603102lac.0.1397674546110; Wed, 16 Apr 2014 11:55:46 -0700 (PDT)
MIME-Version: 1.0
Received: by 10.152.21.7 with HTTP; Wed, 16 Apr 2014 11:55:25 -0700 (PDT)
In-Reply-To: <CAFggDF13=bKS3_kRz_uh-6y71TQ9O4v1e3+xs3fiM4YZwjAULA@mail.gmail.com>
References: <2A0EFB9C05D0164E98F19BB0AF3708C7120A04ED40@USMBX1.msg.corp.akamai.com> <534C3D5A.3020406@fifthhorseman.net> <474FAE5F-DE7D-4140-931E-409325168487@akamai.com> <D2CB0B72-A548-414C-A926-A9AA45B962DA@gmail.com> <2A0EFB9C05D0164E98F19BB0AF3708C7120B490162@USMBX1.msg.corp.akamai.com> <CACsn0cmusUc3Rsb2Wof+dn0PEg3P0bPC3ZdJ75b9kkZ5LDGu_A@mail.gmail.com> <534DB18A.4060408@mit.edu> <m2ppkhl08c.fsf@usma1mc-0csx92.kendall.corp.akamai.com> <CAFggDF13=bKS3_kRz_uh-6y71TQ9O4v1e3+xs3fiM4YZwjAULA@mail.gmail.com>
From: Andy Lutomirski <luto@amacapital.net>
Date: Wed, 16 Apr 2014 11:55:25 -0700
Message-ID: <CALCETrU-w=yon9TVzbvGSbznEgThxzUkzy4Yeu+CBfSp7Zk2hw@mail.gmail.com>
To: Jacob Appelbaum <jacob@appelbaum.net>
Content-Type: text/plain; charset="UTF-8"
Archived-At: http://mailarchive.ietf.org/arch/msg/tls/YhB0JNys8eU0M1Oum7wiRiP-idE
Cc: "tls@ietf.org" <tls@ietf.org>
Subject: Re: [TLS] About encrypting SNI
X-BeenThere: tls@ietf.org
X-Mailman-Version: 2.1.15
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: <http://www.ietf.org/mail-archive/web/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, 16 Apr 2014 18:55:54 -0000

On Wed, Apr 16, 2014 at 11:47 AM, Jacob Appelbaum <jacob@appelbaum.net> wrote:
> On 4/16/14, Brian Sniffen <bsniffen@akamai.com> wrote:
>> Andy Lutomirski <luto@amacapital.net> writes:
>>
>>> On 04/14/2014 10:21 PM, Watson Ladd wrote:
>>>> Now, the best mechanism I can think off would be to use DNS to preload
>>>> a per-IP SNI encryption key, or have the handshake optionally involve
>>>> getting one. But I still can't figure out how to authenticate the
>>>> gotten key without a lot of complexity. The best solution is for the
>>>> client and server to do a DH, then pass the desired website (which
>>>> might get you investigated when the initial handshake is intercepted),
>>>> and have that cert sign the handled DH, then go back and do a TLS
>>>> connection. Ugh.
>>>
>>> What if it were an opt-in thing?  A hypothetical DANE extension could
>>> associate with each domain a tuple (ClientHello-protection public key,
>>> TLS version guaranteed to be supported).  Clients could resolve that
>>> essentially for free as long as they're already querying DNS, and this
>>> could prevent downgrade attacks and give an efficient way to encrypt the
>>> entire ClientHello.
>>
>> Then the censor looks to see which key is used, yes?
>
> Keys are free - names and signatures are not. The good news is that
> signatures may be regenerated at a low cost depending on the systems;
> the bad news is that names generally can't change without a lot of
> effort on both the client and the server side.
>

I'm not sure I understand what you mean.

>>
>>> There's a weak argument to be made for arranging for the actual
>>> encrypted ClientHello to be indistinguishable from random by anyone who
>>> doesn't know the private key.  This ought to be straightforward using
>>> Elligator.  Off the top of my head, it sounds cute, but I don't really
>>> see a benefit.
>>
>> Or does this protect against it?
>>
>
> I have previously hoped for a TLS (handshake, protocol,
> implementation, etc) that actually considers that an attacker will try
> to distinguish users and then treat them differently, eg: attacking
> them, even with a simple DoS.
>
> We see this often with the Tor network. We once were blocked in Iran
> because we used a specified prime from the relevant RFC - it turns out
> nearly no one else was impacted because they used another prime. We
> changed the primes on the server to be dynamically generated and the
> network was unblocked without a client side update. Fixed identifiers
> or patterns in protocols are how censors target specific users and
> protocols for censorship. The SNI in TLS is the most obvious and easy
> distinguisher and it also suggests that privacy isn't actually a
> cohesive security property of Transport Layer Security.
>
> Not every TLS service uses DNS simply because it may also use names.
> Names aren't only used in DNS. Just as there is more to the internet
> than the world wide web, there is more to naming than the DNS.

I think that my updated proposal should work for you, as long as Tor
has some other way to distribute the same data that's normally in the
DNS record.  I imagine that it could be distributed along with the IP
addresses of entry nodes.  Am I missing something here?

My proposal, as currently written, results in the encrypted form the
the TLS handshake looking like a fixed header (ClientHello TLS version
whatever, throw-away values in fixed fields, extension prefix for the
actual encrypted Clienthello) followed by data that is
indistinguishable from random due to the use of Elligator 2 /
Elligator Squared.

If non-Tor sites adopt this, then Tor traffic will look just like
everything else.

--Andy