Re: [Cbor] (d)CBOR session at IETF 118

Wolf McNally <wolf@wolfmcnally.com> Sun, 05 November 2023 19:38 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 98488C18FCD8 for <cbor@ietfa.amsl.com>; Sun, 5 Nov 2023 11:38:46 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.903
X-Spam-Level:
X-Spam-Status: No, score=-1.903 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, RCVD_IN_DNSWL_BLOCKED=0.001, 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.20230601.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 JeSt0Cb0EHje for <cbor@ietfa.amsl.com>; Sun, 5 Nov 2023 11:38:42 -0800 (PST)
Received: from mail-pf1-x42e.google.com (mail-pf1-x42e.google.com [IPv6:2607:f8b0:4864:20::42e]) (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 BDC1DC1C02B4 for <cbor@ietf.org>; Sun, 5 Nov 2023 11:38:42 -0800 (PST)
Received: by mail-pf1-x42e.google.com with SMTP id d2e1a72fcca58-6b44befac59so3687079b3a.0 for <cbor@ietf.org>; Sun, 05 Nov 2023 11:38:42 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=wolfmcnally-com.20230601.gappssmtp.com; s=20230601; t=1699213122; x=1699817922; darn=ietf.org; 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=Dsw/vR7Sib2s/xd+copkv+5+7LXK4VoNM9mcaDBRb9g=; b=REpMc5hOycHVn6HpGun/Vqs9ATF1QVNy0Pohrk8oyGVq94iTNEuZBzPJFNZN089rbl qZPjOfLAIXG4WI7Gom6N9arVeiykoVSL405r8sEpDfMgQtHse6G9o8muyWJge3YcPMqx 8md7Zmnx1PbcjGb7AfADA64dM4EMmJmRfFdcKp+gtJUsv5u2wpOwY+drgAVuH9zqjTzw MirvVxugmDmiZL4eDUgGkHp3/ImtjgJFxeaJjdxlwNir2ijhaRNKTxSMUjLW6WlwfWWC KQTSncD0u3frC36M+adEwUlw4wNetWnpxuOtreizm7++eR9by889TjPMuiL+EpO9B2yC cMnA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1699213122; x=1699817922; 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=Dsw/vR7Sib2s/xd+copkv+5+7LXK4VoNM9mcaDBRb9g=; b=jKvl5kEzknWDNEJI5THQkYstDetfYYrxf8HzByRhmCywrDxyOJkl7imRf6hgZkYIyk ipftL0bQ3+Aag+YZpmybZ5DvRs6Vx8hhkHAq5vI3Pewd0HKE0cMMVhbzzKy1LGsCCFqb QlIMZYeUsq/TaohKs0/nDzn9AQBHRHH8S3sMSIiWMVDdIR5wP+aeEJ/P81RlRjD3AlU2 uLryDQkx5p/lDJ0uUFM57eI9AySzgonHNQ+9v8+sK0Ahm2xWvKGy3ZPJ7LzW/POvQgcy sk4nqwuzTtTEFrU7sr+SEExvLyDuyNAzpdKO+YFXztKX5omnqPPhy69j/oANtllUwgeh 6n8Q==
X-Gm-Message-State: AOJu0YwZLsrzsOr1sJvsjyEkreZl9oN6jjKAIGuiD4arWGhTN3niJt2F wFNaEbXxAbeTNMQbWXIEo5EPPw==
X-Google-Smtp-Source: AGHT+IGWpKQvt32iE8IuaBPqR1x1YeO7Enr1cElTcwHDo/8LYzfoB3kaFCgEbZH2/3jRYVZPe+psnQ==
X-Received: by 2002:a17:902:d4d1:b0:1bc:1e17:6d70 with SMTP id o17-20020a170902d4d100b001bc1e176d70mr12697588plg.24.1699213121779; Sun, 05 Nov 2023 11:38:41 -0800 (PST)
Received: from smtpclient.apple (ip70-180-193-108.lv.lv.cox.net. [70.180.193.108]) by smtp.gmail.com with ESMTPSA id p22-20020a170902b09600b001b8a3e2c241sm4534634plr.14.2023.11.05.11.38.41 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Sun, 05 Nov 2023 11:38:41 -0800 (PST)
Content-Type: text/plain; charset="utf-8"
Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3774.200.91.1.1\))
From: Wolf McNally <wolf@wolfmcnally.com>
In-Reply-To: <3991f1e2-5885-45dd-b4c3-672e40e33587@gmail.com>
Date: Sun, 05 Nov 2023 11:38:30 -0800
Cc: "cbor@ietf.org" <cbor@ietf.org>, Christopher Allen <christophera@lifewithalacrity.com>, Shannon Appelcline <shannon.appelcline@gmail.com>
Content-Transfer-Encoding: quoted-printable
Message-Id: <B38B3290-EB76-48DA-8556-500D3D16B8F7@wolfmcnally.com>
References: <2723b032-189a-499e-b1d8-69a7dbe6b035@gmail.com> <1B2D045F-5BBD-464F-861B-44E855DE3654@wolfmcnally.com> <fd6ee82b-640f-4c7d-9e9c-cc7e868b8944@gmail.com> <8C0E6918-4AD4-4EF4-98F0-76BBD86D3495@wolfmcnally.com> <b7099c37-fe9a-44a4-ae2e-874f27e300e5@gmail.com> <8787A6D8-C336-4CB2-A933-5EA698BA3FA8@wolfmcnally.com> <3991f1e2-5885-45dd-b4c3-672e40e33587@gmail.com>
To: Anders Rundgren <anders.rundgren.net@gmail.com>
X-Mailer: Apple Mail (2.3774.200.91.1.1)
Archived-At: <https://mailarchive.ietf.org/arch/msg/cbor/TJHYyjgTYp91bB_1UAEGkm6uEyc>
Subject: Re: [Cbor] (d)CBOR session at IETF 118
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: Sun, 05 Nov 2023 19:38:46 -0000

