Re: [COSE] Key identifier of type bstr / int

Göran Selander <goran.selander@ericsson.com> Tue, 22 March 2022 08:42 UTC

Return-Path: <goran.selander@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 696513A0C9A for <cose@ietfa.amsl.com>; Tue, 22 Mar 2022 01:42:28 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.11
X-Spam-Level:
X-Spam-Status: No, score=-2.11 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, HTML_MESSAGE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01, 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 28gE75q-B4uC for <cose@ietfa.amsl.com>; Tue, 22 Mar 2022 01:42:23 -0700 (PDT)
Received: from EUR01-HE1-obe.outbound.protection.outlook.com (mail-he1eur01on061a.outbound.protection.outlook.com [IPv6:2a01:111:f400:fe1e::61a]) (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 23ECC3A0CAD for <cose@ietf.org>; Tue, 22 Mar 2022 01:42:20 -0700 (PDT)
ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=YUijfzm6PNvEag6HSW1RcWJIHHQ3GRuvOwc5ddjFnSQ+ocBWbSvcG3l+NpVM8o0s7k7ewnd9DAEbmi8yXJZ/ZqAYmpVh/zXOpxKLY2yFJx5xt1ylLjaHe79gZSyOcYEOrXpdlUOHLcw641GECmROTZoJ4sYE+vbm4O5S85LFREYib2IzcZMvPCv2tzLaZFl4XsYdJTNPvAzhTonQkBYOYo1BqeqUogzdjvVaLgePuQtvJBRs81QQE7FWNcieCnXwPLiyN9sEjQaNbse+bvO9BQM4XSHAObzJbb8ebky0rIAOME93eDKUMzCPoGwEzERPSw5IlcQc8xN0qbxjtkEb6g==
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=k8d/K4HOfilypXDx8BbkRGGbpr4EuUhIM+X39a9ASFU=; b=nDBDQfRNUpIaZdR3tN32WrKGdEMTqS5qi8Ea/qukW2J08QUrU92hRf8UsTy3bWlS7nTydopkurHgippnuru5i4FVcDEuptvH8hbnhpzg7gXOWNaffbQHK7UZeDCfGyGNPorpqKyPkx7eEYE4UhVr9aX5qNyo1uCAHW0wyaScbeifmzIijj+QbUPTqXzkJwaNIQVOJAEGEkW7Y/kugt0cvfLXqccOOdIhu83rrH/GDFtoABmrVFeuNjRz1csFr9BJ7TONNiICylyjNPiOCdSbPU5L+hn/MJQDnQEd71t43SlwVAvKBY3DBP3j0MkzFFYXtnwvtOlDshcSCUnIfULlrQ==
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=k8d/K4HOfilypXDx8BbkRGGbpr4EuUhIM+X39a9ASFU=; b=aol7NVcd7g6u2slT4yW64byv9zKv9MbBmV3TlN1JgHYcuzVH9uZHp5or6ajpBmBJesd+YlkZd7PDlj0qqwgR+Katwfm0u3WLs2QWWf3sbqIERD+pwbb4Ov74k5OR6/qLICaBa92S7Ghuzs17caea56rGO081Q6pdr+qQC1I3U6s=
Received: from AM4PR0701MB2195.eurprd07.prod.outlook.com (2603:10a6:200:45::6) by VI1PR0701MB2445.eurprd07.prod.outlook.com (2603:10a6:800:6d::23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5102.16; Tue, 22 Mar 2022 08:42:16 +0000
Received: from AM4PR0701MB2195.eurprd07.prod.outlook.com ([fe80::7c54:b32f:e7b0:baff]) by AM4PR0701MB2195.eurprd07.prod.outlook.com ([fe80::7c54:b32f:e7b0:baff%11]) with mapi id 15.20.5102.015; Tue, 22 Mar 2022 08:42:16 +0000
From: Göran Selander <goran.selander@ericsson.com>
To: "cose@ietf.org" <cose@ietf.org>
Thread-Topic: [COSE] Key identifier of type bstr / int
Thread-Index: AQHXhT54TcPpMfWo3E61Id/NsrhJv6triUiAgAEuhQCBXojpgYAAAG63gAAK3oCAADPpUYAAC9gAgAAFLICAAEhWgIAACyMAgAB/NVU=
Date: Tue, 22 Mar 2022 08:42:15 +0000
Message-ID: <AM4PR0701MB21952FA024433E978BDE05DCF4179@AM4PR0701MB2195.eurprd07.prod.outlook.com>
References: <95B75634-B147-4756-A950-C6B139CF3ADD@ericsson.com> <9DF382AC-12A8-47A5-AAE7-2B0D75EAA669@island-resort.com> <EDFDB6E4-2BDE-4E2E-9CF0-D771E2DEF3C6@ericsson.com> <823C00C2-4F6C-4DF5-99B0-87D8524D4A9C@island-resort.com> <C059B669-4C5D-4980-A665-96A39F4457C3@island-resort.com> <AM4PR0701MB21958541C07CEA44DB1B1578F4169@AM4PR0701MB2195.eurprd07.prod.outlook.com> <CAN8C-_+3sWckZKo7KS2fsPU4pBHo+NNGgQpxg7p8LytFX01eEw@mail.gmail.com> <AM4PR0701MB2195D76D8CFCC873C1D05A04F4169@AM4PR0701MB2195.eurprd07.prod.outlook.com> <CAN8C-_K4EfFSar9H_QR+cV_pz+xhXtWA=pKK+rFv241E5DQofQ@mail.gmail.com> <DC1C335A-629D-4E4F-97BD-B4CA3519EDC6@island-resort.com> <641639.1647901233@dooku> <3724F698-FB9A-44F2-B942-A6034B9D207E@tzi.org>
In-Reply-To: <3724F698-FB9A-44F2-B942-A6034B9D207E@tzi.org>
Accept-Language: en-US
Content-Language: en-US
X-MS-Has-Attach:
X-MS-TNEF-Correlator:
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: 437c5a20-7bda-4590-852f-08da0bdfde5f
x-ms-traffictypediagnostic: VI1PR0701MB2445:EE_
x-microsoft-antispam-prvs: <VI1PR0701MB24457AD4D017DA6CC3152528F4179@VI1PR0701MB2445.eurprd07.prod.outlook.com>
x-ms-exchange-senderadcheck: 1
x-ms-exchange-antispam-relay: 0
x-microsoft-antispam: BCL:0;
x-microsoft-antispam-message-info: lqfG/yVgBtc4iOo1dch7t6mGvX8S61FrIfF7QMX/4TLS3crR3KVIw8uIzndtMnbtt+Ip+awBDbtGidO/3znSdIfwhRcqU/lgAiwGpAdZO12NBZ7qx4149gbIYAgcEOS2RMXGLw13reRv8pUJPR6d9Fya5FqClKWcy7vbA1r/5g/EEK+52Ehqk+2Ti3C1J66skP47cdVXwrTyuxSNYSVW+MJso5f8GTBYLIRJAZmKmMIC1ibFbBj58jjsOf8hUFtUqCLIJ4PAiimSqcEDNGyaHbR5hxmE5EeaUzwMw11WJkeWf13+XLJUwVXs58WT/hJ7xJOTIsMgG0vGIp4JWnG1vWir3JfPvRsaR/vXd/o4oeAEqysLCFrCXxpJWUwdPkbUPuBFWNCvoyKrs+73651CeggnQlBObY6wL37c968KkWEZYkSPkyvftYNXe1FXRbkWEx7ydvMgKbAV39uYDqUgXp7wfITjCkNfYMF5Cj9+QOeBBjLFSW018W3v3l5MWVJAgruYGNdp41FzTnYUoU/MrvMBg59041ntckpYRiz6SAoyT7/YDJd7KcJ01wvUheFDcjIzWOkQogu67IT093Wpb5fLvIF+JEGlRHlyrWej0NE5ewA5gzdJxBQb47cruTSE+2kgR6ytzrn4RZtOlli+6TdjiAI4jKQ0QMcB1j6lJTho3VVHkW6Uvo7CBNQ6nk1RzufOEnOXRu/XRIpl+T4UuMYXSGeBsbYIVymJQTlkdCQcSi0xCI/4lYy5UNXWVAkFZRxGboIT6QCX16xoWwzabQnnPQbYSV8HIQXF3QabqB/EzwwzNhMI1aukT3vPOluI5bbCsMfpj7lF/cIUIn/9vA==
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)(26005)(8936002)(186003)(52536014)(76116006)(6916009)(316002)(66476007)(66446008)(66946007)(91956017)(7696005)(8676002)(53546011)(6506007)(82960400001)(64756008)(86362001)(9686003)(38100700002)(71200400001)(122000001)(66556008)(66574015)(966005)(38070700005)(508600001)(83380400001)(2906002)(55016003)(33656002)(5660300002); DIR:OUT; SFP:1101;
x-ms-exchange-antispam-messagedata-chunkcount: 1
x-ms-exchange-antispam-messagedata-0: pXlMq7RTNBstgTwt0NxoC/vF8kowFuFuevwefthtK1LogYVX5OWWmfsTgTXleWkuLbYKP2A2hcmG1belhTE3iUKKyM05acdoMiSzgVlUWlnPAxEzc56LAsE1Xu0naHkxEj4m6XIL3uy8ynie6mUTANpR1vRXRQ5S1yBg1dJOLiTdgUcfcjU4WN8U8WNPGPGmUPipcJXY3TVXkYQxrb6AdyQi15AoWx3I8W4RDXY/H4sWCKmx/T8vKxkabuVSDKTcQ+ox1cIUvDn4dxXX0BtefiOnIyt4FIESXwd/Kf8JX57zhRqVLYb9ZUFZj7yehWnw5Cue/s82AB0kpJthr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1xcXKo9GdwqKd5hTag/cAOuZz4x4UOG5QTSxQvJEdshwpZbRbBjH08I9UrUjFghASG8Iao38x/QkmE8A7oUCw0bTq80Kc=
Content-Type: multipart/alternative; boundary="_000_AM4PR0701MB21952FA024433E978BDE05DCF4179AM4PR0701MB2195_"
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: 437c5a20-7bda-4590-852f-08da0bdfde5f
X-MS-Exchange-CrossTenant-originalarrivaltime: 22 Mar 2022 08:42:15.3699 (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: lK+MhWCbt/hAxrriEhzTVTIBWrWJIFEncxs+ai+WjRDCEkyXHaubDhm31KLH2XesvkPqu76CcTaksERwjXmHVaqxS+IsYRTwZI7AdcmnhdI=
X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR0701MB2445
Archived-At: <https://mailarchive.ietf.org/arch/msg/cose/I6JeJFj9J9qHvIuPE0-5-nyA0a4>
Subject: Re: [COSE] Key identifier of type bstr / int
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: Tue, 22 Mar 2022 08:42:29 -0000

> I’d like to ask those who are proposing kid => int / bytes:  are the two kid name spaces disjoint

Yes. An integer kid is considered different from a byte string kid.


Just to be clear on the source. This proposal is based on a previous conclusion on the COSE mailing list considering different solutions:

Solution A.
kid => int / bytes

Solution B.
kid => bytes
kid2 => int / bytes

Solution C.
kid => bytes
kid2 => int

In this previous discussion (see first part of this thread [1]) there was a mild preference for A. We can revisit this now, but it is good if people participating in the discussion are aware of the arguments made previously.


Göran


[1] https://mailarchive.ietf.org/arch/msg/cose/q_6kay8Z_4Wr48TFBXZU2oGRqoE/




From: Carsten Bormann <cabo@tzi.org>
Date: Tuesday, 22 March 2022 at 00:00
To: Michael Richardson <mcr+ietf@sandelman.ca>
Cc: Laurence Lundblade <lgl@island-resort.com>, Orie Steele <orie@transmute.industries>, Göran Selander <goran.selander@ericsson.com>, cose@ietf.org <cose@ietf.org>
Subject: Re: [COSE] Key identifier of type bstr / int
On 21. Mar 2022, at 23:20, Michael Richardson <mcr+ietf@sandelman.ca> wrote:
>
>> kid => int / bstr
>
> It's one of the features of CBOR, as a self-describing format, that we can
> introduce new ways to do things.

Indeed.

So this is obviously an extension.  Old implementations can’t use the new data items enabled by that extension.
New implementations don’t have problems with old data items, so we call this backwards compatible, but not forward compatible.
We didn’t identify this as an extension point, so the lack of forward compatibility is likely to be universal — if you use an integer kid, old systems overwhelmingly will not understand you.

Now, there is also API compatibility — can you upgrade the COSE library without upgrading the using application.

I’d like to ask those who are proposing kid => int / bytes: are the two kid name spaces disjoint (so you need an API extension, too), or is an integer kid just a way to express the same kid as was already possible to express using a byte string kid.  Another way to say the latter is that all kids are byte strings and the integer representation is just a compressed way to express such a byte string.  Obviously, the latter way to interpret kids is slightly less efficient, because there are now two ways to express certain kids.  But the change is also local, i.e. you can do it in your library without changing anything else.

If we go for the latter, we will want to make sure that in particular the integers -24..23 map to useful byte strings and v.v.  Note that there is no need to make these byte strings short; e.g., a decimal representation (‘-24’ to ‘-1’ and ‘0' to ’23’ in CBOR DN), or maybe an octal one (’50’ to ’77’ and ’00’ to ’27’) would work well.  We don’t even need to support integers outside -24..23.

Grüße, Carsten