[Cbor] Re: Need for preferred and CDE (was Re: Soliciting unresolved points around dCBOR)

"lgl island-resort.com" <lgl@island-resort.com> Wed, 24 July 2024 01:21 UTC

Return-Path: <lgl@island-resort.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 39DBEC14F5EE for <cbor@ietfa.amsl.com>; Tue, 23 Jul 2024 18:21:14 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.908
X-Spam-Level:
X-Spam-Status: No, score=-1.908 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, RCVD_IN_MSPIKE_H2=-0.001, RCVD_IN_ZEN_BLOCKED_OPENDNS=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01, URIBL_BLOCKED=0.001, URIBL_DBL_BLOCKED_OPENDNS=0.001, URIBL_ZEN_BLOCKED_OPENDNS=0.001] autolearn=ham autolearn_force=no
Received: from mail.ietf.org ([50.223.129.194]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id VqY9gyyepD-3 for <cbor@ietfa.amsl.com>; Tue, 23 Jul 2024 18:21:10 -0700 (PDT)
Received: from NAM10-BN7-obe.outbound.protection.outlook.com (mail-bn7nam10on2112.outbound.protection.outlook.com [40.107.92.112]) (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 66302C14F6E1 for <cbor@ietf.org>; Tue, 23 Jul 2024 18:21:10 -0700 (PDT)
ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=Pfn2QkccyxuZewtRwbGsOre7Jiyip7YGZC8wr1KKgtihGhyJ7LD0wRz5NP0DzdoSFtpUUotliIqVI6ZMY2gAn6jR6P4x4IkKh6lL4JKUodThGQ7guyjhP7aMf67Kq4+13fgNBIXOLd3H6wHGhfJvH9nh6nBmgRtyeSMflWXHMos0HdzCeuguXstmhVWN/6qiJiSGOAmytN/ee76lavW6k8i4ZHpuwRoeEp0uaHnTgdQwm9gaOTEZxlRu53Ly/hli7PTdn192hW9OqMLBCPRjMh+QLZoJBT+CwcE70bK/FVZQNzJGYTMFoN5/aH9etTdRuK0erBKK1yMjg5uFEptHdw==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; 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=qe7fUdnZxKSB0x2+1TDGZbSQOf6Vpwu75h6FZ/PkwZ0=; b=AlpTPKn6sO0CLsqAs3ZHKZORKmcA4OW7lXPf3fP1AVcdYGndz1S7sy/zmqwIUH73+gkyMjH20zwLv61KkZ2gXm4yUZwzHMC/YpTv4LsFrAP86Mo5/yYcRh4ZG1/C/x1QO7Aj6slil257+dxCLtmv3HyXyPzJVH/m7RwQYiCa2h8XS2jbe90zcJ2Rq2gc9G1nZ3AY0F2dA3aPp1Q1rp7MejN5KGegjlvdkquApdeUAwgYCpQBl3Sly+okXayOc5bcg7b5+lJdeE1vd7zo382aGW5WjPicMn9jNsl/u3nNFLiO5PmTytrUWQlXqP0JyAAmzjxFpkBtzy69rlsp69tGQg==
ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=island-resort.com; dmarc=pass action=none header.from=island-resort.com; dkim=pass header.d=island-resort.com; arc=none
Received: from PH7PR22MB3092.namprd22.prod.outlook.com (2603:10b6:510:13b::8) by PH7PR22MB3092.namprd22.prod.outlook.com (2603:10b6:510:13b::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7784.19; Wed, 24 Jul 2024 01:21:07 +0000
Received: from PH7PR22MB3092.namprd22.prod.outlook.com ([fe80::8515:3aa6:3ced:15e]) by PH7PR22MB3092.namprd22.prod.outlook.com ([fe80::8515:3aa6:3ced:15e%5]) with mapi id 15.20.7784.017; Wed, 24 Jul 2024 01:21:06 +0000
From: "lgl island-resort.com" <lgl@island-resort.com>
To: Carsten Bormann <cabo@tzi.org>
Thread-Topic: [Cbor] Need for preferred and CDE (was Re: Soliciting unresolved points around dCBOR)
Thread-Index: AQHa3ITw+aRIig4i4E2ztXVlMrw1ZLIFFm0A
Date: Wed, 24 Jul 2024 01:21:06 +0000
Message-ID: <7D17A818-2BAD-4F04-AE36-FD20CDDAC3A5@island-resort.com>
References: <Zm7eekcpgBmJQ5jv@hephaistos.amsuess.com> <ZnAlntTjsdqobA7h@hephaistos.amsuess.com> <4d79d89c-6610-438b-a439-443fc5414981@gmail.com> <682980AF-DB09-44D6-BB2D-9951361F24C0@wolfmcnally.com> <54a05fae-7d53-4c05-8bc7-d3d9e945d281@gmail.com> <E85B2536-417C-4F36-873C-9E61B8FED050@wolfmcnally.com> <022aadba-6748-43c8-be04-f0b5733e5abd@gmail.com> <191F05B0-F526-4E56-8F09-2A2A03600ABA@wolfmcnally.com> <fd6a65e6-43d2-4420-afdb-b6d8d6338eb1@gmail.com> <0163FE90-8A12-4A92-B8DC-0A4BF499BE87@tzi.org> <ADFD59D9-4961-4264-85B6-28ABD349858A@wolfmcnally.com> <225EA9D4-29BD-4179-A6D3-140A14D57874@tzi.org> <8C07A2E5-1A0D-4C91-9387-FC6E65394C77@island-resort.com> <A4144A83-406E-448C-B435-DAABC0D074D4@tzi.org> <CCEBF107-B91F-44AB-9863-0E85F5BC5D96@island-resort.com> <7B58833A-9530-4D68-846D-4FD9A106CE48@island-resort.com> <322FC798-B6FB-479D-9A35-E27FB19D5467@tzi.org> <69140636-E81D-4484-982E-6FA86ABED4C2@island-resort.com> <39A48DBF-4E75-449D-98A2-2981205E9B56@tzi.org> <89C883B0-1709-4348-B6DE-90BDEE4D4E3C@island-resort.com> <D2C13E54-85C8-4AB7-9B7E-91749671A63E@tzi.org>
In-Reply-To: <D2C13E54-85C8-4AB7-9B7E-91749671A63E@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=island-resort.com;
x-ms-publictraffictype: Email
x-ms-traffictypediagnostic: PH7PR22MB3092:EE_
x-ms-office365-filtering-correlation-id: 20371f1e-e551-4fcc-9958-08dcab7ee481
x-ms-exchange-senderadcheck: 1
x-ms-exchange-antispam-relay: 0
x-microsoft-antispam: BCL:0;ARA:13230040|376014|1800799024|366016|38070700018;
x-microsoft-antispam-message-info: urx+Q3Aw9UW6aTThiaBtVh/BZaKRhZkXMj7qbpMnyNgqMrQGKvu7kraQeOKQib8YL0fbDJqKyQUzfxJdauXizxC8Y0zcMnjogDwmlUVdm+OaAAnT6j1JNP4O2jArIdOb8fm0SoKaAQwWWuD3yqSHCuUwavrAFDyqO+t1850WSvjCf02zo+LSfcWv4sIjtMqSvtLCxpPyl+QBV6GPQrv4XAhQ0dIIFYoOoCk/0b30yjDY1fTqk9GWab18+u0PFElfRr0fUjIXaM9qnnhD0iLktbl0G0rQEF8y30D6A2T997oBYB+pWkAVwdUQs/owZGRdNatrJdp/KPlLePLWlO3FOvsZlPH7ji8OaQFVLL23nzvgS40J2QAdxJISnP/ryOUNikgybzH0XNHmU5ZJNi1ST+iUriV/GDFn8uF4PpKiULtMhG/7VsWNk9L+RV007MnG4jzdxqGt3sBhcju1FUJSXsQvYdcW2Ri+VvmqAOLEz8ZEXZV4hxANnf0WOu8U9RVNrmWcMXArBFAQKkQIsodyuJ3pJWHrcSgeXhkKK0Uw8XHeLtmnmKWbKa3nBkOQJTmT4ovUR/Gn/nC070BdM+6lR/WKNgUf/IPjLxJCrWCD/s97IN8r07eT0D4JzL6rKUsIgt0/D6InObTOTEtrrR5O6r7MR9oPZ5W7SD2VsOqxyUHwAPl9Dp+Kh3CYgD1Ol+65TURvLSE6fFH368IxPOR3MEowxL36dTLpQG7aCm9B47+YakATDGQIBgcK8n/7Sas8//zwlPOCbkBOjtjc/JKp2lK8bYF6bZ1gCPzllYMtK393/lIqNB0UAOIyVGLObE0mlbYABHvtAuKoCnbEI20Ge4j9WbVLRKL+fLqLZAS2jkdTBLpmoRCunmAhrr9/rcoeEe7VIiHPwpEXivi7oTqZO/xUCThpDF8V/0oMcrlxYM3k+/Vml88Jrbz9mwQ+90+Z/ejmrz8Viqr8pFs1yQZZ6gwZ3zQYCEk+Dly42dQrtCYOHdgH54XZgTbE/z4fMgjpJfD+MvRHpr79SOmm0wXa1XkjCZHuUPJldtkZO/eJjvsnFQTgfyxy1UOHmh6j9eepd/P1Si290AgnW4phm2mmzgT/XyobqsJrHTikcgm1TdX+02eSqJoWtg6RIM33TpgK+wcrovvOdIQKE9JXiyRdzBI+jOjiFZCnazC9fddbryO+KUsynrONWsLWoPKmOnrVzT/aYqZBKcGelxAHJSDdUYrrWbFBpqnwphUf55j3S+2Z+xKyitIYGU61YRVkOgnaV1oY1tRRhOnd9GTHOBhy7vYoaZrLyawWIBMudNPZQlg98ugXrZ8zZlbgUgO7CbIY8O4MyhVuyGb6i/IczDhP3sQ9TXI/e3zZng7e4ECHzexd51kKQ+wRHMQoBeXOCPtDHyKfIJXjOP9FpHHUzVU3NA==
x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:PH7PR22MB3092.namprd22.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230040)(376014)(1800799024)(366016)(38070700018);DIR:OUT;SFP:1102;
x-ms-exchange-antispam-messagedata-chunkcount: 1
x-ms-exchange-antispam-messagedata-0: c55Sh3q3iA/rvtOdh84wVCcDGnPtkFfJb3x0ckSBNsdhk/UgKKaVTY2VBw80ySGWJwml1Uo7LCOr9BL//gIZGZ0wyVz8VO/awQS7HxG6rpLE4Nl0pA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eWodtf4m+GfxJr5o2wAdcQDhVoLEI9nyWN32OTW6bhdJgn1ukpFLWG8yIFRSEoYi/VHh1yRI8cQG+8/aZJ7hNx4cfhofyhOMLdOjoKA8rTpfU/kMRwi5wpC7SgZj24r7S49O1zbgk41TJGauKlby9idQ9C42DLzqwkJqg2snRC16pUQ6i0UR96xts8phc6vtX4ySX05X3BpXztwAqV4BD++M8vGMcEy9tEwTnnXaWRYo9V61cqt1mmSljDcRYA4VHdPqxnCJ8gqkGoC2nNcoWoglUzBXntT4gT5NyuSVSowh8XHlVz5Z710tsLvVE1E/As2muCM6joHwtZbzoWQNzXKmWB8ZIbxCFZueWSXaPxnAFuat9iaHdJFbmJQXCVS5cwg18RnahpvsoO9JuzjMZw2G4nv3Z9kzQe8tRef2y5johUN6n6VSQ==
Content-Type: text/plain; charset="utf-8"
Content-ID: <9FCC40D6B4B411438566128478D1C094@namprd22.prod.outlook.com>
Content-Transfer-Encoding: base64
MIME-Version: 1.0
X-OriginatorOrg: island-resort.com
X-MS-Exchange-CrossTenant-AuthAs: Internal
X-MS-Exchange-CrossTenant-AuthSource: PH7PR22MB3092.namprd22.prod.outlook.com
X-MS-Exchange-CrossTenant-Network-Message-Id: 20371f1e-e551-4fcc-9958-08dcab7ee481
X-MS-Exchange-CrossTenant-originalarrivaltime: 24 Jul 2024 01:21:06.7404 (UTC)
X-MS-Exchange-CrossTenant-fromentityheader: Hosted
X-MS-Exchange-CrossTenant-id: ad4b5b91-a549-4435-8c42-a30bf94d14a8
X-MS-Exchange-CrossTenant-mailboxtype: HOSTED
X-MS-Exchange-CrossTenant-userprincipalname: m8HjJSG5INHLEwoauA5/6KrWKuCwyIvfapyDaCjxyPM0wZQo2e0tT9YBHUYscBNaV8XxKQIqRET86PKkotYhjw==
X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH7PR22MB3092
Message-ID-Hash: OPPNDZEVTH5JJTY732BMZP6KLF3ZFUAZ
X-Message-ID-Hash: OPPNDZEVTH5JJTY732BMZP6KLF3ZFUAZ
X-MailFrom: lgl@island-resort.com
X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-cbor.ietf.org-0; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header
CC: CBOR <cbor@ietf.org>
X-Mailman-Version: 3.3.9rc4
Precedence: list
Subject: [Cbor] Re: Need for preferred and CDE (was Re: Soliciting unresolved points around dCBOR)
List-Id: "Concise Binary Object Representation (CBOR)" <cbor.ietf.org>
Archived-At: <https://mailarchive.ietf.org/arch/msg/cbor/BcY14l4VoICEWTiUxkgmlp0EY28>
List-Archive: <https://mailarchive.ietf.org/arch/browse/cbor>
List-Help: <mailto:cbor-request@ietf.org?subject=help>
List-Owner: <mailto:cbor-owner@ietf.org>
List-Post: <mailto:cbor@ietf.org>
List-Subscribe: <mailto:cbor-join@ietf.org>
List-Unsubscribe: <mailto:cbor-leave@ietf.org>

> On Jul 22, 2024, at 3:17 PM, Carsten Bormann <cabo@tzi.org> wrote:
> 
> On 22. Jul 2024, at 22:48, lgl island-resort.com <lgl@island-resort.com> wrote:
>> 
>> This is just not true of CBOR, CWT, COSE, SUIT, TEEP, SenML and probably other CBOR-based protocols. They don’t provide guaranteed interoperability because of allowed serialization variability.
> 
> I don’t follow.  If you implement CBOR, you will be fully interoperable.

Right.

But, implementing all of an RFC kind of never happens. Seems this is a rarely a problem because of the nature of what’s implemented or not implemented. It’s obvious to sender and receiver implementors that you don’t need to COSE Encryption if the use case only needs signing.

I think two things are different here:
- The serialization variants do exactly the same thing so there’s not an obvious cue as to which to implement or not
- CBOR is at the bottom of a protocol stack and upper layers are affected by what’s implemented or not

Also, perhaps I have a bit of bias in my thinking from work in the FIDO Alliance where the spec was for an end product that went through functional testing for certification.

> You are talking about shortcuts (leaving out parts of the spec to reduce code size in a constrained environment or to improve performance in a high-performance environment).  
> We don’t have a system that can just be used by an application protocol to enable recipients to do these in a reliable way (as always, senders can easily restrict themselves to what they want).
> 
> The text in draft-ietf-core-href I cited is one attempt to restrict the sender in order to enable simpler recipient implementations.
> Let’s try to find a few combinations of these that we are comfortable with.
> Preferred + definite appears to be popular.

Right. A few messages back it became clear that preferred serialization isn’t it because the RFC 8949 wording allows indefinite lengths (when you read carefully). Those things I said about the nice layering of CDE on preferred serialization were wrong.

Maybe this?  https://datatracker.ietf.org/doc/draft-lundblade-cbor-cie/ 

Note the wording in this draft assumes only parts of CBOR will be implemented. For example, “if arrays are to be encoded, they must use definite lengths."

> Adding indefinite arrays/maps appears to be an easy step for most and can enable streaming if there are no large strings in the application protocol.
> Adding indefinite strings is a bit further.

From what I know I would assume that streaming protocols are rare enough that we don’t need something for them. Also, once there is a base, then variants can be described in relation to it on a per protocol basis.

> Anything else/in between?

There’s not much in between.

LL