Anders,

> On Nov 5, 2023, at 10:23 AM, Anders Rundgren <anders.rundgren.net@gmail.com> wrote:
> 
> On 2023-11-05 18:19, Wolf McNally wrote:
>> As long as you continue to insist that this is all about *API* and refuse to acknowledge that this is about *determinism* throughout the entire stack, then you’re simply never going to understand our motivations.
>> 
> 
> Wolf, that's correct.  I don't understand why dCBOR's determinism scheme must span over "the entire stack".  Reading draft-05 didn't make me much wiser either :(

The purpose of the present draft is not to justify the need for determinism any more than it needs to justify the need for structured data: this is generally accepted among many people for certain applications, and you yourself are one of the authors of the JSON Canonicalization Scheme, an actual RFC. So I should hardly have to justify determinism in general to you, nor should I have to justify determinism at the encoding level.

https://www.rfc-editor.org/rfc/rfc8785

Our desire to facilitate determinism across the stack, starting with CBOR at the lowest level, has also been explained numerous times: for applications that require determinism (which is *not* most applications) facilitating it as much as possible at each semantic layer relieves protocol designers and implementers of cognitive burden by enforcing single-encoding-for-single-semantic. Doing that makes it easier to avoid errors in both specification and implementation, and hence facilitates separate agents converging on the same encoding (and hence the same hashes) for the same semantic content.

You could absolutely make a byte buffer and write out every single byte, one by one, by hand, of a correct CBOR stream, or JSON document, or XML document: but why would you? Now include the requirement that multiple encoders should converge on outputs that produce the same hash. Why *wouldn’t* you facilitate this at every level, and in fact *bake it in* at the lowest levels? dCBOR does so, and all dCBOR is valid CBOR, so it is completely compatible with all CBOR implementations.

A little more argumentum ad absurdum: Why would you have a data encoding standard that you’d promote as “deterministic" where the concept of “two” could be expressed by 2, 2.0, or “two”?

I see you've made an appointment with me for a Zoom meeting on the 16th, so I look forward to discussing this with you further then.

~ Wolf