[Cbor] Re: I-D Action: draft-mcnally-deterministic-cbor-10.html

"lgl island-resort.com" <lgl@island-resort.com> Sun, 16 June 2024 17:57 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 CBF49C14F6E1 for <cbor@ietfa.amsl.com>; Sun, 16 Jun 2024 10:57:33 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -6.91
X-Spam-Level:
X-Spam-Status: No, score=-6.91 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_HI=-5, RCVD_IN_MSPIKE_H2=-0.001, RCVD_IN_ZEN_BLOCKED_OPENDNS=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01] 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 HKOLlmU9mh-M for <cbor@ietfa.amsl.com>; Sun, 16 Jun 2024 10:57:33 -0700 (PDT)
Received: from NAM12-MW2-obe.outbound.protection.outlook.com (mail-mw2nam12on2128.outbound.protection.outlook.com [40.107.244.128]) (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 1B45DC14F6A1 for <cbor@ietf.org>; Sun, 16 Jun 2024 10:57:32 -0700 (PDT)
ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ecfOSHENhgB3DZV0IjzcCaX4m+SqHBtqAPhK2lH1l1C6NICmqzL4YefO3ulK8WpzDNZ7N9ex85le9KmSIFHkVyT7KCNgNiEUmT2ml99Fsew5lBCcOM09JljeTsgtbhdN5fwVPepzR7jhlZEpEDDBnbZm4bRZtHpLmrYfTBbLlPQUIgdGuzQkR6KgGGFg5FsxCUrGmzjcbUSuLEXro66zeRQGcZaBIdM6Q2hNhg9VoNJYH9Bu0HfcynJCCoRgq7WnnN9BOyq4Lx3qb7pyxxW5gCgMtE1Ycrt1jj4CyIAc52Zyb/Rp71o4qCWOdVChUtIs6HkBO2iMWQlgEBYAIARtaw==
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=o2wCpXSV/4broyxz9eBGPVcGiLOOOML2DvTbrS2WW9o=; b=ocHyCKtsTMWboMTXLhabhjx0j1w94i2do2lN8ZrtrXqHw36xUqs6ftutS362EOQt44eanC9Se8b5CbjkqgKWMhq+6gb4S3USKJnbdgdECHqEgt1p/wt8fdFR3Dto0Kb8kvyh2gt+wKbxQphPrK5Yg+UGjrUBE1OE7Yf53Z6uznCkmWohO1O8NdPqYINQjtHpufcrn7qQlcxmL4ExyLHBxHgnJA1nQiBiaIBGI64bkj39cd7KIfJd2p7NKGsjsV3xfwdaQrz0PZCz/Q3V8+M0z4t0BwUm9uSUBkQAi6rlofDFakatf8aF9m7+4wLdJeltQfodUZMOFa3TSHLsu9fvfw==
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 LV8PR22MB5339.namprd22.prod.outlook.com (2603:10b6:408:1c3::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7677.29; Sun, 16 Jun 2024 17:57:30 +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.7677.029; Sun, 16 Jun 2024 17:57:29 +0000
From: "lgl island-resort.com" <lgl@island-resort.com>
To: Anders Rundgren <anders.rundgren.net@gmail.com>
Thread-Topic: [Cbor] I-D Action: draft-mcnally-deterministic-cbor-10.html
Thread-Index: AQHawBan4JkLdwXVTkGC0cCFFg5cDQ==
Date: Sun, 16 Jun 2024 17:57:29 +0000
Message-ID: <F3E4450A-EA4B-437E-9C58-5DB3972A152C@island-resort.com>
References: <a962e326-ab3f-4857-a1ee-2042cf87f32a@gmail.com>
In-Reply-To: <a962e326-ab3f-4857-a1ee-2042cf87f32a@gmail.com>
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_|LV8PR22MB5339:EE_
x-ms-office365-filtering-correlation-id: d0baffe4-0ebb-4350-3cc9-08dc8e2dca2a
x-ms-exchange-senderadcheck: 1
x-ms-exchange-antispam-relay: 0
x-microsoft-antispam: BCL:0;ARA:13230037|366013|376011|1800799021|38070700015;
x-microsoft-antispam-message-info: B6HDRU/m22hY9B/MprF4CVeqk4sui5K4oq58zF0V7DBCHHOXIQnGjFqvHWfSEr9V08B8VTcKzONDaON/1QKaI6R7ZkVZSLq7wLZyLICq1seU7GPWvxiTwGRPOr53dZrCB8N0+WjS3VQNqiQBU/7hwZO9mdW2hrxjTfs2gxv2dhmMQWmXmqT/Kd1bkQf/dWvvWO6GRoQU3JkPkMgeLJWernjHe4OgwcD1qmZA7hz0hHwIxok4FneXDZQ+LMfyJJs9n5r5twsbw8Z3VtEPBzfzbCkboTHRLZ6dGkEV+7rJRaKgP0rL1xePmZDwCqvxkYs4FiydUmzvAdK0JYeieNAtYgr1TbveOqGX6kyjSziQ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V:NSPM;H:PH7PR22MB3092.namprd22.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230037)(366013)(376011)(1800799021)(38070700015);DIR:OUT;SFP:1102;
x-ms-exchange-antispam-messagedata-chunkcount: 1
x-ms-exchange-antispam-messagedata-0: vbaiYFYtDsaRFRLzX+VuMCkgWm6dn08Me8HJNWxzWolyb9tfLk3wjXMMaCiE982mbzY7sxn64ieN+Fb+DbJSt+gKIIuzYyZjbPAhMwrISesNOfZhOlahvbZEMNjQV8Q714gqVYRko12XtXKNKftOfKKB2ymwA0RqJ3K+Y1PoNADQN0nTgtLHLuD5dyizRIgoy6iiPQH9yimv5CdHoZCElfM1IvgaZCGYw0wJnxayBrTBDq6uFKGgPUsx/9qjUudmuTfpvOZrULI8IxE2fpMbVbaWXZeglMHSjQMo4VHS5i/UoJmnqbAQcfKQ4rZlDIGux18eEfoVxOmgDPkckZb3mRm+NjyWEBYDyUo0nj7kVdqPW8nAdykpUIdJg0UmXfYdUusmoa3CuBBMbNKxXkT6a+nKeGvz3QvDBQrtOLEYVvcMbqC3TcoMcOCksYpwjdCKQtZAgvTlI9cRL1NCXxJw8+0tWOl4UXXJVgrScCh6yoG4n2P6tGzHzqStprDkF+QMbolh+hWDZ8jzBUEn7WfJ3O3WCiTRkU1XPSCco7gGuGF1y3BzUpRZ4/fnYFuu59BaVWMFL+JW4l65D403HupT0RjfZRMLzPNmAU9pNo+q0Dlwt4sQdcbaQmtjP2dfFusQNFCvz7nJLkqFQIJiVxuTN4O3PseHRXX+uyBS+cwdxvT3YKQIUQj1+t6Ncn0tG14YoDA7jZ2zrd520OG3brR3kGGrC2NXc0qst45Rc1JkHNGtN5ko3zZR9GY7Pgbawt5Goxc/pqe4St1b7Ne0EfeOtXLJOIAuQkwkLKofIjumd9EIhDA+z6c/ze1GFfNTw+rUh8zkJ9/93bHryODOd1AZyVvrfKTFdzv3SOtVw8IEAebdRcQacHZ8GniRJgAIEUA5uqgmA5Ba6SA/wKJXtsv3/L+Ua2WeR0/SGAljaUIyI6/9UKGin92m0+E3vEuHgVnDgtXNtKPhBhf3beUkwsiCPvs0FfLHTy8kaiWoOLwU/qT6nvZhhwFYKgWflafzA85FjPnXJZQFWKBwZf8gic+XYIzypbrOuMhktbtGuuAzsQSLnbTUvy1Ezb09LbyYUwhfxIzptiyIbfj4MSf5ik35bnSX5gKaroxx1G6kxATmmn/bHSDoqfGjc23GF77U66d0YY3cDN1YIRpt/bOMKXs/NNCcQs2txabh1xGAnAb+XxVCsTpW2kFW1EcjFw3T6kiHX+8B06IF1MNnqRoLFXWp7ZgOGlxJE1G5JlwnlmGh4qxRvXPVY/V8PXL+sD8+/B3StQ45tuWHoOJRiWw/yRhMzWjdtvO66TH/eq6UpktT+lyPUpvvu0Rc5eLfhMO30Wfah25aQjk4of5OuyICTT4f+bt0gFwpf2S65+GRpfOptumDz+Q/D2bfVVo08+ovZwFSC/S+iHnVnsvTCE5EfDwc20RJ949hsLxZbGYGbBQopM02wY6k8BsdQ7/jcVEZqoPs5+KvPZy4GYrPDVtU8lR97MrXigSbEB4evSY5R2+oirognndNQX9/9nemOxA0BDs8P53QXJfEJJ5HO+fRImwI/gQZuIA+vea5sZU8tN74vX5J5nkB6u+jiKxg/jR7hVuijBgWum+jM1kd8pcqRiRMGQ==
Content-Type: multipart/alternative; boundary="_000_F3E4450AEA4B437E9C585DB3972A152Cislandresortcom_"
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: d0baffe4-0ebb-4350-3cc9-08dc8e2dca2a
X-MS-Exchange-CrossTenant-originalarrivaltime: 16 Jun 2024 17:57:29.5626 (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: Ak87KoVBpqy8ufgSfbdRPQf3RU0CuDkkNiPkZH9otCZ6df/yVPcMqfglE37YqELb55hu8nD++GxIWdb43cC42g==
X-MS-Exchange-Transport-CrossTenantHeadersStamped: LV8PR22MB5339
Message-ID-Hash: OBARRRKHVLRMTFIYPLCODIOUDACT33MP
X-Message-ID-Hash: OBARRRKHVLRMTFIYPLCODIOUDACT33MP
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@ietf.org" <cbor@ietf.org>
X-Mailman-Version: 3.3.9rc4
Precedence: list
Subject: [Cbor] Re: I-D Action: draft-mcnally-deterministic-cbor-10.html
List-Id: "Concise Binary Object Representation (CBOR)" <cbor.ietf.org>
Archived-At: <https://mailarchive.ietf.org/arch/msg/cbor/fm-m_tPTvbrqy2hlOyxKnIlkyJ8>
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 Jun 16, 2024, at 7:50 AM, Anders Rundgren <anders.rundgren.net@gmail.com> wrote:

2.3 Numeric Reduction
   To provide deterministic encoding in platforms that do not separate integer
   and floating point values (like JavaScript), numbers must be canonicalized.
   Numeric reduction ensures that semantically equal numeric values (e.g. 2 and 2.0)
   are encoded into identical byte streams (e.g. 0x02) by encoding "Integral floating point values"
   (floating point values with a zero fractional part) as integers when possible.

Since this is the essence of dCBOR, I would drop all other parts of dCBOR, since similar restrictions and limitations can be found in just about any other CBOR-using application as well.

There’s only two other things:

1) requirement to validate (the requirement to validate dCBOR implies validation of CDE which implies the requirement to reject dup map keys).

2) restriction of simple types to true, false and null

Agreed that the numeric reduction is the center of dCBOR, but I don’t mind that these other things are part of it too.

If some protocol wants dCBOR numeric reduction plus the simple value undefined, they can just say so in a specification and it will be OK. Seems like the main problem is that they won’t be able to use the “.dcbor” CDDL control.

That kind of begs the question whether there should be a separate CDDL control  “.float-num_reduce” so someone can say all they want is dCBOR floating point number reduction in CDDL.

LL