Re: [COSE] IANA COSE assignments

John Mattsson <john.mattsson@ericsson.com> Mon, 01 February 2021 13:49 UTC

Return-Path: <john.mattsson@ericsson.com>
X-Original-To: cose@ietfa.amsl.com
Delivered-To: cose@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 938643A1189 for <cose@ietfa.amsl.com>; Mon, 1 Feb 2021 05:49:27 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.351
X-Spam-Level:
X-Spam-Status: No, score=-2.351 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.25, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, 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 iko6uVTrQqNL for <cose@ietfa.amsl.com>; Mon, 1 Feb 2021 05:49:25 -0800 (PST)
Received: from EUR05-DB8-obe.outbound.protection.outlook.com (mail-db8eur05on2084.outbound.protection.outlook.com [40.107.20.84]) (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 5DB2C3A1187 for <cose@ietf.org>; Mon, 1 Feb 2021 05:49:25 -0800 (PST)
ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ZnrL1AyiquOiQ+2iYMXprrSsCgLOk5Fb9fE3LmtKihI19qAa4SK5gyg5wzwoirdOcf1I99UZDSasCO9fTGC3Hf5d0H4Axia4GC2kpt803cfj4UxHt96V/VZb4aisGW2gYVhIDhZyi+QE8A8G581B3b1avn9Ydej9SNSsIVsPYbXwcEAxBwM4x92HqcxtdiEwJac+GcwKbX8ZFSnR7tccWtEwz3Wnh9ZHvFk6Nbxv12eSbFxojS5OuW6BHxB6Q8ucSy5mbIo5+Ri+42L+7R06+LuwnJCQQGhie7Z1wOqLQoaEgSqb6IdnOPGj+1Qwh9yr6irRieXyuhLB30sU4c7Q4A==
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=RGE2VI6UhbER6b9nBHMMTkw1g67Rl1Q6nUfNtw9UWQI=; b=OWQ0rzr9CW4WU0I6HCWwH0m6rHdXbytLn/FG+un7zP5Bcmg8kkmIjwV4PgksA0mSSgInDpiV0xFXM/Jb9kkxpS/mbvpRoyH7lvCuDykIas/hLDQikAWKhj2UbPetqyih/daDJ074T1L2lZKGHbzp+ZAjFHdXtePMhZ8xxgLWYm+M5KE7rFGR3/2mU0fjFVgU49nGTpvRWdtZ0DYJ04kVkDaLXLsf2lddgqoRfkTZZBrhjt2eH6+6GruSKQ4t7tsBccLs/Qe/s9nQ3JJkmyRvKVZW3FoJYy2BVp2ACb+JEEr7LJvwCbDSmZWouQOXbhQSsTxFyuukLHa1yqIHFG9lUA==
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=RGE2VI6UhbER6b9nBHMMTkw1g67Rl1Q6nUfNtw9UWQI=; b=hOwUIEYBXpibLUyU9uPx2/UY0Psf+cDV35a8uF5HEWTCzrobuyoOFSUJZicoi/P75VOW2OdlVV91OENgOt9wBwLhjpueIt7ZRNxCNhLhzQDLep4bYKLp7ehKVkdbz8R4KZoHG6TxKPIhk1FwaW95eIPyhEg48yGAVBO7/sYKUiY=
Received: from (2603:10a6:3:4b::8) by HE1PR0702MB3546.eurprd07.prod.outlook.com (2603:10a6:7:8d::24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3825.13; Mon, 1 Feb 2021 13:49:22 +0000
Received: from HE1PR0701MB3050.eurprd07.prod.outlook.com ([fe80::c555:6e47:970c:1268]) by HE1PR0701MB3050.eurprd07.prod.outlook.com ([fe80::c555:6e47:970c:1268%11]) with mapi id 15.20.3825.017; Mon, 1 Feb 2021 13:49:22 +0000
From: John Mattsson <john.mattsson@ericsson.com>
To: cose <cose@ietf.org>
CC: Benjamin Kaduk <kaduk@mit.edu>, Göran Selander <goran.selander=40ericsson.com@dmarc.ietf.org>
Thread-Topic: [COSE] IANA COSE assignments
Thread-Index: AQHW9VZ3u246pmXHh0yf/qj8SOX5I6pCPEmAgAEr5AA=
Date: Mon, 01 Feb 2021 13:49:22 +0000
Message-ID: <CD2DB391-B17C-449B-BA8B-606D18809297@ericsson.com>
References: <41F03211-E3F5-493B-AC94-0F9DA26A1D9F@ericsson.com> <20210131205601.GO21@kduck.mit.edu>
In-Reply-To: <20210131205601.GO21@kduck.mit.edu>
Accept-Language: en-US
Content-Language: en-GB
X-MS-Has-Attach:
X-MS-TNEF-Correlator:
user-agent: Microsoft-MacOutlook/16.44.20121301
authentication-results: ietf.org; dkim=none (message not signed) header.d=none;ietf.org; dmarc=none action=none header.from=ericsson.com;
x-originating-ip: [81.225.97.222]
x-ms-publictraffictype: Email
x-ms-office365-filtering-correlation-id: 2436c960-1181-4d1c-54db-08d8c6b82e69
x-ms-traffictypediagnostic: HE1PR0702MB3546:
x-microsoft-antispam-prvs: <HE1PR0702MB3546EAF44343E1C5E2AD75CE89B69@HE1PR0702MB3546.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: scsfx7s8prgFOf8RKCC7yV7mINPbbiG8MrjW3OH858bPLIzFHHjx71mNnYKVJQyrqaFtF8GlaPYvJhQlOxQC3Kf9JD87Fc/vjNUt6Pau9Jr7QqDqwhTj6RiEj+FcDFPV0x1bV+Dgs4Ov81t3ReDxL8OLWiCYbbOLrAVZAh3G0h0DBH6fxYEbGcn5DkswOnSq1UP3wX+GgFV6uyb7b3pOnHnzJpobfGFVQxAmI/fMLON1NSXwpYEoyzLUD1zsMgR7tKjCogmUceFQZJ7oEEm5ioHqIINzsbgS2lVfHRodDnwkrYX9WArCNMp8fWFFw5jmyvYbpgNRNozrdog1KI75Pnkvm6sVF52coWog8uxunxXtIHGbLM8CXX/3hhsCnLs7rpbzuj8zRWgTKpgm1aWgY+uTrqC6Es1sayp+6sQcsxfB6fhkNvMsllaVNDZbh4y+nXvYSEHrXH5+1R0x2Ls32eYjK3Z/JWaFH+0aIxu5YslMnmdqO9Rc4BUMGiurGfEC1BUCP6AOF9LV+LU09oF6fXUfEFX/SMzstOnfCFqQ2eQAnCv0Qt/5hJTzZCOClaEZUWsGU7sFPRGddOYufv0ZdNWY5AWwnWoxecFatfxrOfB3G06xj1UA5DStECrkL/wl1O71r/zMz0WtqK6g4Ug2jw==
x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:HE1PR0701MB3050.eurprd07.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(366004)(376002)(346002)(136003)(39860400002)(396003)(2616005)(44832011)(83380400001)(53546011)(6506007)(8936002)(71200400001)(966005)(86362001)(186003)(33656002)(8676002)(66574015)(478600001)(26005)(76116006)(6486002)(66446008)(2906002)(66946007)(5660300002)(36756003)(4326008)(316002)(66476007)(66556008)(64756008)(6512007)(54906003)(6916009)(45980500001); DIR:OUT; SFP:1101;
x-ms-exchange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O6WHTQZxE4Rw7Y3TSmvacElqYDmp42Qt7RvGs7RhQ==
x-ms-exchange-transport-forked: True
Content-Type: text/plain; charset="utf-8"
Content-ID: <1BA17E7C6AF66C449C527722F513D903@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: HE1PR0701MB3050.eurprd07.prod.outlook.com
X-MS-Exchange-CrossTenant-Network-Message-Id: 2436c960-1181-4d1c-54db-08d8c6b82e69
X-MS-Exchange-CrossTenant-originalarrivaltime: 01 Feb 2021 13:49:22.6962 (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: Lc6gXZKeSwRKq/kVS7HfJb429Bo+zHrOeSOp92tslQM3M4eDOL4K1HoLrb0t4OOeGGPJMB3gOqR0iN27DSoC26i52ow0uWj097fMIU7BEpI=
X-MS-Exchange-Transport-CrossTenantHeadersStamped: HE1PR0702MB3546
Archived-At: <https://mailarchive.ietf.org/arch/msg/cose/IEx4C67-IGkQ9BpI8DUFxhElcwA>
Subject: Re: [COSE] IANA COSE assignments
X-BeenThere: cose@ietf.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: CBOR Object Signing and Encryption <cose.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/cose>, <mailto:cose-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/cose/>
List-Post: <mailto:cose@ietf.org>
List-Help: <mailto:cose-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/cose>, <mailto:cose-request@ietf.org?subject=subscribe>
X-List-Received-Date: Mon, 01 Feb 2021 13:49:28 -0000

Good to finally get some needed discussion on this to progress the draft.

1. I agree with other commenters that ES256K should be considered to be an exception/historical accident. 

2. My preferred solution would be if we do not have to register more code points. Ilari's proposal seems to achieve that. If any new co-factor code points are needed, they should be general and not for a specific curve. The original question from Göran only talks about ECDSA. My understanding is that the current discussion is only about co-factor ECDH, and that nothing special is needed for ECDSA.

3. COSE is a 0.5 round-trip protocol, so I don't think EE makes sense for COSE itself even on a high level. Agree with earlier comments that a use case would have to be motivated. EDHOC uses COSE with EE but only uses ths curve registry. (EDHOC does not use the COSE ECDH-ES points either).

Cheers,
John

-----Original Message-----
From: COSE <cose-bounces@ietf.org> on behalf of Benjamin Kaduk <kaduk@mit.edu>
Date: Sunday, 31 January 2021 at 21:56
To: Göran Selander <goran.selander=40ericsson.com@dmarc.ietf.org>
Cc: cose <cose@ietf.org>
Subject: Re: [COSE] IANA COSE assignments

Hi Göran,

I'm replying late to the thread, so I can refer to all the good discussion
that's happened already :)

On Thu, Jan 28, 2021 at 09:17:56AM +0000, Göran Selander wrote:
>  
> Hi all,
> 
> I'm one of the designated experts for the IANA registry of COSE algorithms and I need some guidance from the WG.
> 
> 1. Current IANA assignments and instructions for COSE algorithms [1] intentionally bundles certain parameters whereas others are not bundled. 
> 
> For example, all COSE registrations of ECDH include key derivation, but ECDH algorithm and elliptic curve are not bundled. Section 6.3.1. states:
>  
>  ”The math used to obtain the computed secret is based on the curve selected and not on the ECDH algorithm.  For this reason, a new algorithm does not need to be defined for each of the curves.”
> 
> As another example, ECDSA is bundled with a hash function (see table 1) but not  with the elliptic curve, see Section 2.1:
> 
> ”This document defines ECDSA to work only with the curves P-256,
> P-384, and P-521. Future documents may define
> it to work with other curves and points in the future.”
> 
> But then there are exceptions, like ES256K [2] which bundles signature algorithm, hash function and elliptic curve. 

I agree with other commenters that ES256K should be considered to be an
exception/historical accident.  A reading of RFC 8812 suggests that perhaps
the new signature codepoint was not as much about using the curve for
signatures but rather about not using the curve for anything else.  This
note from 8812 also seems to come into play:

   Care should be taken that a secp256k1 key is not mistaken for a P-256
   [RFC7518] key, given that their representations are the same except
   for the "crv" value.  As described in Section 8.1.1 of [RFC8152], we
   currently do not have any way to deal with this attack except to
   restrict the set of curves that can be used.


> It isn't clear to me when to follow the guidance in [1] and when to make an exception. Just because there is one exception doesn't seem like reason enough to register bespoke bundlings. 
> 
> There are different principles in action here. Security is one, where a bundling is made to ensure suitable combinations.  Structure and economy of code points seems to be another, where it may become an issue managing the numbers if every potential bundling of parameters can get a unique assignment.
> 
> As I see it,  there should be a good reason to not assign according to the the intentions of [1], and if we deviate from those then we should preferably be able to explain according to what principle that assignment was made so that the new principle can be followed (until potentially other examples requires us to reconsider).
> 
> Any views on that?

Another +1 from me on needing to be able to justify the exception.

> 
> 2. Another point relates to how specifications use COSE code points. For example, [1] recommends the use of deterministic ECDSA. If that is not used, is that reason to register another ECDSA code point? Or, if the cofactor of the curve is not equal to 1, is that reason to register another ECDSA code point? In other words, to what extent is the IANA number registration bundled with certain properties for which there is no register? 

For deterministic vs. nondeterministic ECDSA, I think it is clear that the
codepoint allows both.  For the cofactor, it is not quite so clear-cut:
Ilari's proposal seems sound and ought to work, but it may end up requiring
us to rely on implementors reading the details carefully in order to get
correct operation.  I could imagine defining a new codepoint for "ECDSA
with non-unity curve cofactor" to call this out, though that is just a
brainstorming note and I am not saying (at this time) that I would prefer
to do that over Ilari's proposal.

> An alternative to make new assignments is that the referencing document re-uses existing code points and specifies how they are used, including why and how deviations are made from the math or the recommendations. 
> 
> Opinions?
> 
> 
> 3. ECDH-EE is not specified in [1], whereas ECDH-ES and ECDH-SS are carefully distinguished in the registries. I would be hesitant to register ECDH-EE algorithms without any supporting specification describing how it is expected to be used in general. What does the WG think?

I have some vague recollection that ECDH-EE was challenging due to the lack
of a stable key identifier to use.  But I'm not even sure how I would go
about turning that vague recollection into something concrete from the
mailing list/meeting archives.

Thanks for bringing all of this to the WG,

Ben

_______________________________________________
COSE mailing list
COSE@ietf.org
https://www.ietf.org/mailman/listinfo/cose