Re: [Cbor] Announcement: draft-mcnally-deterministic-cbor-03

Joe Hildebrand <hildjj@cursive.net> Mon, 07 August 2023 16:01 UTC

Return-Path: <hildjj@cursive.net>
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 40445C15152C for <cbor@ietfa.amsl.com>; Mon, 7 Aug 2023 09:01:14 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.107
X-Spam-Level:
X-Spam-Status: No, score=-2.107 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, 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, 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 (1024-bit key) header.d=cursive.net
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 MPVfEkhZTKIX for <cbor@ietfa.amsl.com>; Mon, 7 Aug 2023 09:01:10 -0700 (PDT)
Received: from mail-qv1-xf2d.google.com (mail-qv1-xf2d.google.com [IPv6:2607:f8b0:4864:20::f2d]) (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 F212BC15108B for <cbor@ietf.org>; Mon, 7 Aug 2023 09:01:09 -0700 (PDT)
Received: by mail-qv1-xf2d.google.com with SMTP id 6a1803df08f44-63ce8bea776so26353216d6.0 for <cbor@ietf.org>; Mon, 07 Aug 2023 09:01:09 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cursive.net; s=google; t=1691424069; x=1692028869; 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=G5yDqHTQRRbeNNAbZWPDID3zya2PZpWVNdKzkBCq24E=; b=qPgEbMsCC8W63SpZ9QQZwzka+6VtOG+arjDLg/712IzEryQrBrHzY/A4T1kH9RXbmx nAaMgHWwbFaW1lw5VxAyG+zrDUGuL5SMpwZ4u6PuBjWqikxp6yrBSxyradIKwCPpBwP0 9ooDT876lw7xMz5nKdet02uFPppJ5BSIOtbFw=
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1691424069; x=1692028869; 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=G5yDqHTQRRbeNNAbZWPDID3zya2PZpWVNdKzkBCq24E=; b=XsOvQfEFbe7gFKsGbMzxdrnNpA1OEAxvcr5r0kZpz/61zb7ItrofPiNRPkBrD+NdAf JWDRbC0gZRh4f86di+sDcKPIKaTHvKq5JTYrTjh70RVRuvrSetbAZCC4mmEQHl4MfM9o UW1kxYuTKcZYs3jbJOeBfuf4Wu969mUW9QIvL10MZZFNg4LgT1bHvAPGqpc+4kJxj56G lU7McxI7z6Mj16nswqgkX2ojeyxT7KUsCfF0YyD2GrEQ9ViLsnRb+4N6eNENNyTRYyIu Us8YDyFlMHF/anUKwsChzGmBsX9KNVJOi3ymFqh2KbB9VrKtjUBEbLFHmfzJy/opBbjJ 1JEg==
X-Gm-Message-State: AOJu0YyY3V9GqBPJr1jPg8gi2YMpxzZjIrIsXD30scByP793chpN6CKY Y42mPSfotDTf5cXIfInpNpmZaI0EwgTBeZ/nh8M=
X-Google-Smtp-Source: AGHT+IH5ezqq6EP7/2pC6wTcUrVhN3bbCFqwQlMoASee+mqzL/WtvpvKMQovVbM2J3YMX3X5t3fH5g==
X-Received: by 2002:a05:6214:14a1:b0:626:3a5a:f8dc with SMTP id bo1-20020a05621414a100b006263a5af8dcmr9733782qvb.57.1691424068555; Mon, 07 Aug 2023 09:01:08 -0700 (PDT)
Received: from smtpclient.apple ([2607:fb91:1ce0:960a:79b4:6402:2b99:bc18]) by smtp.gmail.com with ESMTPSA id g20-20020a0cdf14000000b0063f62e0f2bfsm2923279qvl.22.2023.08.07.09.01.07 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Mon, 07 Aug 2023 09:01:07 -0700 (PDT)
Content-Type: text/plain; charset="utf-8"
Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3731.700.6\))
From: Joe Hildebrand <hildjj@cursive.net>
In-Reply-To: <4CF6297F-5873-4245-939B-D2665F000B10@cursive.net>
Date: Mon, 07 Aug 2023 12:00:56 -0400
Cc: cbor@ietf.org
Content-Transfer-Encoding: quoted-printable
Message-Id: <D1E26143-3328-4A28-80CA-2D7E040FE25B@cursive.net>
References: <169130970676.57946.2391787665439799751@ietfa.amsl.com> <E0D91ECB-F88B-4A38-A4BC-9CBCD488E475@wolfmcnally.com> <4CF6297F-5873-4245-939B-D2665F000B10@cursive.net>
To: Wolf McNally <wolf@wolfmcnally.com>
X-Mailer: Apple Mail (2.3731.700.6)
Archived-At: <https://mailarchive.ietf.org/arch/msg/cbor/BegHlgoxRtibke2z1PcxJMkG1fg>
Subject: Re: [Cbor] Announcement: draft-mcnally-deterministic-cbor-03
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: Mon, 07 Aug 2023 16:01:14 -0000

