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

Anders Rundgren <anders.rundgren.net@gmail.com> Mon, 29 July 2024 05:47 UTC

Return-Path: <anders.rundgren.net@gmail.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 4AF74C14F6F7 for <cbor@ietfa.amsl.com>; Sun, 28 Jul 2024 22:47:42 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.108
X-Spam-Level:
X-Spam-Status: No, score=-2.108 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_ZEN_BLOCKED_OPENDNS=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com
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 Q-DRT0ysG9q0 for <cbor@ietfa.amsl.com>; Sun, 28 Jul 2024 22:47:41 -0700 (PDT)
Received: from mail-wm1-x32e.google.com (mail-wm1-x32e.google.com [IPv6:2a00:1450:4864:20::32e]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature ECDSA (P-256) server-digest SHA256) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id B5153C14F5F1 for <cbor@ietf.org>; Sun, 28 Jul 2024 22:47:41 -0700 (PDT)
Received: by mail-wm1-x32e.google.com with SMTP id 5b1f17b1804b1-4280ee5f1e3so13278685e9.0 for <cbor@ietf.org>; Sun, 28 Jul 2024 22:47:41 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1722232059; x=1722836859; darn=ietf.org; h=content-transfer-encoding:in-reply-to:content-language:references :to:subject:from:user-agent:mime-version:date:message-id:from:to:cc :subject:date:message-id:reply-to; bh=D8A6RPOi4wX8tVUBKAtOg/oXroGL5mbb1cmJVbHSwVY=; b=i6LhHZ0DclQaEtNv8uq0FpsEDf+dYUaWKJPVEGE8ue7bLaTE6/8+3dlfKsxCZ9fdhH IvDPSaUa0SnRNWskyG51qMcaUvqvnXfi70KNDdsD42R5SOwuCOpSQLmVpH+3Vmzgy/Iw syu8/Q5SqJvWCW1E38OJcDGRMfaOz8CCJgX+fUim+5kWd8bsE+o1I0XauEmzv1e8EgVe 6+01dTy+7PII3UFLbiIRwYTveYDymyce01Ic3yi1v16NZNpkqBW760xziF7lDN737JEn Pd48k8u8Y/xtxx4ktqUliKLRJDPYEy6JX+vsbkYto70uRD0UQtGfow5meHxOEV7WCIPZ dDfA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1722232059; x=1722836859; h=content-transfer-encoding:in-reply-to:content-language:references :to:subject:from:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=D8A6RPOi4wX8tVUBKAtOg/oXroGL5mbb1cmJVbHSwVY=; b=j0MP4p0vHTHini6kUlh5cfu7TPEGDB9PpcwIoBojVk3udw5BrkbSi9nymNqeUvGYMP JMCazf3YsnDAJlKtn1Cs16sc+Zxg4/rYftE7M9GfW3NBKV/BiCaDOOo5ijenGiInuIjx 8Dorw5nADQrLN+S9fN3063fxD4HRS1OBVzaVaeKTOgpe5BMNBzxFb6C2qbm5dv8MYWgy kIFrxnkb7TuaGqWPfoFanNp1LZYYkd5gP1NwrGZNCZTubllxHvyd6c4+t5Crz2qwgVlz 4h1l8DtWIWf8Ho7nD4i8KSTgXraIrwZLEH955QyuBXpVEk31OGvlz3vsy/K1DpLjHkaS lb+Q==
X-Gm-Message-State: AOJu0YxsOPtt2ycia4H+undr56t4vjTeSfIFh/UZZBaDX+OSJ5eMuwA0 dVvrw+PwLDd6GoX6Gi6Ccl2wxtBRubUJpftnN7sN2X4C5zcqal6DfNc82A==
X-Google-Smtp-Source: AGHT+IEdFn1qBoS8ciTG0k3Q696DfQ9+qV71p7xPIpJiK6DlTQuTGX81W8mkX9pGS+qy9NW0BemV0g==
X-Received: by 2002:a5d:64ab:0:b0:369:f7f9:9ee with SMTP id ffacd0b85a97d-36b5ceceeffmr5939649f8f.6.1722232059249; Sun, 28 Jul 2024 22:47:39 -0700 (PDT)
Received: from ?IPV6:2a01:e0a:e1b:64b0:70e0:e69e:21d2:66ca? ([2a01:e0a:e1b:64b0:70e0:e69e:21d2:66ca]) by smtp.googlemail.com with ESMTPSA id 5b1f17b1804b1-42805730d5bsm168959455e9.8.2024.07.28.22.47.38 for <cbor@ietf.org> (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 28 Jul 2024 22:47:38 -0700 (PDT)
Message-ID: <ea6a35e1-18a7-4bea-8ff8-5249e1f26b71@gmail.com>
Date: Mon, 29 Jul 2024 07:47:38 +0200
MIME-Version: 1.0
User-Agent: Mozilla Thunderbird
From: Anders Rundgren <anders.rundgren.net@gmail.com>
To: "cbor@ietf.org" <cbor@ietf.org>
References: <a962e326-ab3f-4857-a1ee-2042cf87f32a@gmail.com> <F3E4450A-EA4B-437E-9C58-5DB3972A152C@island-resort.com> <6601a16c-2b2e-45b2-b4e8-7bd4ba136401@gmail.com>
Content-Language: en-US
In-Reply-To: <6601a16c-2b2e-45b2-b4e8-7bd4ba136401@gmail.com>
Content-Type: text/plain; charset="UTF-8"; format="flowed"
Content-Transfer-Encoding: 7bit
Message-ID-Hash: 7NX572OZKD6UGGLINSQDQWSUFKN6O5PC
X-Message-ID-Hash: 7NX572OZKD6UGGLINSQDQWSUFKN6O5PC
X-MailFrom: anders.rundgren.net@gmail.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
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/q17cKXaLNWHqCrDWNrgbxpGYgb8>
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>

Hello WG,

You may think I'm repeating myself and to some extent I do.  However, this posting is about INTEROPERABILITY which is one of the pillars of standards.


Since dCBOR introduces a BREAKING change [1] with respect to its parent profile (CDE), I felt inclined commenting a bit on the actual draft.

IMO, a revised draft should be fitted with an *Interoperability Section*, giving potential application developers a "heads up" on what to expect: CDE and dCBOR are incompatible at the application level [2].

The primary source of the incompatibility is the reliance on numeric reduction.  According to the draft the integer value 2 and the floating point value 2.0 are "semantically equivalent".  This seems like a stretch since floating point numbers and integers have quite different characteristics with respect to math and value ranges, which also make them having pretty distinct use cases.  In addition, the draft alludes that numeric reduction better matches the requirements for deterministic representation of numbers.

Anders

1] Although the draft claims that dCBOR is not a "fork" since it maintains compatibility with CBOR [RFC 8949], the reality (the only thing that matters for application developers), is that the referenced decoder implementations [rightfully] reject 2.0 if encoded as CDE.  In the other direction, CDE-compliant decoder implementations and associated applications like https://github.com/cyberphone/CBOR.js/blob/main/test/xyz-decoder.js#L20 would equally rightfully balk at 2.0 encoded according to dCBOR.

2] Assuming that you don't move encoding rules up in the application layer, something only novice developers would ever consider.