Re: [TLS] "Encrypted" SNI

Hubert Kario <hkario@redhat.com> Wed, 10 May 2017 18:47 UTC

Return-Path: <hkario@redhat.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 BB0CB12E858 for <tls@ietfa.amsl.com>; Wed, 10 May 2017 11:47:17 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -6.923
X-Spam-Level:
X-Spam-Status: No, score=-6.923 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, RCVD_IN_DNSWL_HI=-5, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, RP_MATCHES_RCVD=-0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001] autolearn=ham autolearn_force=no
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 ZJFWN8UStRMh for <tls@ietfa.amsl.com>; Wed, 10 May 2017 11:47:16 -0700 (PDT)
Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 69EE312951F for <tls@ietf.org>; Wed, 10 May 2017 11:47:16 -0700 (PDT)
Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 963F4448D69; Wed, 10 May 2017 18:47:15 +0000 (UTC)
DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 963F4448D69
Authentication-Results: ext-mx05.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com
Authentication-Results: ext-mx05.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=hkario@redhat.com
DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com 963F4448D69
Received: from pintsize.usersys.redhat.com (dhcp-0-115.brq.redhat.com [10.34.0.115]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 4E0761710A; Wed, 10 May 2017 18:47:15 +0000 (UTC)
From: Hubert Kario <hkario@redhat.com>
To: tls@ietf.org
Date: Wed, 10 May 2017 20:47:13 +0200
Message-ID: <2478514.aZun5FUmZT@pintsize.usersys.redhat.com>
In-Reply-To: <5920A6B3-66F5-44D5-A367-82AD6431A6C4@dukhovni.org>
References: <3768598.32hupQ9b2b@pintsize.usersys.redhat.com> <5920A6B3-66F5-44D5-A367-82AD6431A6C4@dukhovni.org>
MIME-Version: 1.0
Content-Type: multipart/signed; boundary="nextPart2010235.3A1IW0gdv3"; micalg="pgp-sha512"; protocol="application/pgp-signature"
X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16
X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.29]); Wed, 10 May 2017 18:47:15 +0000 (UTC)
Archived-At: <https://mailarchive.ietf.org/arch/msg/tls/nLtfjba5lzO5FI5bm1V0TByIlMk>
Subject: Re: [TLS] "Encrypted" SNI
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: Wed, 10 May 2017 18:47:18 -0000

On Wednesday, 10 May 2017 20:25:22 CEST Viktor Dukhovni wrote:
> > On May 10, 2017, at 1:28 PM, Hubert Kario <hkario@redhat.com> wrote:
> > 
> > Couldn't we "encrypt" the SNI by hashing the host name with a salt,
> > sending
> > the salt and the resulting hash, making the server calculate the same hash
> > with each of the virtual host names it supports and comparing with the
> > client provided value?
> > 
> > (apologies if that was already proposed and rejected)
> 
> There in many cases way too many virtual host names for the server to test.

if you have tens of thousands of websites you either have a farm of servers, 
so you can solve that with sharding, or the websites don't get much traffic so 
it's not a performance problem

> On the other hand, the attacker with fast hashing silicon can perform the
> same computation very quickly.

But it does make simple keyword matching on hostname much harder or 
impossible.

>  The virtual hosts supported by the remote
> server are likely not much a secret in most cases.

that's argument for not spending too much resources on the encryption/
obfuscation, not that we shouldn't do it.


But in general, I wonder if we didn't approach the SNI from the wrong side - 
as I said, we may not need to encrypt it, we just make sure that client and 
server agree on the virtual host the connection is going to.
-- 
Regards,
Hubert Kario
Senior Quality Engineer, QE BaseOS Security team
Web: www.cz.redhat.com
Red Hat Czech s.r.o., Purkyňova 99/71, 612 45, Brno, Czech Republic