Re: [TLS] Comments on draft-wood-tls-external-psk-importer-01

"Christopher Wood" <caw@heapingbits.net> Wed, 03 April 2019 14:25 UTC

Return-Path: <caw@heapingbits.net>
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 1B1AF1200A2 for <tls@ietfa.amsl.com>; Wed, 3 Apr 2019 07:25:35 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -0.79
X-Spam-Level:
X-Spam-Status: No, score=-0.79 tagged_above=-999 required=5 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, RCVD_IN_DNSWL_LOW=-0.7, SPF_PASS=-0.001, T_FROM_FMBLA_NEWDOM=0.01, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (2048-bit key) header.d=heapingbits.net header.b=LLixYXCB; dkim=pass (2048-bit key) header.d=messagingengine.com header.b=X//r6qhn
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 crJb45bc317k for <tls@ietfa.amsl.com>; Wed, 3 Apr 2019 07:25:32 -0700 (PDT)
Received: from new4-smtp.messagingengine.com (new4-smtp.messagingengine.com [66.111.4.230]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 9CE9F120003 for <TLS@ietf.org>; Wed, 3 Apr 2019 07:25:32 -0700 (PDT)
Received: from compute6.internal (compute6.nyi.internal [10.202.2.46]) by mailnew.nyi.internal (Postfix) with ESMTP id 4D151C5F3; Wed, 3 Apr 2019 10:25:31 -0400 (EDT)
Received: from mailfrontend1 ([10.202.2.162]) by compute6.internal (MEProxy); Wed, 03 Apr 2019 10:25:31 -0400
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=heapingbits.net; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-type:content-transfer-encoding; s=fm1; bh= hoTkabl/rhUPH5M3jZQfPjy2FiJud88bxAekwxmfdmQ=; b=LLixYXCBu2KwppaL H29wnc/nJo7Hijk5WLP9KXTrXDCQM9ywAfGbt0G16A0Dp6Uc0pNErpgA3/Vhy5xp Ji6nOPHPCCnVRGCIvptw5E75fwOg7qHUjMqvtqdrQbF921jWm1LfW+0J9QpGEXNx R9JuOYxxI4EsdXFXGCIWww8rbSLl97lFRjrCYdBPcEspJls8Q2NxJdeOv38RIlkP x11GJXuEETdoU+mSdcFOpRwz0aEDnflcL20DbRWGcKmiUarDhneSgF5rPRuY97HJ SQhcnDKJH1G1mRjY4Cv7NytTD6MKmpDZO1S9QW1LIaTRazVoSEtyGt6oPKXVF05G YJApLg==
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm2; bh=hoTkabl/rhUPH5M3jZQfPjy2FiJud88bxAekwxmfd mQ=; b=X//r6qhnPGwGh4Unn4sWY1/qfO/lV94TLZEu2E2n0/53uvABz+/AEtbkB sa16WwqE9MI3MM5fOXXR7fKGF0qYRP3ijcR1GfNmxlF2wG3kgKKtwvHMpuJmMTkO yOxnHrTytv1lBbpRMZy5VgD5v20AOOEV8PYZ1isHdzfmTT1MxAM7ZuCP0U1WPGde eZuBhAfzCDoyODdOZC/v10BxOr5GwQ0/Z1IuehDAswAZXCwQ6iypcgm7xtQWCdBS 3axT7PnLI2Qx6vDKagmwEd413H0jI3STtijzE5NXcovT4s6kRaj+3slrevfdELOw rxweQDj9slG+tM9ikJ9VBp/dgx3RA==
X-ME-Sender: <xms:WcKkXNLrE6aMTx1lcc07YvP216nDwk53ZpJtfp5ndS1mIOe2S5EkBw>
X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduuddrtdefgdehtdculddtuddrgedutddrtddtmd cutefuodetggdotefrodftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdp uffrtefokffrpgfnqfghnecuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivg hnthhsucdlqddutddtmdenucfjughrpefhvffufffokfgjfhggtgfgsehtkehmtdertdej necuhfhrohhmpedfvehhrhhishhtohhphhgvrhcuhghoohgufdcuoegtrgifsehhvggrph hinhhgsghithhsrdhnvghtqeenucffohhmrghinhepghhithhhuhgsrdgtohhmpdhivght fhdrohhrghenucfkphepudeggedrudejkedrvdekrdduudenucfrrghrrghmpehmrghilh hfrhhomheptggrfieshhgvrghpihhnghgsihhtshdrnhgvthenucevlhhushhtvghrufhi iigvpedt
X-ME-Proxy: <xmx:WcKkXK2vTrFSUZug5hsuFAxrSsssv-E-zjubE3ZiYPMrffLwcJbtVA> <xmx:WcKkXJLr0CbZkPng1ZNckPmYCsKzTVBRlfHLOtJu7DTUiRHH5fyA_A> <xmx:WcKkXONuoFrAEzIIU_Jt575-1EyUrnThjzxMdtBecCiIdV5U-Iv01A> <xmx:WsKkXJJSitVmd-5oVb2iZwpUbL4fKRfZSV14wBpAnMk_-UDsNN3aEI3E6Ic>
Received: from [172.16.29.43] (unknown [144.178.28.11]) by mail.messagingengine.com (Postfix) with ESMTPA id 0C2B6E4176; Wed, 3 Apr 2019 10:25:28 -0400 (EDT)
From: Christopher Wood <caw@heapingbits.net>
To: John Mattsson <john.mattsson@ericsson.com>
Cc: TLS@ietf.org
Date: Wed, 03 Apr 2019 07:25:17 -0700
X-Mailer: MailMate (1.12.4r5594)
Message-ID: <CC00A43F-4E77-4E13-8DB2-9BF221784673@heapingbits.net>
In-Reply-To: <89127FF7-CE3F-4DF1-98A5-B1006C5FF56B@ericsson.com>
References: <89127FF7-CE3F-4DF1-98A5-B1006C5FF56B@ericsson.com>
MIME-Version: 1.0
Content-Type: text/plain; charset="utf-8"; format="flowed"
Content-Transfer-Encoding: 8bit
Archived-At: <https://mailarchive.ietf.org/arch/msg/tls/8nTPlyVpxUCC3QEZefBwL8qQYag>
Subject: Re: [TLS] Comments on draft-wood-tls-external-psk-importer-01
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: Wed, 03 Apr 2019 14:25:35 -0000

Thanks for the feedback, John. I filed issues on the GitHub draft 
located at [1]. Please see inline below for comments.

On 1 Apr 2019, at 12:00, John Mattsson wrote:

>  Hi,
>
> Thanks for trying to solve this problem! Not having a way to use the 
> same external PSK for different cipher suites is definitely a thing 
> missing from TLS 1.3.
>
> As I stated during the wg session, 3GPP have a few use cases that use 
> PSK-ECDHE between phone and core network. Contrary to what IETF people 
> sometimes believe, most 3GPP use of TLS (between phone and core 
> network, between core nodes, and between different operators) use 
> mutual authentication with certificates.
>
> According to the current 3GPP specification, the phone and the core 
> network would share an external PSK and an external identity. The hash 
> function is undefined, i.e. SHA-256 is used for TLS 1.3. The phone and 
> the network would then negotiate TLS 1.2 with any cipher suite or TLS 
> 1.3 with SHA-256.
>
> Some comments
>
> - The draft should make clear if the External PSK and external 
> identity can be used together with the imported identities. I assume 
> the idea is that they can’t but I can’t see any text specifying 
> this.

Indeed, that was the intent.

>
> - ”Imported keys do not require negotiation for use, as a client and
> server will not agree upon identities if not imported correctly.
> Thus, importers induce no protocol changes with the exception of
> expanding the set of PSK identities sent on the wire.”
>
> While I see how the defined mechanism can be deployed in a new 
> deployment, I do not see how to introduce it in an existing 
> deployment. Assuming that the external PSK cannot be used together 
> with the imported identities, the TLS client and server must introduce 
> the mechanism at the same time, that is often not possible to control.

You’re correct that this requires both endpoints to adopt the change 
simultaneously. However, that does not contradict the quoted text, which 
states that the protocol is not changed.

>
> - “struct {
>        opaque external_identity<1...2^16-1>;
>        opaque label<0..2^8-1>;
>        HashAlgorithm hash;
>    } ImportedIdentity;
>   ”
>
> This scales poorly, A client has to send n*m identities where n is the 
> number of supported versions and m is the number of supported hash 
> algorithms...

Yes, this is a tradeoff we made by opting to not modify the key 
schedule.

>
> - Would it not be possible to just use the version number as label? 
> I.e. 0x0304 instead of “tls13”. In that way you do at least not 
> have to define a new labels.

We probably could, though since the labels are subject to change (see 
the TODO about possibly including the HashAlgorithm in the label), we 
kept it as is.

>
> - “TLS 1.3 [RFC8446] supports pre-shared key (PSK) resumption, 
> wherein
> PSKs can be established via session tickets from prior connections or
> externally via some out-of-band mechanism.”
>
> This seems to indicate that all use of PSK is resumption which is not 
> correct. I suggest changing to “TLS 1.3 [RFC8446] supports 
> pre-shared key (PSK) authentication”

Good suggestion! We’ll fix it.

>
> - “importing external PSK (Pre-Shared Key) into TLS.”
>
> Not sure if “into” is the right word, I think “for” as in th e 
> title is better. The mechanism seems very much external to TLS itself. 
> I see it as a mechanism to derive several external PSKs from a single 
> external PSK.

Ditto.

>
> - “Similarly, TLS 1.2 and all prior TLS versions should use "tls12" 
> “
>
> The versions prior to TLS 1.2 will soon be deprecated. And why spend 
> time updating the TLS 1.2 code base instead of moving to TLS 1.3?

We’re just covering our bases here. I tend to agree that the focus 
should be on updating to TLS 1.3 instead of “patching” TLS 1.2 
stacks.

>
>
> Suggestion:
>
> Instead of deriving a large set of new external PSKs, wouldn’t it be 
> possible to just use different hash functions in different parts of 
> the key hierarchy? I.e. if SHA-256 is associated with the external PSK 
> and SHA-384 is the hash algorithms in the chosen cipher suite:
>
> PSK ->  HKDF-Extract(SHA-256) = Early Secret
>           |
>           +-----> Derive-Secret(., "ext binder" | "res binder", "")
>           |                     = binder_key
>           |
>           +-----> Derive-Secret(., "c e traffic", ClientHello)
>           |                     = client_early_traffic_secret
>           |
>           +-----> Derive-Secret(., "e exp master", ClientHello)
>           |                     = early_exporter_master_secret
>           v
>     Derive-Secret(., "derived", "")
>           |
>           v
> (EC)DHE -> HKDF-Extract(SHA-384) = Handshake Secret
>
> Support of this could be signalled with the tls_flags extension. If 
> the server does not support the extension it must according to RFC 
> 8446 chose a cipher suite with SHA-256.

Modifying the key schedule was discussed in the context of [2]. At the 
time, it seemed the desire to not touch the key schedule outweighed the 
desire to not inflate the ClientHello.

Best,
Chris

[1] https://github.com/chris-wood/draft-wood-tls-external-psk-importer
[2] https://tools.ietf.org/html/draft-davidben-tls-universal-psk-00