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

Wolf McNally <wolf@wolfmcnally.com> Mon, 07 August 2023 06:28 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 4D206C14CEFE for <cbor@ietfa.amsl.com>; Sun, 6 Aug 2023 23:28:13 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.904
X-Spam-Level:
X-Spam-Status: No, score=-1.904 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, RCVD_IN_ZEN_BLOCKED_OPENDNS=0.001, SPF_HELO_NONE=0.001, SPF_NONE=0.001, T_SCC_BODY_TEXT_LINE=-0.01, URIBL_BLOCKED=0.001, 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 v81zvE5oz_ao for <cbor@ietfa.amsl.com>; Sun, 6 Aug 2023 23:28:08 -0700 (PDT)
Received: from mail-pl1-x62f.google.com (mail-pl1-x62f.google.com [IPv6:2607:f8b0:4864:20::62f]) (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 9E68BC151099 for <cbor@ietf.org>; Sun, 6 Aug 2023 23:28:08 -0700 (PDT)
Received: by mail-pl1-x62f.google.com with SMTP id d9443c01a7336-1bc73a2b0easo1172575ad.0 for <cbor@ietf.org>; Sun, 06 Aug 2023 23:28:08 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=wolfmcnally-com.20221208.gappssmtp.com; s=20221208; t=1691389688; x=1691994488; 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=333eeE4sZK/IE+ExdM5kSQKkXcDvyIpQOnJtOom8MHQ=; b=p9rkDl4C/UxX8f+fTL6iykeuHPMDpCKqzMl9Sl6G5Z3zHNiK94BRc/3dyB7lZVHNXt Ta/1T2mbjUlC/LFuen53/M82nwwKC+IZbbvjSAduLufetjMgxsR/EjEdmdD7GJwIWiwn /r4gO9Ob5DnnYxgGvv5z6Q0DM84wQ+Z/+/9slG1O2Pz2xbDATVAP4MN5/dbOe+TWMOcQ JN1U7P+hjoe++vITPPXNp5t0XU8kBQ/OihZpEYd8gVcaPbCJPMLn+imdVAjjqG2AszUq OYpVXwCilDGNkv0+yW1/MBRH/2PxZdaW001n57jMDZzmZv5oUTxXpQQyctVsk0p+vh/5 NqIw==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1691389688; x=1691994488; 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=333eeE4sZK/IE+ExdM5kSQKkXcDvyIpQOnJtOom8MHQ=; b=Mk2yijQefzuzWomuZih/8T3kaPO5+KZdibcr2EzNsqV++ID6P4GHCrTOTnRq4erWz0 nQzdpiGlfTla/TBoXBikexrSAqu14Dr9SoLsY54qlDY6Yf3c+fN2bsVXiy4cnolNfUp6 /lQ28uYNxU6vzwmUTrAPRjngMjOtj2NBXIw6HYHBIMGXoMVuxn7vOTKCB+7w4knYHLk8 2uGH6Nb4CmNcmh7U4Mz5YuNdo+wft4QGcx82mFCj3vKjeGhsaQpm6B1SxKX3jpAElDES zMqEm9qqDAJdINaS2DuOxW2Y8pc3Jh94FZLKP2HTlfQQ7UaJYvSogtSfQa3HkMvUnl1R KKjA==
X-Gm-Message-State: AOJu0Yypi8SK5Gv7pXXaMEL9e8uY3/H59qfNB+QXI6pv2Nv8kn55MoVl xY3ZW5VClrtB08LPUN9PXr+PZI4y9SfIfVbZDgg=
X-Google-Smtp-Source: AGHT+IEgb4+9exSfWsUk8cpsfwN4nbx8lwgTV/4Xup0j80XVMk+yEbAcsarvyikW5XuGu/zhSsUugg==
X-Received: by 2002:a17:902:a711:b0:1b8:72b2:fd3b with SMTP id w17-20020a170902a71100b001b872b2fd3bmr5712580plq.54.1691389687730; Sun, 06 Aug 2023 23:28:07 -0700 (PDT)
Received: from smtpclient.apple (ip70-180-193-108.lv.lv.cox.net. [70.180.193.108]) by smtp.gmail.com with ESMTPSA id 4-20020a170902c14400b001b672af624esm5910276plj.164.2023.08.06.23.28.06 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Sun, 06 Aug 2023 23:28:07 -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: <4CF6297F-5873-4245-939B-D2665F000B10@cursive.net>
Date: Sun, 06 Aug 2023 23:27:55 -0700
Cc: cbor@ietf.org, Christopher Allen <christophera@lifewithalacrity.com>, Shannon Appelcline <shannon.appelcline@gmail.com>
Content-Transfer-Encoding: quoted-printable
Message-Id: <585CD097-3792-4227-A40D-B30D69438BCF@wolfmcnally.com>
References: <169130970676.57946.2391787665439799751@ietfa.amsl.com> <E0D91ECB-F88B-4A38-A4BC-9CBCD488E475@wolfmcnally.com> <4CF6297F-5873-4245-939B-D2665F000B10@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/tz2et4GDqax4SDMDQx2PxLHHZ8I>
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 06:28:13 -0000

Joe,

Awesome! We’re excited that you’re doing an independent implementation and I’d be happy to work with you on test vectors.

Your points on the I-D are well-taken. So I’m releasing a new revision today that is much more explicit about both rules for encoders and decoders.

Regarding non-float simple values (major type 7): my own implementations do reject any values other than `true`, `false`, and `null`, because all the other code points are either “unassigned”, “reserved”, redundant/of questionable value (0xf7 undefined), or only used with indefinite-length structures which are disallowed (0xff break). So I went ahead and added this as a requirement. If anyone here has practical use-cases for why other simple values should be allowed in the dCBOR profile, please do let me know.

~ Wolf

> On Aug 6, 2023, at 7: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
>