Re: [TLS] Review of draft-ietf-tls-external-psk-guidance-00

Mohit Sethi M <mohit.m.sethi@ericsson.com> Wed, 19 August 2020 07:43 UTC

Return-Path: <mohit.m.sethi@ericsson.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 238473A10E6 for <tls@ietfa.amsl.com>; Wed, 19 Aug 2020 00:43:36 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -3.051
X-Spam-Level:
X-Spam-Status: No, score=-3.051 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, NICE_REPLY_A=-0.949, RCVD_IN_MSPIKE_H2=-0.001, 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=ericsson.com
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 1e0HOp81m6HF for <tls@ietfa.amsl.com>; Wed, 19 Aug 2020 00:43:33 -0700 (PDT)
Received: from EUR01-DB5-obe.outbound.protection.outlook.com (mail-eopbgr150058.outbound.protection.outlook.com [40.107.15.58]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 4890F3A10EC for <tls@ietf.org>; Wed, 19 Aug 2020 00:43:33 -0700 (PDT)
ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ksivESL1DqX3U1Zjf1fXnBqpStOZiJAqnlUVQbg3fbFR7DK03c1zKI4Q1C9E/wd/gzCuBuz+G2vPugOAUq9jpx5G18dwvkEXsUiiBoT7twIV2OIzIxunyUJfMm50YfkpEAC9t1tTZxD+EW2BFCZZvIiOTxD2BJGtIn4sCak4WxjgO32z++LYtNgJbWvdez/CddEcvfmclWWQz4WHWjq2CFbOsJTsCN5LEqJULuwxyX8AePA1rRaTI/SAXIrZNVEN6RjOQ7OFErLU9CWiOzYOqT0cuvspFNGPGcF5iTVfGzF6FD1X4LlxkEztkN/MRZQJ39EmVvET5NciT5vZHb30mg==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=r5bRWwWrzCv51R32QRRCV0gGqewbf9OUkTwv55V/75E=; b=kSj0BDUVPZBYgoscCTU5t3AHfx4Cd6/hV+JID219WFjd/YBouUMV7844SvGxPa+ghA+CgJ01ViI/xTihZI7dBJuvnW26Wli7wWEYcBuuVhMibNdhR+EBQPZ68TiiC76+uFyOSWdNMMpZ2+xyWPH9L8xMnMr9ISR5425A/1pb6ZfagM+rNiCiXEm/Q8eTxsUOzYT6ucH0mHIoHpgJ/r+IS+0aks3ojnnKaB4RFJW1Hci6DOJ/6Kh5hw0zQZ/l1lY0LMMUPUBqbJ3hkXgRFfmwiV1ccCNhcW2IIRrbv/yy1H4KDXDqPvUyChD7bZTPKOJfS7ZrjSOdx1n4gefJrpw/Bw==
ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=ericsson.com; dmarc=pass action=none header.from=ericsson.com; dkim=pass header.d=ericsson.com; arc=none
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ericsson.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=r5bRWwWrzCv51R32QRRCV0gGqewbf9OUkTwv55V/75E=; b=cJZFs6Pb6xTzS7lp+//swK3DmYFWiXvdIH2uirYkWjSV9hW3SF7DTUIVeBFS4f7PemkS1RuE8Y/xz+URps4yiKAJ8Zugv1wUKFrGikUEG7V3c8hLjxvfznGu46kux7zo6ZWPToC++bIGV/+eIxK5m2zXGR/upD/+mgXxbcQAnOw=
Received: from HE1PR07MB3209.eurprd07.prod.outlook.com (2603:10a6:7:32::14) by HE1PR0701MB2937.eurprd07.prod.outlook.com (2603:10a6:3:56::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3305.10; Wed, 19 Aug 2020 07:43:30 +0000
Received: from HE1PR07MB3209.eurprd07.prod.outlook.com ([fe80::89f5:f583:b074:b4f6]) by HE1PR07MB3209.eurprd07.prod.outlook.com ([fe80::89f5:f583:b074:b4f6%5]) with mapi id 15.20.3305.021; Wed, 19 Aug 2020 07:43:30 +0000
From: Mohit Sethi M <mohit.m.sethi@ericsson.com>
To: Christopher Wood <caw@heapingbits.net>, "TLS@ietf.org" <tls@ietf.org>
Thread-Topic: [TLS] Review of draft-ietf-tls-external-psk-guidance-00
Thread-Index: AQHWdfxuslL7s3ZBIUC9WBLB0kTfFA==
Date: Wed, 19 Aug 2020 07:43:30 +0000
Message-ID: <20121e50-91be-78ce-9780-8f1e71d7ff9d@ericsson.com>
References: <3359D367-16E3-4C30-B434-A8043B1F253A@icloud.com> <841bd643-d7bf-4211-a40c-9121967b67b6@www.fastmail.com>
In-Reply-To: <841bd643-d7bf-4211-a40c-9121967b67b6@www.fastmail.com>
Accept-Language: en-US
Content-Language: en-US
X-MS-Has-Attach:
X-MS-TNEF-Correlator:
user-agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0
authentication-results: heapingbits.net; dkim=none (message not signed) header.d=none;heapingbits.net; dmarc=none action=none header.from=ericsson.com;
x-originating-ip: [2001:14bb:190:2a7d:eafd:b986:ec2:5e]
x-ms-publictraffictype: Email
x-ms-office365-filtering-correlation-id: 2353604e-1461-4c7c-cf75-08d844139169
x-ms-traffictypediagnostic: HE1PR0701MB2937:
x-microsoft-antispam-prvs: <HE1PR0701MB29374D869C71D2D47370EB17D05D0@HE1PR0701MB2937.eurprd07.prod.outlook.com>
x-ms-oob-tlc-oobclassifiers: OLM:10000;
x-ms-exchange-senderadcheck: 1
x-microsoft-antispam: BCL:0;
x-microsoft-antispam-message-info: 74zRlLcoyutpbSMctbinwZHznJRF41vu+D3Ehmh4jdfV0+TRSPxSR0pSPed4F2HwtNco7CWqbOKUXSP0liXNvt1kkqe4oS05HrdMs4QY2ZLE4mrHVTdJFKxXFBKRecpoKuy137fOOLqvq1GFQuOCDN5X2Gqr68sNpgh+8REq9frtNgjFP+yK2TtT4WhpWkgGjLWyBZWDxyXVzFBKGBQAGpQYeEFLcP/QV0XehsX1nDWCC62EnWuyr+zCxD//+Z1Hv4eux3JdL/afHd9sQoIZV+BDkypqxh7J16Es+XYd1R26uk6PIPkOWBZMXup6+Np93e6Bh27+0em3BSZg2b8ojJiux/1ZND0+Z8Gv1fOlSM5wElb6P4W3wnzvN4hg/5u73DvVB0POB/HaELS9Vr4BPt6OYoELSpJGKJQjWP2SxzDudoGu2L8sCg68zIJg6QK3dPMld0tX525UfKhqYgx6bA==
x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:HE1PR07MB3209.eurprd07.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(346002)(136003)(396003)(39860400002)(366004)(376002)(66476007)(2906002)(66556008)(86362001)(5660300002)(2616005)(186003)(30864003)(8936002)(66574015)(64756008)(66446008)(83380400001)(8676002)(66946007)(110136005)(71200400001)(6486002)(6506007)(316002)(478600001)(53546011)(966005)(31686004)(6512007)(36756003)(31696002)(76116006)(43740500002); DIR:OUT; SFP:1101;
x-ms-exchange-antispam-messagedata: okVIjZj72f3toXDwfq0b2IWkgJNoqtIjH05WfMz7w1fDACWb+dqpBrppy7jWxwTiHHiPJRd0tqOPGw1pKYcb/ujWGwQytBjQ9+OURbmhrKjLJmYE40CVM1uSSkxVBwTu/9RuuJGEy9qzNNHyVBuIjAHeROKfRMUsCjn7ttf556TcZTqyRZVqp8A+rgT7/tpzD7p+vMOS+Nee/pudiyvYs0UePT2Oo5QgCGu4wVeKlRWQMkFnnLe9AstQYuDA3MwlwM6LPVuDvtsEkTXaY9N84vY0wvjihhBs8JQ/8jJKzuqOeHmYUpD1tqwb7CVhjJB5vovL1Qu4QP48gytv1f5vb57SdBWQhsiaSdie62N59KpI6P5b6zNNy55qjyLCtS4blipqJBENp4k3QQ3WO9g0XsRCBLygFtSzUqOzZ0RPUpWOxrKAzKxB1b+ZG9zLxMk644iZMZ5P71m2LR8/IHRBD8wRTxU4m/xWk6XrNW2imJqVYuJWyRjJ5IbDMylaAInFbNdq345nWQCRkw1W8iN9afqusBDYLooZy6Y10CvJNssBXq2pdB4wz35mtZB9NOqNgUKfNdmQQgMxSOQPR+OCsthO1dIVI1YkFCY43hctsObvv2b0mCnq508PUgt6JaQrMuvk0NLtISQjIwiftzu4iwNeUD2kvw9xGG2GVPnu4JbIG/HseEYBPiJdyNWMg2NUe8O1kaygCtJLYvPb5Avj0Q==
x-ms-exchange-transport-forked: True
Content-Type: text/plain; charset="utf-8"
Content-ID: <83B41EF7429C3847A4BA71D3880D44E6@eurprd07.prod.outlook.com>
Content-Transfer-Encoding: base64
MIME-Version: 1.0
X-OriginatorOrg: ericsson.com
X-MS-Exchange-CrossTenant-AuthAs: Internal
X-MS-Exchange-CrossTenant-AuthSource: HE1PR07MB3209.eurprd07.prod.outlook.com
X-MS-Exchange-CrossTenant-Network-Message-Id: 2353604e-1461-4c7c-cf75-08d844139169
X-MS-Exchange-CrossTenant-originalarrivaltime: 19 Aug 2020 07:43:30.5754 (UTC)
X-MS-Exchange-CrossTenant-fromentityheader: Hosted
X-MS-Exchange-CrossTenant-id: 92e84ceb-fbfd-47ab-be52-080c6b87953f
X-MS-Exchange-CrossTenant-mailboxtype: HOSTED
X-MS-Exchange-CrossTenant-userprincipalname: BQ7jyXbP3kwC3yy74NMfkDK7bRiBSzCbreBvRlIJ53aE0QqoY6iuEQMHIcJXhXW93WBYyccJkVjmLdKuVFX7ZJRlV/0LedGy/ICQLPNLBZk=
X-MS-Exchange-Transport-CrossTenantHeadersStamped: HE1PR0701MB2937
Archived-At: <https://mailarchive.ietf.org/arch/msg/tls/jdTQu9O-3WS2efav_ciI1uKf9mQ>
Subject: Re: [TLS] Review of draft-ietf-tls-external-psk-guidance-00
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, 19 Aug 2020 07:43:36 -0000

Hi Carrick,

Thank you for the review. I also added some comments in-line.

On 8/18/20 6:26 PM, Christopher Wood wrote:
> Hi Carrick,
>
> Sorry for the delay. Please see inline below!
>
> On Thu, Jul 9, 2020, at 10:09 PM, Carrick Bartle wrote:
>> Isn’t the rerouting attack described in Section 4 not possible if "A"
>> uses the SNI extension and "C" aborts the connection on mismatch? If
>> so, it might be worth mentioning that as a potential mitigation (as the
>> Selfie paper does).
> Indeed. That seems like a fine thing to mention.
>
>>> "C" has completed the handshake, ostensibly with "A".
>> "C" did in fact complete the handshake with "A." (Without mistaking it
>> for some other endpoint or something.)
> +1, I'm fine with dropping that bit.
>
>>> Low entropy keys are only secure against active attack if a PAKE is
>> used with TLS.
>> Maybe cite a document that contains a recommended way of using PAKEs
>> with TLS (e.g. draft-sullivan-tls-opaque-00)?
> I'd rather not cite one (now), especially since that document is expired. Perhaps we can file an issue to add a citation later on?
>
>>>   Applications should take precautions when using external PSKs to mitigate these risks.
>> What sort of precautions should they take?
> Filed:https://github.com/tlswg/external-psk-design-team/issues/36
>
>>> Preventing this type of linkability is out of scope, as PSKs are
>> explicitly designed to support mutual authentication.
>> Isn't mutual authentication, in general, orthogonal to linkability?
>> Certificates, for example, are encrypted in TLS 1.3, and so cannot be
>> linked across connections.
> This section speaks of linkability by the endpoints, not the network. Any sort of identifier that's reused across connections can be linkable, be it an external PSK ID or a certificate.
>
>>> Below, we list some example use-cases where pair-wise external PSKs
>> with TLS have been used for authentication.
>> I assume "pair-wise" here means a PSK is shared between only one server
>> and one client, but this the term "pair-wise" hasn't been associated
>> with that concept in this document, it's not completely clear. Since
>> "pair-wise" is used twice in the document, maybe define it when the
>> concept is first introduced.
> Yep, I agree.
>
>>> primarily for the purposes of supporting TLS connections with fast
>> open (0-RTT data)
>> I've only ever heard "fast open" used in the context of TFO, which is
>> distinct from (albeit similar to) 0-RTT. Using "fast open" to refer to
>> 0-RTT sounds like it's conflating terms. Shouldn't "early data" be used
>> here instead of "fast open"?
> I think the two phrases are basically equivalent, but if using "early data" is more clear, let's go with that.
>
>>> In this use-case, resource-constrained IoT devices act as TLS clients
>> and share the same PSK.  The devices use this PSK for quickly
>> establishing connections with a central server.  Such a scheme ensures
>> that the client IoT devices are legitimate members of the system.
>> If the IoT devices only talk to a central server and not each other,
>> why do they all need the same PSK?
>>
>>> To perform rare system specific operations that require a higher
>> security level, the central server can request resource-intensive
>> client authentication with the usage of a certificate after
>> successfully establishing the connection with a PSK.
>> If you're going to authenticate with a cert, why bother preceding that
>> with an authentication with a PSK?
> Good question. I'll let Mohit answer this, but my impression was that, unlike the PSKs, each node has its own private key, which seemingly allows the server to authenticate a specific client.
This use-case is described in the publication by Akhmetzyanova et al. 
https://eprint.iacr.org/2019/421.pdf. See section 4. In the scenario 
described by the authors, resource-constrained IoT devices are TLS 
clients. The PSK is used for authenticating the central server and 
client membership of the system. Only for rare device-specific 
operations requiring a higher-security level (such as device firmware 
update), the server can request resource-intensive client authentication 
with certificates after successfully establishing the connection with 
PSK. This deployment may seem somewhat artificial but it was necessary 
in the paper to explain the possible attack scenarios.
>>> 6.1.  Provisioning Examples
>> This section contains a list of ways to provision PSKs, but mostly
>> without any commentary or discussion. Are these methods good? Bad? Are
>> there any pitfalls? If so, how can one guard against them?
> It's meant to be informational without any comment on the pros and cons of each.
>
>>> Moreover, PSK production lacks guidance unlike user passwords.
>> Isn't that precisely the point of this draft? Seems unnecessary to
>> mention. (Or it might be better to move this point to the intro as a
>> motivating factor of this document.)
> Great suggestion!
>
>>> PSK provisioning systems are often constrained in application-specific ways.  For example, although one goal of provisioning is to ensure that each pair of nodes has a unique key pair, some systems do not want to distribute pair-wise shared keys to achieve this.
>> Why not? What application-specific constraint would warrant that?
> Pointing again to Mohit for the IoT case. :-)
>
> (We might just replace "do not want to" with "might not want to", and leave it at that.)
This text is based on the input from Björn Haase. Essentially, he 
indicated that some industrial control deployments do not want to have 
O(n^2) keys for a system with n nodes, but they do want to minimize 
sharing. I am fine with changing it to "might not want to" or removing 
this constraint completely.
>   
>>> some systems require the provisioning process to embed
>> application-specific information in either PSKs or their identities.
>> Is it really a good idea to embed data in the PSK itself? Does that not
>> diminish the entropy of the PSK? Why is it not sufficient to put that
>> sort of information in the identity?
> It is probably desirable to use the identity for this purpose since, well, its application-specific identifying information. This is just commenting on the state of affairs, I think.
>
>>> Identities may sometimes need to be routable, as is currently under
>> discussion for EAP-TLS-PSK.
>> What does it mean for an identity to be "routable"? Also, EAP-TLS-PSK
>> needs a citation link. I'm not sure which document it's referring to.
> It might be, for example, a FQDN. Mohit understands the EAP-TLS-PSK use case better than I do, though, so I'll let him answer.
A citation for EAP-TLS-PSK is added in the github version of the 
document. I agree that "routable" identities is not something obvious 
and could be better explained. In standard AAA (Authentication, 
Authorization and Accounting) architecture, client devices send an 
identity for network access authentication. These identities are in the 
form of a Network Access Identifier (define in RFC 7542: 
https://tools.ietf.org/html/rfc7542). Nodes in the network such as 
access points (also called as authenticators) look at the identity 
(mostly the domain name suffix at the end of the identity) to determine 
if they should proceed with the authentication request and for figuring 
out the appropriate EAP server where the authentication request should 
be sent. Perhaps that sentence could be re-written as: "PSK identities 
may sometimes need to have a domain name suffix, as is currently under 
discussion for EAP-TLS-PSK [I-D.mattsson-emu-eap-tls-psk]".

>>> Applications MUST use external PSKs that adhere to the following
>> requirements:
>> I think you mean "If an application uses external PSKs, the PSKs MUST
>> adhere to the following requirements." Otherwise it sounds like you're
>> saying every application must use an external PSK.
> Yep, that would be more clear.
>
>>> Each PSK SHOULD be derived from at least 128 bits of entropy
>> Recommend a particular method for doing that?
> I don't think that's necessary. Any suitable method will suffice.
>
>>> Note that these mechanisms do not necessarily follow the same
>> architecture as the ordinary process for incorporating EPSKs described
>> in this draft.
>> Where was the ordinary process for incorporating EPSKs described? Is
>> "incorporating" a PSK the same as "provisioning" one? If so, several
>> ways were described. What's the problem with these mechanisms (e.g.
>> PAKE) having a different architecture from these ordinary processes?
>> Are they not compatible?
> I'm not seeing this text in the editor's copy, so I'm not sure what the context is.
>
>>>     3.  Nodes SHOULD use external PSK importers [I-D.ietf-tls-external-psk-importer] when configuring PSKs for a pair of TLS client and server.
>> Why?
> Because that interface exists to enable external PSKs for TLS 1.3 and beyond.
>
>>> OpenSSL and BoringSSL: Applications specify support for external PSKs
>> via distinct ciphersuites.
>> This is not true of BoringSSL for TLS 1.3. Although the paragraph goes
>> on to mention "new callback functions added specifically to OpenSSL for
>> TLS 1.3 [RFC8446] PSK support," this doesn't preclude 1.3 PSK support
>> in BoringSSL.
> We didn't want to go into version-specific details here, but yes, that's right.
>
>>> PSK identities MAY have a domain name suffix for roaming and federation.
>> What do roaming and federation mean here? Is there a source that discusses this?
> Hmm, probably? Mohit, can you please drop in a reference?

I didn't find any standard definition of federation even though many 
RFCs have used them in the past (RFCs 2552,3313,7532). We could add a 
reference to roaming defined in RFC 2904: 
https://tools.ietf.org/html/rfc2904#section-3.2 and drop federation. 
Would that work?

--Mohit

>>> Deployments should take care that the length of the PSK identity is sufficient to avoid obvious collisions.
>> What's the difference between a "collision" and an "obvious collision"?
> Nothing. We can drop "obivous."
>
>>> This means that if a PSK identity collision occurs, the application will be given precedence over how to handle the PSK.
>> How should the application handle the collision?
> That's an application-specific decision, so we don't specify it.
>
>> I'm happy to make the suggested changes in a PR if they look ok.
> Yes, please!
>
> Best,
> Chris
>
> _______________________________________________
> TLS mailing list
> TLS@ietf.org
> https://www.ietf.org/mailman/listinfo/tls