[Cbor] Re: I-D Action: draft-mcnally-deterministic-cbor-10.html
Anders Rundgren <anders.rundgren.net@gmail.com> Mon, 17 June 2024 06:29 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 96613C14F726 for <cbor@ietfa.amsl.com>; Sun, 16 Jun 2024 23:29:42 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -7.106
X-Spam-Level:
X-Spam-Status: No, score=-7.106 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_HI=-5, RCVD_IN_ZEN_BLOCKED_OPENDNS=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01, URIBL_DBL_BLOCKED_OPENDNS=0.001, URIBL_ZEN_BLOCKED_OPENDNS=0.001] 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 k3NKV6Asqahv for <cbor@ietfa.amsl.com>; Sun, 16 Jun 2024 23:29:38 -0700 (PDT)
Received: from mail-lf1-x133.google.com (mail-lf1-x133.google.com [IPv6:2a00:1450:4864:20::133]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id AD12CC14F699 for <cbor@ietf.org>; Sun, 16 Jun 2024 23:29:38 -0700 (PDT)
Received: by mail-lf1-x133.google.com with SMTP id 2adb3069b0e04-52bc0a9cea4so3508748e87.0 for <cbor@ietf.org>; Sun, 16 Jun 2024 23:29:38 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1718605777; x=1719210577; darn=ietf.org; h=content-transfer-encoding:in-reply-to:from:content-language :references:to:subject:user-agent:mime-version:date:message-id:from :to:cc:subject:date:message-id:reply-to; bh=uaLN0rpxBu4WoGFnpWdd4VN/trTWI/U8klGob1k6fCg=; b=WBtH9tMMnQXYy425roxryZGKzpSHnmb4ZacINOrMMo5L/4H6EMnHb7twR6495G9/dN AcMNITk35XWsy4wBj6Rzuc24dHFdjfzhMdR6raqXtUF1wVtGxF6qpo5bHUj9sBtu6iF2 LMSKJ/p9JIhQLSGTz9Sq1NSdDgTVy2ip7rx84cj3nkWHSfZOBXSUPB6oVLEr+G6faW9D 2+rDwdcjXMWS9ZDoWei4r+NdsK4H1rKaLjuiKypOfAm+81ybcC6PBEeFRBQp6CUIc50n Vc8SXUCUoUsBSVmqm5wC6XDbVH8wBJZ09L98z8XQQeEiWqp6mWHPfkLHojuZjf+ONCED T5XA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1718605777; x=1719210577; h=content-transfer-encoding:in-reply-to:from:content-language :references:to:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=uaLN0rpxBu4WoGFnpWdd4VN/trTWI/U8klGob1k6fCg=; b=PbR6ea+mS2aNsQsqUTuahHZuA3vUybCIz193B/Jgkz0WhLAf8YVGO33RN671kRbgg1 eoxdUmVWhYOQFc/kDVJmk0eAORmxIkhqNZoRAcTZT0tR8DG+8D7UZhbNj9z+k8Rg7zpu +5Av/IQkYKfPr3GYg9ufZuZCeX2uhMTwuHclPf3N+IgVkuOaKzPFEkNx7et7FcghiWnd i4qgLPpXsPXM1UA4uo4lObg36k81udb1vJtTvAL6K3g7+wsGdfpSkcmPCaIFIPx99Gvs 20Jqvzgp4XEnSBuxLgyL1vFAaUaQhmcQUZ0UMLhdCxa8PyZVr269RoHcjE2PZMX/E6p6 cIBQ==
X-Forwarded-Encrypted: i=1; AJvYcCU17XTijZlTZbdzq6XDV6p3meNROEKcIcSpLxSJwR9KgAOV3h8NNv9au6PX3eA0SZJ48BqwcnyLK77c+W/P
X-Gm-Message-State: AOJu0YzSxz3UPkBUnyX0XuMtJL2ovfeRGQL2Kjvq+OcdLsvqWwEPqmS2 1EnYsUkC1X2GHCzJCFi6m5MO7bOH6r/7W2Dei+nVOwlx6ZXkcOjCgpGxk+Xo
X-Google-Smtp-Source: AGHT+IGWmlhOZp+S7r7lGxgkBCcRmpFTZbTlZK5pURm54aXpgT3Q3fA6kmYPIyIz77S7X643e6MVOg==
X-Received: by 2002:a19:911b:0:b0:52c:7fc8:8658 with SMTP id 2adb3069b0e04-52ca0465643mr3258218e87.34.1718605776491; Sun, 16 Jun 2024 23:29:36 -0700 (PDT)
Received: from [192.168.0.101] (212-107-132-189.customers.ownit.se. [212.107.132.189]) by smtp.googlemail.com with ESMTPSA id 2adb3069b0e04-52ca2888363sm1143833e87.278.2024.06.16.23.29.35 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 16 Jun 2024 23:29:35 -0700 (PDT)
Message-ID: <a283b270-8c96-45e7-848d-1e5944624b28@gmail.com>
Date: Mon, 17 Jun 2024 08:29:34 +0200
MIME-Version: 1.0
User-Agent: Mozilla Thunderbird
To: "lgl island-resort.com" <lgl@island-resort.com>, "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> <21B2E20D-C9E8-48DE-BCAD-C843F2CCFE4A@island-resort.com>
Content-Language: en-US
From: Anders Rundgren <anders.rundgren.net@gmail.com>
In-Reply-To: <21B2E20D-C9E8-48DE-BCAD-C843F2CCFE4A@island-resort.com>
Content-Type: text/plain; charset="UTF-8"; format="flowed"
Content-Transfer-Encoding: 8bit
Message-ID-Hash: K3NJKAW7MENCDA6IB464CMWU6C5J2QBN
X-Message-ID-Hash: K3NJKAW7MENCDA6IB464CMWU6C5J2QBN
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/MQ8XOrvK9w7cZWAttJbp0R9XHSM>
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 2024-06-17 05:57, lgl island-resort.com wrote: > >> On Jun 16, 2024, at 8:31 PM, Anders Rundgren <anders.rundgren.net@gmail.com> wrote: >> >> On 2024-06-16 19:57, lgl island-resort.com wrote: >>> 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). >> >> Wouldn't that better belong to CDE? Duplicate keys are already invalid CBOR. > > I don’t think so. That would be a very big change from RFC 8949 where CDE is already pretty much defined and because dup detection is one of the more complex and expensive things to in a CBOR decoder in programming environments without a map concept. Does that mean that CDE permits duplicate keys? Since sorting is mandatory in CDE, duplicate key detection should be more or less for free. > > >>> 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. >> >> Assume you have an application that is rather using CDE and it outlaws all simple types except for true, false and null. Would the authors be encouraged writing a specific profile document and run it trough the IETF? I hope not. > > I hope not too, but I still don’t mind that dCBOR has this restriction. I don’t feel strongly either way. > > I also find the whole notion of CBOR application profiles introduced in the CDE document excessive. So do I as well. BTW, how about NaN payloads in QCBOR? > > LL > > > >
- [Cbor] Re: I-D Action: draft-mcnally-deterministi… Anders Rundgren
- [Cbor] Re: I-D Action: draft-mcnally-deterministi… lgl island-resort.com
- [Cbor] Re: I-D Action: draft-mcnally-deterministi… Anders Rundgren
- [Cbor] Re: I-D Action: draft-mcnally-deterministi… lgl island-resort.com
- [Cbor] Re: I-D Action: draft-mcnally-deterministi… Anders Rundgren
- [Cbor] Re: I-D Action: draft-mcnally-deterministi… Anders Rundgren
- [Cbor] Re: I-D Action: draft-mcnally-deterministi… Anders Rundgren
- [Cbor] Re: I-D Action: draft-mcnally-deterministi… Wolf McNally
- [Cbor] Re: I-D Action: draft-mcnally-deterministi… Wolf McNally
- [Cbor] Re: I-D Action: draft-mcnally-deterministi… Anders Rundgren
- [Cbor] Re: I-D Action: draft-mcnally-deterministi… Joe Hildebrand
- [Cbor] Re: I-D Action: draft-mcnally-deterministi… Carsten Bormann
- [Cbor] Re: I-D Action: draft-mcnally-deterministi… Anders Rundgren
- [Cbor] Re: I-D Action: draft-mcnally-deterministi… Anders Rundgren
- [Cbor] Re: I-D Action: draft-mcnally-deterministi… Wolf McNally
- [Cbor] Re: I-D Action: draft-mcnally-deterministi… Carsten Bormann
- [Cbor] Re: I-D Action: draft-mcnally-deterministi… Anders Rundgren
- [Cbor] Re: I-D Action: draft-mcnally-deterministi… Wolf McNally
- [Cbor] Re: I-D Action: draft-mcnally-deterministi… Anders Rundgren
- [Cbor] Re: I-D Action: draft-mcnally-deterministi… Christopher Allen
- [Cbor] Re: I-D Action: draft-mcnally-deterministi… Anders Rundgren
- [Cbor] Re: I-D Action: draft-mcnally-deterministi… Wolf McNally
- [Cbor] Re: I-D Action: draft-mcnally-deterministi… Anders Rundgren
- [Cbor] Re: I-D Action: draft-mcnally-deterministi… lgl island-resort.com
- [Cbor] Re: I-D Action: draft-mcnally-deterministi… Wolf McNally
- [Cbor] Re: I-D Action: draft-mcnally-deterministi… Carsten Bormann
- [Cbor] Re: I-D Action: draft-mcnally-deterministi… Anders Rundgren
- [Cbor] Re: I-D Action: draft-mcnally-deterministi… Anders Rundgren
- [Cbor] Re: I-D Action: draft-mcnally-deterministi… Wolf McNally
- [Cbor] Re: I-D Action: draft-mcnally-deterministi… Anders Rundgren
- [Cbor] Re: I-D Action: draft-mcnally-deterministi… Carsten Bormann
- [Cbor] Re: I-D Action: draft-mcnally-deterministi… Wolf McNally