Re: [TLS] Comments on draft-ietf-tls-sni-encryption-01.txt

R du Toit <r@nerd.ninja> Thu, 22 February 2018 20:03 UTC

Return-Path: <r@nerd.ninja>
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 8924B12D95B for <tls@ietfa.amsl.com>; Thu, 22 Feb 2018 12:03:11 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.018
X-Spam-Level:
X-Spam-Status: No, score=-2.018 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HTML_MESSAGE=0.001, MIME_QP_LONG_LINE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H4=-0.01, RCVD_IN_MSPIKE_WL=-0.01, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (1024-bit key) header.d=nerd.ninja
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 GBuL94LVjQoO for <tls@ietfa.amsl.com>; Thu, 22 Feb 2018 12:03:09 -0800 (PST)
Received: from sender-of-o52.zoho.com (sender-of-o52.zoho.com [135.84.80.217]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 02E3312D95A for <tls@ietf.org>; Thu, 22 Feb 2018 12:03:08 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; t=1519329783; s=zoho; d=nerd.ninja; i=r@nerd.ninja; h=Date:Subject:From:To:Message-ID:References:In-Reply-To:Mime-version:Content-type; l=19431; bh=Ap/lx61m5qcdH3XSEQhWnT52iokUv8DCxwxiSWa3/6E=; b=XhAv9vomyxBvlrdiD1Bv1eubPEb0tVQpAbpA1d3fK80hEUpHPK7o8XtC2CD1A+1I ZItt84sos/PRYiHyiFka6M6yhnD/mYmQMcVLjxU3vXc4rvZGq4nWcvJ4dyxNbJdCNC3 HZhE/VN7dV6AagmG+nP3E+9uH19WTCLLbmaueZak=
Received: from [192.168.123.225] (dynamic-acs-24-112-242-116.zoominternet.net [24.112.242.116]) by mx.zohomail.com with SMTPS id 1519329783805605.6553580520401; Thu, 22 Feb 2018 12:03:03 -0800 (PST)
User-Agent: Microsoft-MacOutlook/f.20.0.170309
Date: Thu, 22 Feb 2018 15:03:01 -0500
From: R du Toit <r@nerd.ninja>
To: Christian Huitema <huitema@huitema.net>, "tls@ietf.org" <tls@ietf.org>
Message-ID: <227FFE8E-AFF1-4C69-8644-EC51B2B1F6F4@nerd.ninja>
Thread-Topic: Comments on draft-ietf-tls-sni-encryption-01.txt
References: <9C911514-298C-48EB-BF2E-E7AEDF6411F6@nerd.ninja> <29134f80-08e1-65a6-f0bc-1a135a3fd274@huitema.net>
In-Reply-To: <29134f80-08e1-65a6-f0bc-1a135a3fd274@huitema.net>
Mime-version: 1.0
Content-type: multipart/alternative; boundary="B_3602156583_1680432960"
X-ZohoMailClient: External
X-ZohoMail: Z_658201841 SPT_1 Z_47369130 SPT_1 SLF_D
Archived-At: <https://mailarchive.ietf.org/arch/msg/tls/b26QnPRKb9fHYj8LfErPruanciA>
Subject: Re: [TLS] Comments on draft-ietf-tls-sni-encryption-01.txt
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: Thu, 22 Feb 2018 20:03:11 -0000

I see at least 6 classes of "middlebox":

1. Inline corporate device (e.g. proxy); explicitly trusted by client through configuration.

2. Inline lawful intercept surveillance device; the client is not aware that it is "trusting" the device.  (NOTE: I'm not commenting on whether this is ethical, just listing the options).

3. Inline surveillance device using some crypto backdoor (hopefully this is theoretical for TLS 1.3!).

4. Inline active MiTM attack.

5. Passive monitoring device, either inline or TAP/SPAN; authorized by client; "passive" in the sense that it does not modify TLS content.

6. Passive monitoring device; not authorized

Proper TLS 1.3 stack implementations would hopefully nullify classes 3 and 4.

My focus was on class 1, but class 2 will have similar capabilities.

Different mechanisms, possibly out-of-band, would be needed to hide knowledge of the hidden server from classes 1 and 2.  Furthermore, classes 1 and 2 will initially have a severe impact on the deployment of the mechanisms described in the draft.

I agree that both mechanisms will be effective against classes 5 and 6.  Was that the goal?

 

--Roelof

 

From: Christian Huitema <huitema@huitema.net>
Date: Thursday, February 22, 2018 at 1:12 PM
To: R du Toit <r@nerd.ninja>, "tls@ietf.org" <tls@ietf.org>
Subject: Re: Comments on draft-ietf-tls-sni-encryption-01.txt

 

On 2/21/2018 3:31 PM, R du Toit wrote:

I have analyzed the two mechanisms proposed in the draft, with specific focus on the impact of middleboxes. 

 

Assumptions:

The middlebox is deployed inline, between the client and the fronting server, and is allowed to intercept TLS sessions.  The middlebox is policy-driven, and uses SNI as an input in determining whether or not to intercept the session; the policy must use the SNI of the hidden server.


We may want to be a bit more specific about middlebox assumptions, both in the draft and in your analysis.

The big question centers on your sentence "(the middlebox)  is allowed to intercept TLS sessions". Allowed by whom, and how? SNI encryption deployments, today, are attempting to prevent observation and interception by middleboxes that neither the client nor the server authorized. It is not surprising that SNI encryption would achieve just that, in the same way that TLS succeeds in hiding the content from intermediaries. If it doesn't, it's a bug.



 

Mechanism #1 : Tunnel ClientHello in 0-RTT early data.

(1) Mechanism #1 requires 0-RTT support, but the middlebox would not be violating the TLS 1.3 specification by not implementing 0-RTT.  The middlebox intercepts all sessions destined to a specific fronting server (F); the identity of F should be public knowledge, but even if it is not, we have to assume that the middlebox has a mechanism to decide when to intercept sessions destined to F.  


Yes, that's a weakness in the "0-RTT tunneling" mechanism. To work properly, it would need some kind of fallback when 0-RTT is blocked. That needs to be taken into account when evaluating the mechanism.



 

(2) Assume that the middlebox actually supports PSK and 0-RTT, i.e. TLS intercept with PSK/0-RTT support in the session between the client and the middlebox, as well as PSK/0-RTT support in the session between the middlebox and the fronting server.  The middlebox will be able to decode ClientHello#2 sent in the 0-RTT early data because the client_early_traffic_secret will be known to the middlebox.  The middlebox would thus have access to the SNI of the hidden server, and would be able to evaluate policy.  The middlebox would have the option to pull out of the session after sending ClientHello#2 to the fronting server (re-encrypted with the client_early_traffic_secret shared between the middlebox and the fronting server).

 

Mechanism #2: Session ticket that can be decoded by Fronting and Hidden server.

(3) Mechanism #2 relies on PSK session resumption support in the middlebox; this is not guaranteed.

Actually, this is not specific to the session ticket solution. The 0-RTT mechanism also relies on PSK session resumption. In your previous paragraph, you state that "the client_early_traffic_secret will be known to the middlebox". But that early secret is based on the PSK in a resumption ticket with the fronting server. So in both cases, your middlebox only works transparently if it keeps track of session tickets and the corresponding identities and keys.



(4) The middlebox would not participate or interfere in any of the out-of-band channels between the fronting server and the hidden server, which implies that the middlebox will not be able to decode the session ticket generated by the hidden server - but it does not have to.  The middlebox would be able to observe the encoded session ticket in the NewSessionTicket message because it intercepts the initial TLS session between the client and the hidden server (even if mechanism #1 is used for the first session).  The middlebox would thus be able to extract the SNI of the hidden server from the NewSessionTicket message and build a mapping of encoded session tickets to hidden servers. TLS sessions (destined to the fronting server) that were not previously intercepted by the middlebox will use PSK identities that are not in the mapping table - the middlebox would likely force intercept of those sessions and strip the unknown PSK identities, which would result in a TLS session that terminates on the fronting server, leaving the fronting server without any knowledge of the hidden server.


Yes, that should be the fall back mode if the middlebox strips away the PSK identity. The client ends up with a session with the fronting server, and the attempt to connect to the hidden server remains secret. I agree that it should be documented in the draft.



 

(5) Ignoring middleboxes, in my opinion the infrastructure required for collaboration between fronting servers and hidden servers (stateful, shared-key, public-key, or otherwise) would be a practical barrier to entry for most server administrators.


The way to check that is to try some test deployments. We shall see.

-- Christian Huitema