Re: [Cbor] New Version Notification for draft-macnally, for

Wolf McNally <wolf@wolfmcnally.com> Wed, 09 August 2023 22:55 UTC

Return-Path: <wolf@wolfmcnally.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 0B713C1519BA for <cbor@ietfa.amsl.com>; Wed, 9 Aug 2023 15:55:36 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.905
X-Spam-Level:
X-Spam-Status: No, score=-1.905 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_ZEN_BLOCKED_OPENDNS=0.001, SPF_HELO_NONE=0.001, SPF_NONE=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=wolfmcnally-com.20221208.gappssmtp.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 SfnWrF3OoQaj for <cbor@ietfa.amsl.com>; Wed, 9 Aug 2023 15:55:32 -0700 (PDT)
Received: from mail-pl1-x629.google.com (mail-pl1-x629.google.com [IPv6:2607:f8b0:4864:20::629]) (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 3B6EDC1519B1 for <cbor@ietf.org>; Wed, 9 Aug 2023 15:55:32 -0700 (PDT)
Received: by mail-pl1-x629.google.com with SMTP id d9443c01a7336-1bc6535027aso3461595ad.2 for <cbor@ietf.org>; Wed, 09 Aug 2023 15:55:32 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=wolfmcnally-com.20221208.gappssmtp.com; s=20221208; t=1691621732; x=1692226532; h=to:references:message-id:content-transfer-encoding:cc:date :in-reply-to:from:subject:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=UMYINw+/IeQXOQ7wjupBe4fQXi8MTQbXwVYiSKiR+Wo=; b=rI8+BvcLgO6rIj5/xE3HWt/ghEw7uE37D6u80UEpEcLKFEVfkwsa9J5ecIkjlZBfv6 rQWhSxz3uX6ejTuo4uvJfqZHp6O8bFSlBo6qRieFM6vcIu1OTyVPVoo985a1cCBHeP1h wGM8Yy+gdvdVepImAW1IhJy7jne8TdAvTDQRnYZUFZQX5IgdL65lcJGjSb480GjI4f3/ 8jh6HRRJu5ElbQ/b/x9395gZiarb+rk+ESgCOwK0W4tBs70d77hDH67uCL/5oU7vQyFM XHHqHGipkZ67ttHCHGpQb7EHGwtw3WPmO+p9D2PDUs6hwAqcZX574GUdAFmK4hRh03jP J34Q==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1691621732; x=1692226532; h=to:references:message-id:content-transfer-encoding:cc:date :in-reply-to:from:subject:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=UMYINw+/IeQXOQ7wjupBe4fQXi8MTQbXwVYiSKiR+Wo=; b=Eogd8sRZFt2b1lV6XPKWWAUDBVoZ8FSX4Z0VviQW2ra3qsrfYmv06hc4OUxpEzXoGs 5S61VnextMR9joSLTmlrXATQojNzxuhU31NqAKZlrFbAwmkARcSJu3xLQWZg28tOBLgO T6j1Nr1n5PcvUD6b/+Q8MtiCgnCvCyxbWCiJzPFGjiRhOuptgCl7WIzPm2q091gTIeuo mbonYTn2kRMywxSHd9wDaMJE9v1AXDAOUufuaOM9gtVeAgojs+JCthSIxU1SiHJ2pCPe kjSHlmbz36ggA+QbF2YU7CmtEUP8jpf0ytjYOM4avE2DOYUxi+piBHo/ularloVxyhG0 kIuw==
X-Gm-Message-State: AOJu0Yzep0cStekhSoyUGCje6xinHPYVQMNe6NJI46jkuUYh509kCXWJ EU9SXNqYsxoFunC8yne4Qr8K/pmqXNNAi1wtHPY=
X-Google-Smtp-Source: AGHT+IH8rs2E7is37fdJhTHrOSRV8t+dw1xPUjz8TnHBu5lAKTkFh4wrtGSwiJ2Z6u4qVAlqF7n8Gg==
X-Received: by 2002:a17:903:120c:b0:1bc:283:75a8 with SMTP id l12-20020a170903120c00b001bc028375a8mr654559plh.26.1691621731691; Wed, 09 Aug 2023 15:55:31 -0700 (PDT)
Received: from smtpclient.apple ([185.202.221.65]) by smtp.gmail.com with ESMTPSA id b23-20020a170902b61700b001b9be3b94d3sm60903pls.140.2023.08.09.15.55.30 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Wed, 09 Aug 2023 15:55:31 -0700 (PDT)
Content-Type: text/plain; charset="utf-8"
Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3731.700.6\))
From: Wolf McNally <wolf@wolfmcnally.com>
In-Reply-To: <C06E9D4C-820D-49EF-830E-8C60E8E8075C@cursive.net>
Date: Wed, 09 Aug 2023 15:55:20 -0700
Cc: cbor@ietf.org, Christopher Allen <christophera@lifewithalacrity.com>, Shannon Appelcline <shannon.appelcline@gmail.com>
Content-Transfer-Encoding: quoted-printable
Message-Id: <FEDB1F1E-DACC-4D4C-9E02-673570BCDA94@wolfmcnally.com>
References: <1E5B331D-C5FE-420E-AE80-236950E30F19@wolfmcnally.com> <C06E9D4C-820D-49EF-830E-8C60E8E8075C@cursive.net>
To: Joe Hildebrand <hildjj@cursive.net>
X-Mailer: Apple Mail (2.3731.700.6)
Archived-At: <https://mailarchive.ietf.org/arch/msg/cbor/miqQAVGycckjPUqVI3SlfBfMoZU>
Subject: Re: [Cbor] New Version Notification for draft-macnally, for
X-BeenThere: cbor@ietf.org
X-Mailman-Version: 2.1.39
Precedence: list
List-Id: "Concise Binary Object Representation \(CBOR\)" <cbor.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/cbor>, <mailto:cbor-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/cbor/>
List-Post: <mailto:cbor@ietf.org>
List-Help: <mailto:cbor-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/cbor>, <mailto:cbor-request@ietf.org?subject=subscribe>
X-List-Received-Date: Wed, 09 Aug 2023 22:55:36 -0000

