Re: [Lake] Review EDHOC-v12

Göran Selander <goran.selander@ericsson.com> Mon, 13 December 2021 14:57 UTC

Return-Path: <goran.selander@ericsson.com>
X-Original-To: lake@ietfa.amsl.com
Delivered-To: lake@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 5A6103A0408 for <lake@ietfa.amsl.com>; Mon, 13 Dec 2021 06:57:30 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.801
X-Spam-Level:
X-Spam-Status: No, score=-2.801 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.701, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, HTML_MESSAGE=0.001, 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 y3jxktjTlmR5 for <lake@ietfa.amsl.com>; Mon, 13 Dec 2021 06:57:24 -0800 (PST)
Received: from EUR05-VI1-obe.outbound.protection.outlook.com (mail-vi1eur05lp2171.outbound.protection.outlook.com [104.47.17.171]) (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 66EED3A012C for <lake@ietf.org>; Mon, 13 Dec 2021 06:57:23 -0800 (PST)
ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=KHUJb6BvLxn00gRqW1qaDF6XUosduv95lOF+6tnl5/wyOT+nLkuMWJQat1iPoJqug2j8IVqa0kUosffD2ZGeoPI8TnJ25qboHLmdWcy2bsnXKg+JmDI8azrn6HYFGryiXkvVebj8S7J7k0gCyWYsGe0C2zBmlG7bILIi2AcUglkv4k9q9x3S3w5cCJxfKjXM42N4mj4Gk7C2cr+SFFblzHHtUc0BqAxgPQnXXhVXASbubpUb6yvBL9TH/XF18q/YwivjW3MESLTRUogou71InH5aAZuNxR9KZTCiV1u9osAzbic8HO179g2oC93LAg+jjohOEEzHBs2ly8rcS1qC5w==
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-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=E7OAy5kHxPmr+M+97Y2YYM0n9UGY0XKTUXWAezQfAO0=; b=RszJN8CSyzUOW2wMFTiCkLV2Elktz5+DAAAMJQ972FukETROZckZ64AqxWIrDzalRb2ok2yDX4luMtVrV5z7wWCoB1UL8xaf8p125jVJe/EwWdm5NT9+Y0Ig6qVk+c0u+MLRp5lCB7dOCwkqz037KbE/8L+xi+xJSlcaVpRxquQ06WWD5fCEcpqbTRp677yRZ5tjv/dQ7KCbc/7+wwynUj0ZHfKIq13GycFh/5e588nHAHxh8AIxprnimp/JagZBroEyMEdR1qusi/i2PxHs1ejwRIG/1j8MsMZc0gQS/geJdl6ZyBHVrA2Xnvz8Z0NyfNFkmI2x/rxWxj3M4Xm+Bg==
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=E7OAy5kHxPmr+M+97Y2YYM0n9UGY0XKTUXWAezQfAO0=; b=nl7UCYtvi90vm6MRGDsa5BmtHENzkpr/0Eohye4ZsrBUR0zlsILY9Kex0AAjGzUBfdZ2PVqG8yHWeSDiJzaERBThEKOM8uQKRVH+6sf8cLe9WOzdyLOLP62Rs4hCjn+zO8o57h09XkanL0Vq9J3hLitiOMzYnPpYOlGTk52UOYI=
Received: from AM4PR0701MB2195.eurprd07.prod.outlook.com (2603:10a6:200:45::6) by AM0PR07MB5907.eurprd07.prod.outlook.com (2603:10a6:208:108::31) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4801.13; Mon, 13 Dec 2021 14:57:20 +0000
Received: from AM4PR0701MB2195.eurprd07.prod.outlook.com ([fe80::90a9:5a2d:efb8:744b]) by AM4PR0701MB2195.eurprd07.prod.outlook.com ([fe80::90a9:5a2d:efb8:744b%4]) with mapi id 15.20.4801.013; Mon, 13 Dec 2021 14:57:20 +0000
From: =?iso-8859-1?Q?G=F6ran_Selander?= <goran.selander@ericsson.com>
To: "Hristozov, Stefan" <stefan.hristozov@aisec.fraunhofer.de>, "lake@ietf.org" <lake@ietf.org>
Thread-Topic: Review EDHOC-v12
Thread-Index: AQHX0W9vPW87iAHERUCkfmEyZh8LBawlx2dG
Date: Mon, 13 Dec 2021 14:57:19 +0000
Message-ID: <AM4PR0701MB219508E3C5E8F006A4809F85F46D9@AM4PR0701MB2195.eurprd07.prod.outlook.com>
References: <AM9P194MB14421943CE1C8378C2A62CE6C38D9@AM9P194MB1442.EURP194.PROD.OUTLOOK.COM>
In-Reply-To: <AM9P194MB14421943CE1C8378C2A62CE6C38D9@AM9P194MB1442.EURP194.PROD.OUTLOOK.COM>
Accept-Language: en-US
Content-Language: en-US
X-MS-Has-Attach:
X-MS-TNEF-Correlator:
suggested_attachment_session_id: 343c6f19-834e-ca52-901b-2658604f19fb
authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=ericsson.com;
x-ms-publictraffictype: Email
x-ms-office365-filtering-correlation-id: 2981efb5-8a83-4ffe-7b08-08d9be48dcc2
x-ms-traffictypediagnostic: AM0PR07MB5907:EE_
x-microsoft-antispam-prvs: <AM0PR07MB5907A705C23935F39E04FE0BF4749@AM0PR07MB5907.eurprd07.prod.outlook.com>
x-ms-oob-tlc-oobclassifiers: OLM:10000;
x-ms-exchange-senderadcheck: 1
x-ms-exchange-antispam-relay: 0
x-microsoft-antispam: BCL:0;
x-microsoft-antispam-message-info: bDPdr9ds6YM6TiMb1ui7CRXfPCW/Kqzwb++dU0/OvV2kzzIKSrXu15oj+N+gqpqcUjOkww0yC9GCRp3cPsFwWJ3E57ZpB9jRu2Ie70ZBWb7WdBrDwA8ccMHNjlj4riVwghgXjRvGqBwRkPx0vUd/0kp0v2GREZG3hayUo7Ju5j9z6P90mNJp6RxqP6tXMgASe/zMLsO7AGwZNJ002Sf5RDFywzuC3Db1zq+vgnRgA0Wu38oWEAEpd5W0R1zTz07n1dtIIulOoBzh2xza3miXfq0rfelGSgW++l91DulUk93zuwH0H5XpYq1H5WP5gjioONursrA7UHn80NUmFYndoaQSOG6xgJ0Kn3wBK77nQ+fKUSFV6j9q5iZX5jLeO0c8pvGPvpFetLW28hX9/ip0UEWRFCde7iVeLZDyQYdQiZ662BI2YRnnDxd1V4uBzJ28SKNrvx8WqhRdF5My6khD6cXhMR347nXdHPjYuv4SjPdRx1fmNd8NvTw/EJv1xTO/v3U47d8o2J7Im1pMOWtub/gMV2BlzqydeOdfq2vYnOS+UqJxPspnStjVgJGpB+0WazAu8JQVxI62qOxPRx4elxmqUF9ybUB+8oWwOvyCKa3c32DYFNvXx5BtUt6i9cME49+3opxIp2vz8WERKHgxLCnb0PtAZjAoi94itoZPMJXVEZxpJ0l8/Cdqtd2lKcYwg5/WpWLIKwzNrvEoxffs2WFwtkvcTb3NL421USHnsjX3kVHhHCOWiftNj9z3PxAJWx39I4kssi77et6NTMmgIIAMqJa5spBIS2bJETJ17os=
x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:AM4PR0701MB2195.eurprd07.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230001)(4636009)(366004)(53546011)(26005)(9686003)(6506007)(186003)(82960400001)(122000001)(38100700002)(86362001)(508600001)(83380400001)(66574015)(66476007)(8676002)(110136005)(38070700005)(8936002)(64756008)(316002)(91956017)(33656002)(66556008)(66946007)(66446008)(76116006)(5660300002)(2906002)(52536014)(19627405001)(55016003)(966005)(71200400001)(7696005)(20210929001); DIR:OUT; SFP:1101;
x-ms-exchange-antispam-messagedata-chunkcount: 1
x-ms-exchange-antispam-messagedata-0: =?iso-8859-1?Q?b21PZW/RuxzFkSHVCIRsb9eMjqNtWKWLob/se+7en5FxUe9Ayk0MsUbLHR?= =?iso-8859-1?Q?pjG6Iu1fV3pOdiA1M2Si7uU0Gh2rWvq9md7GIHAbFUmJmlt8Pyimc1qRnB?= =?iso-8859-1?Q?6Z+puFundOQTlJv6iBuEWxGWrFbJbWbkMP/i3AME2c4t/W1LED60KE1mxO?= =?iso-8859-1?Q?ZczxYZgCQiTYavCBrS7ogzFyOcUaCdZJe7HSostiHm3C1eSwVz5rwdtVje?= =?iso-8859-1?Q?Ooc/XhxIjMjmPyNb2vv1xT3uYJi6a1zDen8/3G2VVVIZ/nnYQL4mF5CdZ/?= =?iso-8859-1?Q?in5OHQYqFk+mguRFAQ2qjBRcDp3lv2LzUuYDWRld8TuWWtlzOlECHFeD7K?= =?iso-8859-1?Q?GcmuJ+pu+/wMDeyhSzttrpfC4RxhAmnZIOejaAjHPDogVzmafSPht2lCmY?= =?iso-8859-1?Q?WdumzYxGFZ6f1qSTyWOH0SE98U9GoeHDt35B6oTr3rEUHkSssmeRM+2qwo?= =?iso-8859-1?Q?4x5PEOLdDsDSwpe7e+ksOpswZ6xOr8M1SOktX4wPHBhK8ZRCJ18MQlph0/?= =?iso-8859-1?Q?2FeZ9ekde+Fm3tiEubt7Af4IhgHPwBxoNoxhDsf/cYzOvotoXJaO3PM0WB?= =?iso-8859-1?Q?chZz7hwJd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oj?= =?iso-8859-1?Q?61tM5qSbO+Rx92/JmvOa30Z5IECVj07AAn5ho97k54ve7n5IOmYeE5kSn9?= =?iso-8859-1?Q?cyhUXbpvuVXjbPtAxsMVGU0FiI3XEVhoFnMokaKqyWxE2BG5GokcfZrEY7?= =?iso-8859-1?Q?4KVJbzgzldQ5KpRjpTST8fpISmQFv9iZfeoN09yNM1Gbp3pc72Yc7T090D?= =?iso-8859-1?Q?jns8VjlSKP5xYpt1SFRWgwz1Xot+EoLMFIm34p8wCCbIbH+6KtPl+K6BVN?= =?iso-8859-1?Q?X6jw=3D=3D?=
Content-Type: multipart/alternative; boundary="_000_AM4PR0701MB219508E3C5E8F006A4809F85F46D9AM4PR0701MB2195_"
MIME-Version: 1.0
X-OriginatorOrg: ericsson.com
X-MS-Exchange-CrossTenant-AuthAs: Internal
X-MS-Exchange-CrossTenant-AuthSource: AM4PR0701MB2195.eurprd07.prod.outlook.com
X-MS-Exchange-CrossTenant-Network-Message-Id: 2981efb5-8a83-4ffe-7b08-08d9be48dcc2
X-MS-Exchange-CrossTenant-originalarrivaltime: 13 Dec 2021 14:57:19.9510 (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: vB7DeFBvzDdol6ySRbV2t03s1MQ/iWFp/Hz93smHrektrguy7gFKzfYTgaw6RzkU0QdI4LM67De8rHfFeWQNvDm4T3CVvUZzIWHGYTI9eBw=
X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM0PR07MB5907
Archived-At: <https://mailarchive.ietf.org/arch/msg/lake/sDVRCNwxra4H1mxQ6AaQmXyWGVk>
Subject: Re: [Lake] Review EDHOC-v12
X-BeenThere: lake@ietf.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: Lightweight Authenticated Key Exchange <lake.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/lake>, <mailto:lake-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/lake/>
List-Post: <mailto:lake@ietf.org>
List-Help: <mailto:lake-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/lake>, <mailto:lake-request@ietf.org?subject=subscribe>
X-List-Received-Date: Mon, 13 Dec 2021 14:57:31 -0000

Hi Stefan,

Thanks for the review. It is recorded as github issue #194 and a proposed update to the draft is in PR #200.

Comments inline. Please let us know if you have further comments or if it is OK to merge #200 and close #194.


From: Lake <lake-bounces@ietf.org> on behalf of Hristozov, Stefan <stefan.hristozov@aisec.fraunhofer.de>
Date: Thursday, 4 November 2021 at 12:43
To: lake@ietf.org <lake@ietf.org>
Subject: [Lake] Review EDHOC-v12
Hi all,

please find below my review of draft-ietf-lake-edhoc-12.

Best regards,
Stefan


2. Outline
"ID_CRED_I and ID_CRED_R are credential identifiers enabling the recipient party to retrieve the credential of I and R, respectively."
I will replace this definition with something like:
ID_CRED_I and ID_CRED_R are used to identify and optionally transport the authentication keys of the Initiator and the Responder, respectively.

[GS] Done in PR #200.

3.8 EAD
Is EAD data generated by the application or data that is pre-provisioned or obtained from somewhere. If the former is true I would like to suggest that the specification allows for implementations where all inputs and output that are generated at run time by the application are provided in non-encoded form to the EDHOC implementation. In this way, the interface to the application will be simpler and CBOR encoding and decoding can be completely hidden from the application developer. This applies especially for EAD, see issue #186. The general question is who is supposed to encode/decode EAD? The application or the EDHOC implementation? As far I understand the specification now only the application knows how to encode and decode EAD.

[GS] Correct, the application encodes/decodes EAD. However, for certain EAD use cases it may be most appropriate to implement part of the application and EDHOC together. We will add an appendix which provides some examples of this, new issue #210. Good point about input and output in non-encoded form, that should also be included in those examples. APIs are left out of scope, but it makes sense that EDHOC implementation CBOR encodes the non-encoded information.


5.2.1
"If the most preferred cipher suite is selected then SUITES_I is encoded as that cipher suite, i.e., as an int."
Am I understanding that correctly: If other suites are supported in addition they are not sent, e.g., if the initiator supports suites 1,2,3, where 1 is preferred and selected, 1 is sent as int and 2,3 are not sent? If so I will suggest making this sentence more clear.

[GS] Yes, your understanding is correct. Since the procedure prescribes only sending the cipher suite which is selected and more preferred supported cipher suites, if the selected is the most preferred then only that cipher suite is sent. I tried to clarify the sentence further, see PR#200.


6 Error Handling
What is the use case for a success error code? Probably it is good to give some example or reference why it is useful to log successes using a predefined error code and encoding. Is logging the only use case for the success error code? For example, my implementation logs many things for debugging purposes. However, I never needed a success error code.

[GS] The error code for success came about from a mail exchange on the IOTOPS WG mailing list [1]: "2. reserve one of the status codes for success, so that the status reporting can also use the standard value in case of no error". I added this explanation to the text in PR #200.

[1] https://mailarchive.ietf.org/arch/msg/iotops/t9LTpMiZ__kFGZpceLCBaCUHN44/


The spec says that success error code must not be sent, therefore the sentence "Error code 0 MAY be used internally.." needs to be "Error code 0 MAY be used _only_ internally.."?

[GS] I think "MAY only be used internally" is perhaps stating too much (depending on exact meaning of internally). We already state that the success code MUST NOT be used as part of the EDHOC message flow. I'm not sure we should be more be explicit about how success codes are used. Whether the success code would somehow be exposed through an application is out of scope of the protocol IMHO. So I kept "MAY be used internally" which we seem to agree about although it is not a complete characterization of the potential use of success codes.


"ERR_INFO can contain any type of CBOR item", see figure 7. Who decides what is the type of the CBOR item? Is this the EDHOC implementation developer?

[GS] This is intentionally left open. Returning to the example which motivated the definition of a success code, the use of ERR_INFO in a successful status report allows additional information relevant to the application to complement the information that this is t "no error". This may be a feature of a particular EDHOC implementation, an information element required by a particular application, etc. but what CBOR type is used is not directly impacting the protocol and therefore is out of scope for the specification. I added the latter to the text in PR #200.



7 Mandatory-to-Implement Compliance Requirements
"Constrained endpoints SHOULD implement cipher suite 0 or cipher suite 2."
The difference between 0 and 1 and between 2 and 3 is only the size of the tag, i.e. the used algorithms are the same. -> I will suggest changing to "...suite 0/1 or cipher suite 2/3" or similar.

[GS] Good point, I made a separate issue #209. A proposed text is included in PR #200.

Error messages with which error codes are mandatory to implement? Is only an error message with ERR_CODE 2 mandatory to implement?

[GS] Section 7 of version -12 actually says:
"Error codes 1 and 2 MUST be supported."
I added "ERR_CODE" to the sentence in PR #200 for easy search.



8.7 Implementation consideration
"The selection of trusted CAs should be done very carefully and certificate revocation should be supported."

Is OCSP (RFC6960) what should be used for certificate revocation checking?

[GS] Revocation is specified in separate RFCs depending on certificate format, so that is one example.

How revocation can be accomplished with C509?

[GS] C509 has defined CRLs but not yet encoding of OSCP. The topic was brought up at the COSE WG meeting IETF 112, but no details are provided yet.

How OCSP and EDHOC interact? Can OCSP stapling be used with EDHOC? Can we combine OCSP stapling with EAD?

[GS] As mentioned, the use of OCSP with COSE is not defined yet. Once definition it should also include COSE header parameter which then can be used for transport in ID_CRED_x in EDHOC, or alternatively with EAD. This can be defined separately.

Additionally, to verify a certificate the device should be aware of the time, which is often problematic on constrained devices, i.e. when certificates are used the device must have a Real-Time Clock (RTC).

[GS] Good point. Verification of validity may require the use of a Real-Time Clock (RTC), but as far as I understand, OCSP stapling does not. I added a sentence in PR #200.


Thanks
Göran