Re: [Cbor] [COSE] CBOR magic number, file format and tags

John Mattsson <john.mattsson@ericsson.com> Thu, 21 January 2021 23:19 UTC

Return-Path: <john.mattsson@ericsson.com>
X-Original-To: cbor@ietfa.amsl.com
Delivered-To: cbor@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 45AB73A0CC0; Thu, 21 Jan 2021 15:19:28 -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 ZnutcN0fgtXU; Thu, 21 Jan 2021 15:19:26 -0800 (PST)
Received: from EUR04-DB3-obe.outbound.protection.outlook.com (mail-eopbgr60071.outbound.protection.outlook.com [40.107.6.71]) (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 88D9A3A0CBB; Thu, 21 Jan 2021 15:19:26 -0800 (PST)
ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=n68dW5gPrphi0ua7/SO14lmwsYYepFp8SFZ0V7abVjAseAoX3rDBrMEBmgerh1lGgqglVwlUdhagUX9NXy98QC1GIyISqh9w7FZdr6qFVip8jnUyj8LIdw9OwsHuFw+fqP2PageDLfLkbVPFlVtobrSK9bvJ61dhpIE5aP1ET+wQJT9em6C2sJaNtq8s/WNGiqbehUPOhygiSzFShBHdtPJCd7rwjBVzXpHXt9xTbQU64F1S1Uh5IcvyWfP+YkFxOJbQFWpIseskI0Of9osFVtoDiPSCL8HvbINkws7hbFPD/Q9OMP5YsK40Yt+nRj1hOrv4TWb5Xy8JNHgXi+k3PA==
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=+LB8GBJGIjwgKhCxvLwcSndUbBv8WUCR839n2sRq5po=; b=cTCQn6iaYHZeAA5pdaRZewA4EOgc2Yo5YwzDBmMr7vYxh9qoa6ak2lAyfJnD+kkkOHf6SudhO4ivDgZLs+KZjIARgxbb0rqarDlCRwQe4W3mOxgC0dANfR/QXr6AYKWoYhSS08RZTJBvcStMujU8dPtNe/tiJsssB5BC57QYKz6F89S2a9Nh/WVfME7ta+MtSd16kKCKoploJ9X2Q43ph5WA1QMbZ2loMT68c8KBiEXlV7zZqZBYavWVUsjPd7yihyVZoEJdbCZ/F6/pSFt0POigs6PsalWX2jC8PH2RZZxDtvHjWqzb69st0//4mp3dpthH42lhcTLb/UsnAGKIJQ==
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=+LB8GBJGIjwgKhCxvLwcSndUbBv8WUCR839n2sRq5po=; b=fAnVrOBsloVyUMNxSv4/KNYpuGMeo+oSYWgboyzENWtGsWkTwfBZZ7sB7mtPJfhZCCLMDFptXgIh9SaNwMkKT00VRE9j2eNQIuL3VazmbdARziiitkZUf5AcTlA8YKD3jlz8Jef+l+oLE4I9pMgjjWgXYLJDoo38IDDyCNyY5qI=
Received: from (2603:10a6:3:4b::8) by HE1PR0701MB2204.eurprd07.prod.outlook.com (2603:10a6:3:2c::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3805.5; Thu, 21 Jan 2021 23:19:21 +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.3805.007; Thu, 21 Jan 2021 23:19:21 +0000
From: John Mattsson <john.mattsson@ericsson.com>
To: Michael Richardson <mcr@sandelman.ca>, Doug Ewell <doug@ewellic.org>
CC: "cbor@ietf.org" <cbor@ietf.org>, 'cose' <cose@ietf.org>
Thread-Topic: [COSE] [Cbor] CBOR magic number, file format and tags
Thread-Index: AQHW75tl4OJQlKVZw02yedX64uiUfaoyGXyAgACvwQA=
Date: Thu, 21 Jan 2021 23:19:21 +0000
Message-ID: <FE986215-E18C-46CA-91C7-6AEFE1C0B4DF@ericsson.com>
References: <3C77CB5D-6AEA-4D70-96A2-3826DB8DAB18@island-resort.com> <10306.1611186961@localhost> <008501d6ef9b$5cf35ab0$16da1010$@ewellic.org> <31755.1611237017@localhost>
In-Reply-To: <31755.1611237017@localhost>
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: sandelman.ca; dkim=none (message not signed) header.d=none;sandelman.ca; 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: 57aed05f-983f-4518-8fad-08d8be62fbd9
x-ms-traffictypediagnostic: HE1PR0701MB2204:
x-microsoft-antispam-prvs: <HE1PR0701MB2204063219DB8305D9F6E15689A10@HE1PR0701MB2204.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: P9joA50Mgzy2lWq47ynSVxbpiUQfww8ZBZyrwvMp+OqHs+UtK0JGixFkTIvrdXJMSfdiOZ0FmpOHvAx+vXxa45j0+JTAu5BgnSNEXHOynyAYuW6kU1/t3L/xW4gPN/0AruFcWLFTe5DDHfjxAPUu0LIl2lgjDkJGJcCSCA13O2+0IkgfgY1Lo/eUevVJUMmWbsmY5Tda8i1CybRBSCWpvWyJYK2SOge3I3Cy7TwjCrD3FkKTyi3LWCtmw1XIxD4VfeFFE7+Ure703RJgjJpmGNvsgXzIN2T0mRhoOUP9NHxYp9fqswZpuI7gXB6u9OjyNV7EC9ShoX83qyBBZWOIj6tPPa+s+4IrmnB6dwjs6O3GSJtjqv5SmeLv36epizJWeFZMBHZZyuNaN1K3G8PZKVmSUbm9fLAhKbQlLiJWKh8Zp+QMFuH3h7jpsjpEcqf3
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)(136003)(39860400002)(396003)(376002)(346002)(366004)(8936002)(86362001)(6506007)(2906002)(66556008)(66476007)(64756008)(76116006)(6512007)(44832011)(4326008)(478600001)(186003)(26005)(2616005)(6486002)(316002)(110136005)(36756003)(8676002)(33656002)(5660300002)(54906003)(71200400001)(66446008)(66946007)(45980500001); DIR:OUT; SFP:1101;
x-ms-exchange-antispam-messagedata: yBRa+Pzg5QkPo0w9FnANK7u4Y6AKyUDoCY1JV8UauqXfsQ+YYnUVkprX7XlN3bi4ezxsCvGAnTQj1K58scY5rMaMDwE4dKSCExcXiQYWi917jn7/uyUUWy/qalx5k/NE+wS9GeEK1oQGdg4AzSYNfd/bE8tvtRRnS4TCKLkyK3AEcjRgr2fuGl/oO5keB39yobkaWYW55YCbxPqjrVOGCH0duLuTroG7hmiUOZcCmxkACq9nQ0POMLNnAe+QCUaYHivdZZVTOP1Np/e2bnYlYsbZlVjRAioQLIEBowcutrgOj6pw99C1wqX90hoUXOIXF4L5QklPBWeENy7bES93GprD7R4o1/LdYP+wtOu+BX1Yy0Yz9A4p5EtY2/oUtinnaOxhBUItltX0kYebA7gjLO0QDU8QXAPxRLiS5U8CS+QSYGA5SOaR7mHDEG7HV3RDIweWAdNEK68u8rcelCa8otXJVZqlO2E9Ak/ltgBGfQwV9ZQsDhrAeGnFenwqXIpBrxxCpMYKzmscIoJexfFm8zywZmDz/wb4z/HTUQe84qGMg4Z+V51/Q0zcw2sje8hm2gzU1ZHftmp15Iwasc1LxwFhIvFZyrAdEO3yrvCpYeXQnTOXdKCRD6Ok4F4799D5VY22etM46Ulfa7mmbjqQ5/a/1Zw0DwHeIL7l2ZlQ1qog8cftTVOeaVi4G9ejsupUYY2Z96oOMAXTNis+qmOsFB12SaIom192ADEvyMo98Qt5hr+tyMg0Hz+nLYL39UDp7t4V4xpSFzY4Q1fOF8EY8eyio8u2S/4wOoNH3MZzRawlOl96F3/hwii88y/G3qIgULoFe5f8KBNUrhuCf7LfUwst9/OtFxnKP/BMTf27+pXQXeAAHlP9Fhk6iEVFC19cs/xI1DwIAapsBklCukUPxteO2FpqdUKIVWP0VDuyO/FFIMWRJwUl/PVpMi4qypAHtv1EJMcvBNDe00Z/N1mm/kDvMvpSucSKkkuxAEd0CYOX8NJB+ufbVe0ZraG263qM
x-ms-exchange-transport-forked: True
Content-Type: text/plain; charset="utf-8"
Content-ID: <1C5B44B0D57AEE4C8B9800C52B1B9659@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: 57aed05f-983f-4518-8fad-08d8be62fbd9
X-MS-Exchange-CrossTenant-originalarrivaltime: 21 Jan 2021 23:19:21.3087 (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: g2nQmu5+iiTlcvrk+71hqrxVibImQijXNK3OoEfZlpzZ9zy2zw63AUYAuQbvpuXY7PYcyc9zoc/PQfhydka91R+HbdSN3cDhxcXRm0ZNetc=
X-MS-Exchange-Transport-CrossTenantHeadersStamped: HE1PR0701MB2204
Archived-At: <https://mailarchive.ietf.org/arch/msg/cbor/y267sKSaaL65-ksjnKUE9__Gt5A>
Subject: Re: [Cbor] [COSE] CBOR magic number, file format and tags
X-BeenThere: cbor@ietf.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "Concise Binary Object Representation \(CBOR\)" <cbor.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/cbor>, <mailto:cbor-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/cbor/>
List-Post: <mailto:cbor@ietf.org>
List-Help: <mailto:cbor-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/cbor>, <mailto:cbor-request@ietf.org?subject=subscribe>
X-List-Received-Date: Thu, 21 Jan 2021 23:19:28 -0000

Hi,

It seems like there is agreement to specify a CBOR tag for a CBOR certificate. I stated specifying this for the next -07 version, se below.

I started to specify a tag based on Laurance suggestion to tag an array wrapping the CBOR Sequence. I don't know how to best specify this data item. It would have been easy before when the CBOR Sequence was specified as a CDDL group. Now when CBORCertificate is specified as an array with human-readable text specifying that it is really a CBOR sequence, both CBORCertificate and [ CBORCertificate ] seems wrong....

Would a tag for a chain/bag or both be needed as well? If a tag for COSE_X509 with CBOR certificates is specified, that could potentially be used to tag a single certificate as well.

Maybe it is confusing to use the COSE_X509 CDDL for CBOR certificates? A new structure for CBOR certificates could then also be more compact by wrapping the certs in arrays instead of bstr.

---------

## CBOR Tags Registry {#tags}

This document registers the following entries in the "CBOR Tags" registry under the "Concise Binary Object Representation (CBOR) Tags" heading.

~~~~~~~~~~~
+------+------------------------------------------------------------+
|  Tag | X.509 Public Key Algorithms                                |
+======+============================================================+
| TDB6 | Data Item: [ CBORCertificate ]                             |
|      | Semantics: The CBORCertificate CBOR sequence wrapped in an |
|      |            array.                                          |
|      | Reference: This document                                   |
+------+------------------------------------------------------------+
| TDB7 | Data Item: COSE_X509                                       |
|      | Semantics: The content of each bstr is the bytes of a CBOR |
|      |            Certificate.                                    |
|      | Reference: This document                                   |
+------+------------------------------------------------------------+
~~~~~~~~~~~