Joe,

My main issue with discussing what we’re *not* supporting in the I-D is that doing so (especially exhaustively) would require a fair amount of space and might introduce confusion. For instance, we don’t discuss why we’re not supporting `0xff break`; it is there to support CBOR indefinite-length structures, which are ruled out.

Most of RFC 8949 uses `undefined` interchangeably with `null`, which makes it ambiguous. See for example, §3.4 where it says: "As a matter of convention, many tags do not accept null or undefined values as tag content; instead, the expectation is that a null or undefined value can be used in place of the entire tag..."

Whereas §5.7 proposes a purpose for `undefined` that seems to be in conflict with the goal of determinism: "undefined might be used by an encoder as a substitute for a data item with an encoding problem, in order to allow the rest of the enclosing data items to be encoded without harm."

With regard to bignums, they aren’t mentioned at all in the normative §4.2.1, and they’re only mentioned in passing in the non-normative §4.2.2: "If a protocol includes a field that can express integers with an absolute value of 2^64 or larger using tag numbers 2 or 3 (Section 3.4.3), the protocol's deterministic encoding needs to specify whether smaller integers are also expressed using these tags or using major types 0 and 1. Preferred serialization uses the latter choice, which is therefore recommended.” While I agree with the recommendation (issues around lower-nint values aside), we have moved our I-D away from recommendations and toward purely normative requirements. Given that bignums are out of scope for the current profile, perhaps you could clarify what sort of statement you feel would be helpful regarding them?

I would expect that supporting dCBOR as a feature switch in an otherwise generic CBOR encoder would entail some complexities, and I’m looking forward to hearing your analysis. My experience in implementing single-purpose dCBOR codecs is that overall it simplifies them, which will work well in constrained environments.

~ Wolf

> On Aug 8, 2023, at 8:44 AM, Joe Hildebrand <hildjj@cursive.net> wrote:
> 
> Section 2.5 needs something about `undefined` one way or the other.
> 
> From an implementors perspective, I still think this needs something about bigints, Carsten's comment about "forking" notwithstanding.
> 
> Otherwise, this handles all of my issues with this document as it stands.
> 
> If you'd like to see the complexity this adds to my code, here is the pending PR: https://github.com/hildjj/cbor2/pull/19
> It ended up being a lot more work than I expected.
> 
> Note: I have another message coming on one of the other threads that will compare this vs. Carsten's approach.  I should not be counted as in one camp or the other until that analysis is complete.
> 
> — 
> Joe Hildebrand
> 
>> On Aug 8, 2023, at 4:12 AM, Wolf McNally <wolf@wolfmcnally.com> wrote:
>> 
>> New in this version:
>> 
>> Clarified that all requirements are narrowing.
>> 
>> —
>> 
>> A new version of I-D, draft-mcnally-deterministic-cbor-05.txt
>> has been successfully submitted by Wolf McNally and posted to the
>> IETF repository.
>> 
>> Name: draft-mcnally-deterministic-cbor
>> Revision: 05
>> Title: Gordian dCBOR: A Deterministic CBOR Application Profile
>> Document date: 2023-08-08
>> Group: Individual Submission
>> Pages: 10
>> URL:            https://www.ietf.org/archive/id/draft-mcnally-deterministic-cbor-05.txt
>> Status:         https://datatracker.ietf.org/doc/draft-mcnally-deterministic-cbor/
>> Html:           https://www.ietf.org/archive/id/draft-mcnally-deterministic-cbor-05.html
>> Htmlized:       https://datatracker.ietf.org/doc/html/draft-mcnally-deterministic-cbor
>> Diff:           https://author-tools.ietf.org/iddiff?url2=draft-mcnally-deterministic-cbor-05
>> 
>> Abstract:
>>  CBOR (RFC 8949) defines "Deterministically Encoded CBOR" in its
>>  Section 4.2.  The present document provides the application profile
>>  "dCBOR" that can be used to help achieve interoperable deterministic
>>  encoding.
>> 
>> Discussion Venues
>> 
>>  This note is to be removed before publishing as an RFC.
>> 
>>  Source for this draft and an issue tracker can be found at
>>  https://github.com/BlockchainCommons/WIPs-IETF-draft-deterministic-
>>  cbor.
>> 
>> 
>> 
>> 
>> The IETF Secretariat
>> _______________________________________________
>> CBOR mailing list
>> CBOR@ietf.org
>> https://www.ietf.org/mailman/listinfo/cbor
>