Re: [Cbor] Packed CBOR review

Brendan Moran <Brendan.Moran@arm.com> Thu, 17 June 2021 11:18 UTC

Return-Path: <Brendan.Moran@arm.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 754643A1B38 for <cbor@ietfa.amsl.com>; Thu, 17 Jun 2021 04:18:01 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.899
X-Spam-Level:
X-Spam-Status: No, score=-1.899 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, RCVD_IN_DNSWL_BLOCKED=0.001, RCVD_IN_MSPIKE_H2=-0.001, SPF_PASS=-0.001, UNPARSEABLE_RELAY=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=armh.onmicrosoft.com header.b=VmckzT31; dkim=pass (1024-bit key) header.d=armh.onmicrosoft.com header.b=VmckzT31
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 hhtYE5Pl-Lu6 for <cbor@ietfa.amsl.com>; Thu, 17 Jun 2021 04:17:56 -0700 (PDT)
Received: from EUR05-DB8-obe.outbound.protection.outlook.com (mail-db8eur05on2085.outbound.protection.outlook.com [40.107.20.85]) (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 590823A1B29 for <cbor@ietf.org>; Thu, 17 Jun 2021 04:17:56 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=armh.onmicrosoft.com; s=selector2-armh-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=BL0J4tdZl0Rs4DWcg5aePaBpcbSTUAWBn/11s5TYRmk=; b=VmckzT31piZ7FIenG0t4TX9bBQGA9qAyLCwEWiDOp5d44ClTbysXCrpnvXZVgLRD2poZGSxK7tx4ccsO7ww7QushLJO9Di/VViP3jxBb8Md2RzhJNnWv/cgoNzKHuwI3XQOu9e+/6L7K9yLvL/xRtQJRpOs7s/wz0FcbtlrqMho=
Received: from DB6PR07CA0117.eurprd07.prod.outlook.com (2603:10a6:6:2c::31) by AM0PR08MB5284.eurprd08.prod.outlook.com (2603:10a6:208:12a::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4242.19; Thu, 17 Jun 2021 11:17:44 +0000
Received: from DB5EUR03FT014.eop-EUR03.prod.protection.outlook.com (2603:10a6:6:2c:cafe::25) by DB6PR07CA0117.outlook.office365.com (2603:10a6:6:2c::31) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4264.7 via Frontend Transport; Thu, 17 Jun 2021 11:17:44 +0000
X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 63.35.35.123) smtp.mailfrom=arm.com; ietf.org; dkim=pass (signature was verified) header.d=armh.onmicrosoft.com;ietf.org; dmarc=pass action=none header.from=arm.com;
Received-SPF: Pass (protection.outlook.com: domain of arm.com designates 63.35.35.123 as permitted sender) receiver=protection.outlook.com; client-ip=63.35.35.123; helo=64aa7808-outbound-1.mta.getcheckrecipient.com;
Received: from 64aa7808-outbound-1.mta.getcheckrecipient.com (63.35.35.123) by DB5EUR03FT014.mail.protection.outlook.com (10.152.20.102) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4242.16 via Frontend Transport; Thu, 17 Jun 2021 11:17:44 +0000
Received: ("Tessian outbound d8701fbbf774:v93"); Thu, 17 Jun 2021 11:17:43 +0000
X-CheckRecipientChecked: true
X-CR-MTA-CID: 467b12446e5d7e0f
X-CR-MTA-TID: 64aa7808
Received: from c721c4bfc21e.1 by 64aa7808-outbound-1.mta.getcheckrecipient.com id 17D5A6E6-2063-4710-BE49-ACE00073CE5F.1; Thu, 17 Jun 2021 11:17:37 +0000
Received: from EUR01-VE1-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id c721c4bfc21e.1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Thu, 17 Jun 2021 11:17:37 +0000
ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=WQdX8J8EQk2VAthPGVl9ad8Fx5foX/LKqmQEuK8kpDkTV9LCtZQ7J0AfJdtSbHzHK7HVH//PntulZ+tsevXtQ3rgt6OJ5SsDIKDHr+P7rOOqXRGA+H9OB9Fz5uJqhjrmkRsyQ3EJag3B0ZCBOZkxn7/RgDcEsiF4/WQXugYmrCnoRbLRew7Cb2WhNHNNpNGYyVZTJdkuwpGpU/6/LFjH38eGiihR8M9BfAnoKdZABQ/UkpSlF9ASW2tazXxPU6s4sEir2P9hdbH7TXYonhhYBxKZ0rJAP+Rbfz10LW0+ewWwb5bp+kPHwXFVl25nIdIcH6L0ltZiT8sOqmJwC/bnaw==
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=BL0J4tdZl0Rs4DWcg5aePaBpcbSTUAWBn/11s5TYRmk=; b=jctrjR2In4rFpAkrqdlW1aT5VywJK4f7N0KnS0WbareJJxLAjNeVp/SNtJTL0wi86cM9ykQLtExtB7pFpnBxVYjyh4U9uUQ0fDG5LtZnUq2qgkBcN3WPfVpr5g8NuCGzckdAmpa19egi+0W1Kc9xWekesxednBuVCUQ9bGjUMenh6660pMgwvv1M4d2vANEsIpd8z/BNFPMXWUYYdQQDS8HJjPRLH+ORgDiF6UmbxlPm5y8zvX0aU6CGFhpsDQGNr8S+lYzHpqng7gIpQwsqbA10Hb2BLubX26CI5bJfkj2hY6n9tPQl80jFOEj5W9OKa9yZIYo1Ant2xrPSR8nh9w==
ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=arm.com; dmarc=pass action=none header.from=arm.com; dkim=pass header.d=arm.com; arc=none
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=armh.onmicrosoft.com; s=selector2-armh-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=BL0J4tdZl0Rs4DWcg5aePaBpcbSTUAWBn/11s5TYRmk=; b=VmckzT31piZ7FIenG0t4TX9bBQGA9qAyLCwEWiDOp5d44ClTbysXCrpnvXZVgLRD2poZGSxK7tx4ccsO7ww7QushLJO9Di/VViP3jxBb8Md2RzhJNnWv/cgoNzKHuwI3XQOu9e+/6L7K9yLvL/xRtQJRpOs7s/wz0FcbtlrqMho=
Received: from DBAPR08MB5576.eurprd08.prod.outlook.com (2603:10a6:10:1ae::11) by DB9PR08MB6668.eurprd08.prod.outlook.com (2603:10a6:10:2a9::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4242.19; Thu, 17 Jun 2021 11:17:35 +0000
Received: from DBAPR08MB5576.eurprd08.prod.outlook.com ([fe80::3487:4e34:2e16:5521]) by DBAPR08MB5576.eurprd08.prod.outlook.com ([fe80::3487:4e34:2e16:5521%3]) with mapi id 15.20.4242.019; Thu, 17 Jun 2021 11:17:35 +0000
From: Brendan Moran <Brendan.Moran@arm.com>
To: Carsten Bormann <cabo@tzi.org>
CC: "cbor@ietf.org" <cbor@ietf.org>
Thread-Topic: [Cbor] Packed CBOR review
Thread-Index: AQHXYpEHP1YPTS/t6U2wn+lIJtSz1asWnBuAgAFPYgCAAARngIAAH7cA
Date: Thu, 17 Jun 2021 11:17:34 +0000
Message-ID: <146F670A-48EA-4A90-B77C-4CCC535F1DB1@arm.com>
References: <8713C3AB-71C0-4EC0-8977-15F80EC11309@arm.com> <212CE7EA-73BC-47BF-B192-D2D523F4A376@tzi.org> <33C84949-0F9C-432C-9C94-DE2C9EE17976@arm.com> <3F367A6D-5CAD-474F-AFEE-DF1AC9A34135@tzi.org>
In-Reply-To: <3F367A6D-5CAD-474F-AFEE-DF1AC9A34135@tzi.org>
Accept-Language: en-US
Content-Language: en-US
X-MS-Has-Attach:
X-MS-TNEF-Correlator:
x-mailer: Apple Mail (2.3654.100.0.2.22)
Authentication-Results-Original: tzi.org; dkim=none (message not signed) header.d=none;tzi.org; dmarc=none action=none header.from=arm.com;
x-originating-ip: [80.7.184.196]
x-ms-publictraffictype: Email
X-MS-Office365-Filtering-Correlation-Id: 4ab7ecf6-6123-4eb9-95c2-08d931818752
x-ms-traffictypediagnostic: DB9PR08MB6668:|AM0PR08MB5284:
X-Microsoft-Antispam-PRVS: <AM0PR08MB5284977717E0AB0F06CC3978EA0E9@AM0PR08MB5284.eurprd08.prod.outlook.com>
x-checkrecipientrouted: true
nodisclaimer: true
x-ms-oob-tlc-oobclassifiers: OLM:8882;OLM:9508;
X-MS-Exchange-SenderADCheck: 1
X-Microsoft-Antispam-Untrusted: BCL:0;
X-Microsoft-Antispam-Message-Info-Original: GCiv183s/W+QvRZitqQKMBrYc7Yakd+M0Sh2MmA5DvShrEelXdqHzhofcnpHq5qZg7p/UbuxhJIFhlUXCowgwxcptiMkjRy8xC3BTJv6rVC4Q5nXffuyujrouRSSJaP06OssKp2B8XqvMOOf9DyBR30eIf6Iz/7Ot9gMv854ZKTy8dMrAOWlnGd5tYqnyFIS/MD9XocyVkQPHBTmcwXqt0VF+I9HjqH06NeYph2QZxNgvvP53+I3PlrN+Pt+I/diNRrUovx3P2JLVfTGPp68mrsZAPaxt9lsX2b3oV3a+2HTIQClraomNxeXSnlMrRlM0CxhoYgFU97zx+x96poK0VUn0M0s8SG19dh0E+9+0Y8imcHGMoK98jmXR09ejHCUeeVYYZXiewVDSb+qaN9RUfxFDLau0N9Y9Hi9Rr9R73qTrDp1CL3Jv8Y3unHQfVKPZdETyTND7ViV99bqgcURYZMMEH0rLG8t1x2jvIL74+Q/WMPN6gg/aZIErOzzEewGj5lrmUsl7ZTJ8onalCQHqV5Kn22LFMoU29uc60ZFmUWGlCc43B5O57ZoR6dSqHJPNmoCWhXeHFroyXZATNnwHsFkkam1beQtFRXEyjGHWR+yT4hFxdd2iesXPAVcCRg+K3Kd3BmSOeDJEc8qCaUVTViNlqVhNDGsmgmN/WE6jl0=
X-Forefront-Antispam-Report-Untrusted: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DBAPR08MB5576.eurprd08.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(366004)(39860400002)(136003)(346002)(396003)(376002)(5660300002)(64756008)(66446008)(66556008)(36756003)(53546011)(6506007)(66476007)(478600001)(186003)(316002)(26005)(8936002)(2616005)(83380400001)(38100700002)(71200400001)(8676002)(4326008)(66946007)(122000001)(91956017)(6512007)(6916009)(76116006)(33656002)(86362001)(2906002)(6486002)(45980500001); DIR:OUT; SFP:1101;
x-ms-exchange-antispam-messagedata-chunkcount: 1
x-ms-exchange-antispam-messagedata-0: PxVdmoa9z9kddcWaTuaFqa2HdIx9gf+QBx1UHocfmd4qjB3XOjD7xYhQ2t63sq4PVUfFANwOHo+Vbx6OidgVkFA6vYSyZwU0ms505LtuqDr1GTXmbudoC1PgWGkIbfGH71fug+Kp0+4zSTzy83rAgvQP08GYnXeqs+YhF5RJpabUrnDy/YUpZ+tnEWayj3u7/DSO/P7TJkiYE8kb8dfyhl59tQiMO8X+QFuFRj+BZxEkH4Cltpm3gsr+v4G7lSM9YcMEUdui3c9ocPF3o7jf37MXrqJlCPpGpKf5YnW5Cun1K00QYkDrXGsmgK09h71qovQAxN+wT2q0Yz+ncVchXo2U5kQdEjSTnsxkhHfymU/9RbK/9dLsszzSgOFc4YjIkSeMfuItN0yJDnCa+dXwUNBJamMqf3P9bBjTU4bCIWM+iZCs+snWk/AzTRes/yLrA+Mkd+qsmNqx2AGVq1kFyYpNA51u9RAnQOyeWSKf/EuLcg2bo4jZaSttE8eMW0PnqApTMZZRV9H9zshcYQCmhjVCRwRKaKbwyGuzjyVoDsMF0OmIVeXQZzG/HXu5x3l5NgkOdfK5+YI8iVyI8rlyqLVN5JbatSfAS5eJMVXX7f29xH90OKv5VGkuwRAcBTCZMbOQmmP7851ZuYb8wDALKysIqJUt+/pjooaK9LBosa8Ff3Yk6JKGElQj0J6nXFJyrh+yoO+SWlEeKDaC55Ni6zkNC0agyNY4tOwgIn5ll1gTs1RVCy7Hyxl62oD+ImQNqmk0FXzHBnPNsXwNvokrqdndchLm1t8uOygNS4ISxM8oCDWuaAfXpm6p00sfyYxdnDm+0G56cRqU7Ly4M8ARvqajaWQdw25fNPoAPvNXF0TgF4TtVAMLoHvortagho8iqUaRHSl5NdDws4e+X0UXt0jLqHZsomFlTlJR/06/LHbetXgwMphTWfEtqSLjzoGa2w2XxX6/3AdTQLVh7db4Z7utK89p0gp3wWiqxHB2BRlrb1N5J3iuudHTBIluZwhf4eQboQIumFmRLj7ALAVjYtcg/q9MRY5qdGEV4PvCvwF7ZJWGVcWwgYe1Bc3wpNuv7UoEcHIngQP+w9GJ4SbnKlqB/s/xe5YDQlc/k5zWtwgUhCO2FQECl0VxmOlblzxNz1KEfg0oXBW8UuvL7lcwnYiXDS8ow8Y3LNFpigRhuTFeNjsWuWu9Z7BX4Evndh22m9drPC3Q6grRW1lYVAxKpail2NokgD1aVND0lQhlOhnuA66gsk0sopv00aJQPX0D8kUZsHtX8wBnv+n6Z5GPJtYLbJvKyDb4ZJcWa+M0rIh+z0oYeSsErwr7fvN36rvA
x-ms-exchange-transport-forked: True
Content-Type: text/plain; charset="utf-8"
Content-ID: <C796FF98E901D94CA5DEF52C0FDE6138@eurprd08.prod.outlook.com>
Content-Transfer-Encoding: base64
MIME-Version: 1.0
X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB9PR08MB6668
Original-Authentication-Results: tzi.org; dkim=none (message not signed) header.d=none;tzi.org; dmarc=none action=none header.from=arm.com;
X-EOPAttributedMessage: 0
X-MS-Exchange-Transport-CrossTenantHeadersStripped: DB5EUR03FT014.eop-EUR03.prod.protection.outlook.com
X-MS-Office365-Filtering-Correlation-Id-Prvs: 56ab09f6-e01a-41a8-c71b-08d931818226
X-Microsoft-Antispam: BCL:0;
X-Microsoft-Antispam-Message-Info: vYyDl2SyuK1QltEHb1OSbQ9LPAQU161V0yd1DgNoU9lluwW5Vdl6uhhk0u4MABmbauIJMY+Lim31UH+b001DVOcWAHpHcbcCjD8582C9KwOOkE2U2XT4Fy4c8lVNmZJtx/cM0lSlrF4jpEpxe1kcQx/z7tDC3NvSUMcubBXBSikzIPgE2hxtu6RX6hnlwKZt1vJWAjGbMUsUuFZ7z2zsRllwpWXPX3CUERmELpvs0uxpz7F6J1D2ZE/PjvZLxPZ4boUkp/DrUEFxnzivFqTubX2PleMazQtnnzzN4C7kelx2i2G5ODYNG7XQpvMP0XU8d8mulWfFqByReg5NGN8Ua8PFIrSQkg3sgrNqjf5AMjaBncm44J2eEuqKzYfnoDJpytqOSuMAVP5iGZ6lfSjT8kQhVwu1BpcAyII0lM1DngQuJ+updDjI3lvSiMINfLU2RLz9m2++cX9Bon+kmXde2/M0n9Jy7E2ye0eoYJtu8jCWmTutKDJtaHft0Efjhozx2JcaUpiE4Oy7LFrbci4LndMWrlyqf/OPrSkiP4ccy99HZXggysIapagqVEzNzaihKDUR9zDX1tfa1XlZYpuCk9ZK2xVBGQGkePCkS0ekoBolMBoxXB/7z0C1BooZgGYPQFU+uPqBK0HGt5GmCMUA+8ODywvIVVP2G4rUzpXyYA0=
X-Forefront-Antispam-Report: CIP:63.35.35.123; CTRY:IE; LANG:en; SCL:1; SRV:; IPV:CAL; SFV:NSPM; H:64aa7808-outbound-1.mta.getcheckrecipient.com; PTR:ec2-63-35-35-123.eu-west-1.compute.amazonaws.com; CAT:NONE; SFS:(4636009)(396003)(376002)(136003)(39850400004)(346002)(46966006)(36840700001)(6486002)(36860700001)(33656002)(336012)(47076005)(6512007)(8676002)(70206006)(5660300002)(70586007)(8936002)(2616005)(2906002)(26005)(81166007)(356005)(82740400003)(4326008)(186003)(83380400001)(478600001)(86362001)(6862004)(36756003)(53546011)(316002)(6506007)(82310400003); DIR:OUT; SFP:1101;
X-OriginatorOrg: arm.com
X-MS-Exchange-CrossTenant-OriginalArrivalTime: 17 Jun 2021 11:17:44.0434 (UTC)
X-MS-Exchange-CrossTenant-Network-Message-Id: 4ab7ecf6-6123-4eb9-95c2-08d931818752
X-MS-Exchange-CrossTenant-Id: f34e5979-57d9-4aaa-ad4d-b122a662184d
X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=f34e5979-57d9-4aaa-ad4d-b122a662184d; Ip=[63.35.35.123]; Helo=[64aa7808-outbound-1.mta.getcheckrecipient.com]
X-MS-Exchange-CrossTenant-AuthSource: DB5EUR03FT014.eop-EUR03.prod.protection.outlook.com
X-MS-Exchange-CrossTenant-AuthAs: Anonymous
X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem
X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM0PR08MB5284
Archived-At: <https://mailarchive.ietf.org/arch/msg/cbor/MsDWLOEjFctQkwZoTlb8rxLTkGk>
Subject: Re: [Cbor] Packed CBOR review
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, 17 Jun 2021 11:18:02 -0000


> On 17 Jun 2021, at 10:24, Carsten Bormann <cabo@tzi.org> wrote:
>
>>
>> We can have our cake and eat it too. I don’t see a reason not to support all of these choices.
>
> Absolutely — we then just need to design how each of these choices should look like.
>
>> If we simply use a different type in each case, the encoding is unambiguous:
>>
>> Basic-Packed-CBOR = #6.51([ ?dictionary-reference, [*shared], [*prefix], [*suffix], rump])
>> rump = any
>> prefix = any
>> suffix = any
>> shared = any
>>
>> dictionary-reference /= standard-reference
>> dictionary-reference /= uri-reference
>> dictionary-reference /= hash-reference
>> dictionary-reference /= context-reference
>>
>> standard-reference = uint
>> uri-reference = tstr
>> hash-reference = bstr
>> context-reference = null
>
> I think I’d rather have
>
> Table-Setup-Uri = #6.52([Uri-reference, any])

This only costs us a tag definition and it simplifies parsing. This is probably correct.

> Etc.
> But stacking the tags (and spending another array) costs three more bytes.

I think this decision depends a lot on what the expected model is. For a single dictionary reference, it’s pretty irrelevant, so we should pick whichever is more idiomatic. The issue is when your reference wants a reference.  For example, suppose I have two reference tables that share a lot of values: Table A and Table B. With stacking tags, I am forced to make a tradeoff: either duplicate data on the endpoint or increase the size of the transmitted data:

If Table A and Table B contain duplicate data:
Data-A = 52([“Table A”, …])

If Table C contains the common parts of Tables A and B:

Data-A = 52([“Table C”, 52([“Table A”, …])])

If every table is allowed to define a reference, this problem disappears, however it creates a new one: a compressor cannot select an arbitrary set of tables known by the decompressor and compose them in the optimal order.

>
> But maybe that stacking is most useful for
> Spiffy-Standard-A-Table-Setup = #6.4711(any)
> Where 4711 is a tag allocated by spiffy standard A.
> (Otherwise we’d need a separate registry for that uint, and that makes me shudder.)
>
> In any case, stacking would allow stacking a couple standard references.
>
> How would the hash reference specify the algorithm?
> (I think CFRG would tell us that collision resistance between algorithms isn’t a well-defined property.)

We could possibly reuse SUIT digest definitions for this:
suit-digest = [algorithm-id : uint, digest: bstr]

If we use a second tag for the reference table setup, this is unambiguous.

Alternatively, cbor-wg or cose-wg could define tags for common digest algorithms.

>
> I’m also not sure that a context-reference always is null, maybe the context supplies alternate tables…

If that is the case, I suspect a context-reference should have its own tag as well.

>
> (I’m always a little put off by optional array elements in a sequence, that gets into actual parsing quickly, but this one here may be OK.)
>
>>> Apparently, in all cases it would be good to have a single data structure shape pre-defined for pre-populating the tables (“dictionary”).
>>
>> I can see two possibilities here:
>>
>> 1) just use the existing structure:
>>
>> Packed-CBOR-Dictionary = [ ?reference, [*shared], [*prefix], [*suffix]]
>
> Probably.
> Should that get a tag?

I don’t think it needs one, but feel free to convince me otherwise. Its use should always be explicit since it’s always known by a compressor or decompressor. It should always be in a map of reference/table pairs.

Best Regards,
Brendan
IMPORTANT NOTICE: The contents of this email and any attachments are confidential and may also be privileged. If you are not the intended recipient, please notify the sender immediately and do not disclose the contents to any other person, use it for any purpose, or store or copy the information in any medium. Thank you.