[Cbor] Re: draft-ietf-cbor-serialization update

Anders Rundgren <anders.rundgren.net@gmail.com> Sat, 06 December 2025 03:57 UTC

Return-Path: <anders.rundgren.net@gmail.com>
X-Original-To: cbor@mail2.ietf.org
Delivered-To: cbor@mail2.ietf.org
Received: from localhost (localhost [127.0.0.1]) by mail2.ietf.org (Postfix) with ESMTP id D80DE96524BE for <cbor@mail2.ietf.org>; Fri, 5 Dec 2025 19:57:54 -0800 (PST)
X-Virus-Scanned: amavisd-new at ietf.org
X-Spam-Flag: NO
X-Spam-Score: -2.099
X-Spam-Level:
X-Spam-Status: No, score=-2.099 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, SPF_HELO_NONE=0.001, SPF_PASS=-0.001] autolearn=ham autolearn_force=no
Authentication-Results: mail2.ietf.org (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com
Received: from mail2.ietf.org ([166.84.6.31]) by localhost (mail2.ietf.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id jqGmI0VsPZrj for <cbor@mail2.ietf.org>; Fri, 5 Dec 2025 19:57:54 -0800 (PST)
Received: from mail-wm1-x329.google.com (mail-wm1-x329.google.com [IPv6:2a00:1450:4864:20::329]) (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 mail2.ietf.org (Postfix) with ESMTPS id 60C4596524B9 for <cbor@ietf.org>; Fri, 5 Dec 2025 19:57:54 -0800 (PST)
Received: by mail-wm1-x329.google.com with SMTP id 5b1f17b1804b1-477770019e4so27510715e9.3 for <cbor@ietf.org>; Fri, 05 Dec 2025 19:57:54 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1764993473; x=1765598273; darn=ietf.org; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=o5qcvfQdvoUKGrY8DEg3anDWm3SNN6xUkiThgsZ0hnM=; b=BCWD37KLEFi/QtJ8nyRRADpSKmKzOQJOaEQc2pYSYEaQbcJkS0mTVwucDkZDCVlAp4 Pe+e+Ip3eG+w9QZQn9Q1BBPu+E1C3jyNwpIe3MkclqAX4iVFuKMnxzJx9IKNO/mWyqpx 0l3l7mhB7swjD+xE3A2lrtOjzzUjAqxF6KtrxYZ7JvZNjIADpAiwihWeRhecxna5W7fG J9s1ASnNQd1WDTCjxCm7A7vDh2UJugJbpkiZqvb4DwhZ7wKejXlvtbaxbcqKKzTkQFNk KqMMtiJD1ODoCHsB+VCHHXE2n7wozEQT7vCC+fWRynHkTtuLFBlj9xrpZK0Ie1ZuAOIs GMqg==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1764993473; x=1765598273; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :x-gm-gg:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=o5qcvfQdvoUKGrY8DEg3anDWm3SNN6xUkiThgsZ0hnM=; b=FE9moIIwLFAlZSaFAKs7P7n/uaN8ECnfG8Z+mBbQWJgliDSmhIB7RNTGGcy4khXYIu z5dDNDiIIJOIIpJ3Okh/XEUwHEpaqzen+RAI1CP/fp9NTtxT6ERnAqrE8DhIOP3BPhvO WWTifAdK9FsBZiKzeQBCBoM/n8eOkRed7ALRuElj9Ud1tnjBUnOFtoZQQzcvPzoVgt/x V+sRs4ZHWirdqL+BDYOAZQ82VJ4BmYkSB584D+2omWsacdbivIFcwl5HNbBtDVPRi93D ckLTWsb1OliarxPsCIB5hIvpHFzCSBMH/MvN9HxHEsq2M0ZpDN6/ODe1Z07h0pr11SUO /1bg==
X-Gm-Message-State: AOJu0YxI1y4HkkE/GvKrruGC8LxAN0lprQSLPVg0TSwF9cHKoWFcIui6 F/L3gCRHUgHODCAjo4DX8Zu17/Z3FF7X4fpwEk6pIDRZr0isAoi+Qa73
X-Gm-Gg: ASbGnctHjVaS1Hz09zdnyEpzzC+DeiDZ83Umb82Ri3k5KwOFtSHlKEpxZUCwZjOdchi Bdg6tpnsysZCyy411wxP2YtIO2OCpNTTGf9pAe4EjZQKdIkv49iSyPmLrSwV+bhsEtx9MgcUiUy wd9XYqwzmLDBkSCH7Oxu5UoHMAaCGX7ULb9rgWiTOp6qoZNEefv3E8EehNCJS69L4tz4/ULCH+w yB0s1yoqxAj56raz51GtGYsdhwqagz8pLCtwik4d+PJd4DDmbpWPiiErSgm35MraHDqhE1ZbntO Aad0OR30ZZieulH1l+t10gbVhd92e8xUSEgfq0/UeP2GBigqiZ+6q0/wRrfytFFr6Tx+Kfz0Ljj 0cochxI3G5Xf6BOWffhyAc0DF+mDWm+In38OfCp+ALJuZuot+okeXPyVku97l0zRxnS9SGPrW31 xgHL3nkL6UWuWvLqrCdPbQvxhOy2dg+SJnx3dgrWi3F5xVrv7ny38pHJM9UySNAgynH3V5liOxy 7qGLJ+35qFTaXbE7jI=
X-Google-Smtp-Source: AGHT+IFhVqrUPN9vH15oSWpyL3d2qc985dj9iBzeHZUUX5VqQF6dS1wQPWryh2RR7l+M6urUeNHD1Q==
X-Received: by 2002:a05:600c:c4ac:b0:475:e09c:960e with SMTP id 5b1f17b1804b1-47939e48f56mr11645625e9.32.1764993473139; Fri, 05 Dec 2025 19:57:53 -0800 (PST)
Received: from ?IPV6:2a01:e0a:e1b:64b0:b0ad:ef13:18d8:f036? ([2a01:e0a:e1b:64b0:b0ad:ef13:18d8:f036]) by smtp.googlemail.com with ESMTPSA id 5b1f17b1804b1-4792b157c3csm84287965e9.6.2025.12.05.19.57.51 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 05 Dec 2025 19:57:52 -0800 (PST)
Message-ID: <bb91b85f-b25f-4630-9a74-4df362891cd8@gmail.com>
Date: Sat, 06 Dec 2025 04:57:50 +0100
MIME-Version: 1.0
User-Agent: Mozilla Thunderbird
To: Vadim Goncharov <vadimnuclight@gmail.com>, Laurence Lundblade <lgl@island-resort.com>
References: <BEC29A66-3F64-4B03-9A8A-2C9B07B34815@island-resort.com> <20251206014546.62ea616e@nuclight.lan>
Content-Language: en-US
From: Anders Rundgren <anders.rundgren.net@gmail.com>
In-Reply-To: <20251206014546.62ea616e@nuclight.lan>
Content-Type: text/plain; charset="UTF-8"; format="flowed"
Content-Transfer-Encoding: 8bit
Message-ID-Hash: FLDSISEMZ4TSBP25FWPNU7XR6KXGKATN
X-Message-ID-Hash: FLDSISEMZ4TSBP25FWPNU7XR6KXGKATN
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
CC: CBOR <cbor@ietf.org>
X-Mailman-Version: 3.3.9rc6
Precedence: list
Subject: [Cbor] Re: draft-ietf-cbor-serialization update
List-Id: "Concise Binary Object Representation (CBOR)" <cbor.ietf.org>
Archived-At: <https://mailarchive.ietf.org/arch/msg/cbor/8zM3oXQRpzbWdmEraSjKCqdC13c>
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 2025-12-05 23:47, Vadim Goncharov wrote:
> On Fri, 5 Dec 2025 13:25:59 -0800
> Laurence Lundblade <lgl@island-resort.com> wrote:
> 
>> Here’s an update for draft-left-cbor-serialization [01]. The work remaining
>> is tracked in GitHub issues [issues].
>>
>> — The section on CDDL operators for serialization types is filled in. IANA
>> section too. This also captures the scope issues that Ken brought up (will
>> credit Ken in next revision; missed it for this one)
>>
>> — An appendix on byte-string wrapping is added to capture much of what we
>> clarified about them on the mailing list. It is not normative, so it is in
>> an appendix to keep the normative shortest and clearest
>>
>> — The deterministic encoding of tag 1, epoch dates, is clarified; thank you
>> Wolf and Carsten for comments
>>
>> — Add an appendix on checking decoders; thanks Rohan
>>
>> — Substantial clarification of NaN appendix; the objective is to capture
>> quite a lot of the last few years of discussion; thanks Anders for reviewing
> 
> Curious why "The original intent	
> 	   was for vendor-specific diagnostic information explaining why a
> 	   computation failed"
> 
> sentence was removed? Also, what about NaN bstr tag?

AFAIK, non-trivial NaNs depend on FP hardware, OS, and are not standardized.

Returning a non-trivial NaN as a result of a failed FP operation is therefore not very attractive for software platforms.

One could imagine math libraries providing additional information.  However, the established methods either return a custom error code or throw an equally custom exception.

There are also thorny threading issues for maintaining additional information.


Unfortunately, decoders MUST still recognize non-trivial NaNs and do something with them.  In the CBOR::Core cross-platform specification, this action is standardized, including an option to support 1+52 bit non-trivial NaNs at the application level (without needing any additional object or special serialization methods).

Anders

> 
>> — Add paragraph that says map sorting for determinism is NOT for the
>> application layer; thanks Vadim and Carsten
>>
>> LL
>>
>> [01] https://www.ietf.org/archive/id/draft-ietf-cbor-serialization-01.html
>> [issues] https://github.com/cbor-wg/draft-ietf-cbor-serialization/issues
> 
>