One more thing, there may need to be another note that says that the integer descriptors for complex types (array, map, tag, byte string, utf8 string) MUST follow the rules for mt 0/1.  It's implied strongly and probably difficult to implement any other way, but might be worth mentioning.

— 
Joe Hildebrand

> On Aug 6, 2023, at 10:13 PM, Joe Hildebrand <hildjj@cursive.net> wrote:
> 
> I've been implementing this today.  Here are some notes:
> 
> - It would be nice if the encode/decode requirements were split out in a few places and made more explicit in a few places.  If each section had a "for dCBOR encoders" and "for dCBOR decoders" sub-section, it would help the implementor make sure they hadn't missed anything.
> - In particular, s2.1 (5) should be spelled out everywhere it applies
> - +/- Infinity is a special case of s2.3 (2).  The wording in s2.3.2 (4) sent me down the wrong road to special-case these, but it's worth calling them out as special cases to test.
> - s2.3.2 says "encoders must" then talks about decoding on a couple of the points
> - I was expecting something about simple values other than true/false/undefined/null being prohibited
> 
> Overall, the doc made sense to me.
> 
> cbor2 will support dcbor in its next release, once I figure out how much granularity I want in configuring it on or off.  It won't be the default encoding, and the decoding errors will not be on by default.
> 
> I would be happy to collaborate on a set of test vectors if you're interested.
> 
> — 
> Joe Hildebrand
> 
>> On Aug 6, 2023, at 4:20 AM, Wolf McNally <wolf@wolfmcnally.com> wrote:
>> 
>> As promised, this revision of our dCBOR I-D includes discussed corrections. It also reformats all profile requirements in a way that is hopefully easier to understand and discuss.
>> 
>> ~ Wolf
>> 
>> A new version of I-D, draft-mcnally-deterministic-cbor-03.txt
>> has been successfully submitted by Wolf McNally and posted to the
>> IETF repository.
>> 
>> Name: draft-mcnally-deterministic-cbor
>> Revision: 03
>> Title: Gordian dCBOR: A Deterministic CBOR Application Profile
>> Document date: 2023-08-06
>> Group: Individual Submission
>> Pages: 8
>> URL:            https://www.ietf.org/archive/id/draft-mcnally-deterministic-cbor-03.txt
>> Status:         https://datatracker.ietf.org/doc/draft-mcnally-deterministic-cbor/
>> Html:           https://www.ietf.org/archive/id/draft-mcnally-deterministic-cbor-03.html
>> Htmlized:       https://datatracker.ietf.org/doc/html/draft-mcnally-deterministic-cbor
>> Diff:           https://author-tools.ietf.org/iddiff?url2=draft-mcnally-deterministic-cbor-03
>> 
>> 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.
>> 
>> 
>> _______________________________________________
>> CBOR mailing list
>> CBOR@ietf.org
>> https://www.ietf.org/mailman/listinfo/cbor
>