[Cbor] Re: Soliciting unresolved points around dCBOR
Anders Rundgren <anders.rundgren.net@gmail.com> Tue, 18 June 2024 01:49 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 6EB0BC1D4A6D for <cbor@ietfa.amsl.com>; Mon, 17 Jun 2024 18:49:41 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.108
X-Spam-Level:
X-Spam-Status: No, score=-2.108 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_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] 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 qE-2WzzEX9Hi for <cbor@ietfa.amsl.com>; Mon, 17 Jun 2024 18:49:41 -0700 (PDT)
Received: from mail-lj1-x22a.google.com (mail-lj1-x22a.google.com [IPv6:2a00:1450:4864:20::22a]) (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 04084C1CAF32 for <cbor@ietf.org>; Mon, 17 Jun 2024 18:49:40 -0700 (PDT)
Received: by mail-lj1-x22a.google.com with SMTP id 38308e7fff4ca-2ec0f3b9bb8so32973961fa.1 for <cbor@ietf.org>; Mon, 17 Jun 2024 18:49:40 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1718675379; x=1719280179; darn=ietf.org; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=suKAvK8jo11Pu8grT9xtn1uICG6O5W4Bj80KWP1erBc=; b=TsZL/gBHq976XZ5sLM2VHNHXlJOL9rs/2qQ6PudSPzNDNlymT7Ul96pV2ZEJvJ1yLv T9a8beVwUjrN0Q+m7e+odDghtBsmmKM7A2rIhwy1o8rg9e9pumRPdu+pHxFrcFgM1ikq z6UODzsivUc+hABZLw5uc3C+N9qz77Za3MiUDFtxg2J6a0/5rfwe08kzPqjsXUuNuDWb BkwUJgGKCkevL+BnswSXIOeNG9zW2cIc2dMaBDnKfE95JeyonwH9azkS2LHtmMGWbmih URpdQPSZBLbunWy+8Dzhnz/VJZ1mcYH/7Zpd6GYcY/8noMsMWG7hJkCgcUBNWbTZK6gk mEHw==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1718675379; x=1719280179; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=suKAvK8jo11Pu8grT9xtn1uICG6O5W4Bj80KWP1erBc=; b=lXAqChtN5MpSsMY/s7IOxZ2BkkHXzBhzFBZIHqOjJHtnT35i5IAXO6a+ysISInDtGt BqoOlnmHAoDhowwhbpkJKN6gguyGurXfolE8UyX+Ue0y2Z56pObAtaO6p0rdWmoCBi3L a4/rVQB3afvXujAz19MmK6AAuO3m556Jn6YpX5RaBbJVRESv7bAfcMVrTNyqLz9XipAK fFuHfUPrMNgEGMxfhL2U+eqCT3QN5t4+VNYdqybBe5DRqGglCmWi11fNZG7WOWc7yCzO UJBLJifVXV5ZwJBAZAJqVdHcJo8onc1gcvXMNmge+B6tLB9vmjmg7h/TUqjWv1rgorLw KMmQ==
X-Gm-Message-State: AOJu0Yy681P+vn+Q206Ev8CAuEbqPNdgHVp4I+NG0+GbTsDJEitPxE0b V9944OqgoascOwb0155LRrqV2T+9UdlagE1DM+zTXo5dwbCDWWWXcr7fwyQ2
X-Google-Smtp-Source: AGHT+IFIaAbjhx7Qf18kNsaxGHaN8/wiis1NK8r1AGsNsIkkBcFacWzitIImm8iHh2cNA9EEmZUbnA==
X-Received: by 2002:a05:6512:3992:b0:52c:c22d:3d4b with SMTP id 2adb3069b0e04-52cc22d3f85mr891795e87.54.1718675378284; Mon, 17 Jun 2024 18:49:38 -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-52ca287228bsm1375717e87.163.2024.06.17.18.49.37 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 17 Jun 2024 18:49:37 -0700 (PDT)
Message-ID: <edf20994-b33e-4eb0-a9f9-f8086fcd24af@gmail.com>
Date: Tue, 18 Jun 2024 03:49:36 +0200
MIME-Version: 1.0
User-Agent: Mozilla Thunderbird
To: Christian Amsüss <christian@amsuess.com>
References: <Zm7eekcpgBmJQ5jv@hephaistos.amsuess.com> <ZnAlntTjsdqobA7h@hephaistos.amsuess.com> <be9f8d65-47ba-4a49-b443-7de016b5bd5d@gmail.com> <ZnA8lsWgEjWNRZLx@hephaistos.amsuess.com>
Content-Language: en-US
From: Anders Rundgren <anders.rundgren.net@gmail.com>
In-Reply-To: <ZnA8lsWgEjWNRZLx@hephaistos.amsuess.com>
Content-Type: text/plain; charset="UTF-8"; format="flowed"
Content-Transfer-Encoding: 8bit
Message-ID-Hash: Z4K4LPROO457Y4CQH7WP7JC5FHHJ7NUN
X-Message-ID-Hash: Z4K4LPROO457Y4CQH7WP7JC5FHHJ7NUN
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
CC: cbor@ietf.org
X-Mailman-Version: 3.3.9rc4
Precedence: list
Subject: [Cbor] Re: Soliciting unresolved points around dCBOR
List-Id: "Concise Binary Object Representation (CBOR)" <cbor.ietf.org>
Archived-At: <https://mailarchive.ietf.org/arch/msg/cbor/oPAT9l9KLb4V3ccsiLqjPKpecMA>
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 15:39, Christian Amsüss wrote: > On Mon, Jun 17, 2024 at 02:48:34PM +0200, Anders Rundgren wrote: >> To get any further, the dCBOR advocates should provide a simple >> example showing a Gordian-like operation that fails using CDE "as is". > > That may be a useful exercise indeed. > > To my understanding, the goal of using deterministic CBOR encodings in > the first place is to ensure that consumers can ingest Gordian data, > store them in their native format by value, and re-encode Gordian to get > bit-identical data for cryptographic purposes. > > (Were there not the aspect of independent storage, we wouldn't need even > deterministic encoding, but could just always reuse the original > encoding for verification.) > > Numeric reduction comes into play when different parties use different > data types internally. No matter whether it is a database with a u64 > column or a database with a f32 column, if both receive the array [1, 1, > 2, 3, 5], store it and re-serialize, they wind up with the same data. > This is what I understand the desired benefit of numeric reduction to > be. Thanx! Now I finally understand why I never figured out the deeper intent with numeric reduction :) Storing f64s in u64 fields or coercing i64s into f64 fields is not your average text book example. If you separate ints and floats and store them in a appropriate fields, you should be able to recreate the proper CBOR binary regardless if you use dCBOR or CDE. Anders > > Now I still do not agree with the design of such a system: Since by > design the semantics of array doesn't include typing information > (otherwise the application could tell the serializer whether it's floats > or ints), the collaboration of the u64 and the f32 tool will work until > it fails when a value is produced that is not understood by one of them > (at which point that party can't ingest the data any more). I'd prefer > to have arrays (or other fields) with clear semantics that fail on > general mismatch and then are guaranteed to succeed at runtime. > > But to the best of my understanding, such a design is what (correctly, > albeit on to me undesirable premises) motivates numeric reduction. > > BR > c (once more, chair hat off) >
- [Cbor] Soliciting unresolved points around dCBOR Christian Amsüss
- [Cbor] Re: Soliciting unresolved points around dC… lgl island-resort.com
- [Cbor] Re: Soliciting unresolved points around dC… Wolf McNally
- [Cbor] Re: Soliciting unresolved points around dC… Christian Amsüss
- [Cbor] Re: Soliciting unresolved points around dC… Anders Rundgren
- [Cbor] Re: Soliciting unresolved points around dC… Christian Amsüss
- [Cbor] Re: Soliciting unresolved points around dC… Anders Rundgren
- [Cbor] Re: Soliciting unresolved points around dC… Wolf McNally
- [Cbor] Re: Soliciting unresolved points around dC… Carsten Bormann
- [Cbor] Re: Soliciting unresolved points around dC… Anders Rundgren
- [Cbor] Re: Soliciting unresolved points around dC… Joe Hildebrand
- [Cbor] Re: Soliciting unresolved points around dC… Anders Rundgren
- [Cbor] Re: Soliciting unresolved points around dC… Joe Hildebrand
- [Cbor] Re: Soliciting unresolved points around dC… Christian Amsüss
- [Cbor] Re: Soliciting unresolved points around dC… Anders Rundgren
- [Cbor] Gordian for graph serialization Christian Amsüss
- [Cbor] Re: Soliciting unresolved points around dC… Anders Rundgren
- [Cbor] Re: Soliciting unresolved points around dC… Anders Rundgren
- [Cbor] Re: Soliciting unresolved points around dC… Wolf McNally
- [Cbor] Re: Soliciting unresolved points around dC… Wolf McNally
- [Cbor] Re: Soliciting unresolved points around dC… Anders Rundgren
- [Cbor] Re: Soliciting unresolved points around dC… Carsten Bormann
- [Cbor] Re: Soliciting unresolved points around dC… Wolf McNally
- [Cbor] Re: Soliciting unresolved points around dC… Anders Rundgren
- [Cbor] Re: Soliciting unresolved points around dC… Wolf McNally
- [Cbor] Re: Need for preferred and CDE (was Re: So… Anders Rundgren
- [Cbor] Re: Need for preferred and CDE (was Re: So… Anders Rundgren
- [Cbor] Re: Need for preferred and CDE (was Re: So… Anders Rundgren
- [Cbor] Re: Soliciting unresolved points around dC… Anders Rundgren
- [Cbor] Re: Soliciting unresolved points around dC… Carsten Bormann
- [Cbor] Re: Soliciting unresolved points around dC… Carsten Bormann
- [Cbor] Re: Soliciting unresolved points around dC… lgl island-resort.com
- [Cbor] Re: Soliciting unresolved points around dC… Carsten Bormann
- [Cbor] Need for preferred and CDE (was Re: Solici… lgl island-resort.com
- [Cbor] Re: Need for preferred and CDE (was Re: So… Wolf McNally
- [Cbor] Re: Soliciting unresolved points around dC… Anders Rundgren
- [Cbor] Re: Applicability of deterministic encodin… Anders Rundgren
- [Cbor] Re: Soliciting unresolved points around dC… Carsten Bormann
- [Cbor] Re: Gordian for graph serialization Wolf McNally
- [Cbor] Re: Soliciting unresolved points around dC… Wolf McNally
- [Cbor] Re: Soliciting unresolved points around dC… Anders Rundgren
- [Cbor] Re: Soliciting unresolved points around dC… Anders Rundgren
- [Cbor] Applicability of deterministic encoding Wa… Anders Rundgren
- [Cbor] Re: Need for preferred and CDE (was Re: So… lgl island-resort.com
- [Cbor] Re: Gordian for graph serialization Christian Amsüss
- [Cbor] Re: Soliciting unresolved points around dC… Anders Rundgren
- [Cbor] Re: Soliciting unresolved points around dC… lgl island-resort.com
- [Cbor] Re: Soliciting unresolved points around dC… lgl island-resort.com
- [Cbor] Re: Need for preferred and CDE (was Re: So… Joe Hildebrand
- [Cbor] Re: Need for preferred and CDE (was Re: So… lgl island-resort.com
- [Cbor] Re: Gordian for graph serialization Wolf McNally
- [Cbor] Re: Soliciting unresolved points around dC… Wolf McNally
- [Cbor] Re: Applicability of deterministic encodin… lgl island-resort.com
- [Cbor] Re: Need for preferred and CDE (was Re: So… Joe Hildebrand
- [Cbor] Re: Need for preferred and CDE (was Re: So… Wolf McNally
- [Cbor] Re: Need for preferred and CDE (was Re: So… Carsten Bormann
- [Cbor] Re: Need for preferred and CDE (was Re: So… lgl island-resort.com
- [Cbor] Re: Need for preferred and CDE (was Re: So… Carsten Bormann
- [Cbor] Re: Need for preferred and CDE (was Re: So… lgl island-resort.com
- [Cbor] Re: Need for preferred and CDE (was Re: So… Carsten Bormann
- [Cbor] Re: Need for preferred and CDE (was Re: So… Anders Rundgren
- [Cbor] Re: Need for preferred and CDE (was Re: So… Carsten Bormann
- [Cbor] Re: Need for preferred and CDE (was Re: So… lgl island-resort.com
- [Cbor] Basic Serialization (Re: Need for preferre… Carsten Bormann
- [Cbor] Re: Basic Serialization (Re: Need for pref… lgl island-resort.com
- [Cbor] Re: Basic Serialization (Re: Need for pref… Anders Rundgren
- [Cbor] CR in EDN strings (Re: Basic Serialization… Carsten Bormann
- [Cbor] Re: CR in EDN strings (Re: Basic Serializa… Anders Rundgren
- [Cbor] Re: CR in EDN strings (Re: Basic Serializa… Carsten Bormann
- [Cbor] Re: CR in EDN strings (Re: Basic Serializa… Anders Rundgren
- [Cbor] Re: CR in EDN strings (Re: Basic Serializa… Rohan Mahy
- [Cbor] Re: CR in EDN strings (Re: Basic Serializa… Carsten Bormann
- [Cbor] Re: CR in EDN strings (Re: Basic Serializa… Rohan Mahy
- [Cbor] Re: CR in EDN strings (Re: Basic Serializa… Carsten Bormann
- [Cbor] Re: CR in EDN strings (Re: Basic Serializa… Rohan Mahy
- [Cbor] Re: CR in EDN strings (Re: Basic Serializa… Carsten Bormann
- [Cbor] Re: CR in EDN strings (Re: Basic Serializa… Rohan Mahy
- [Cbor] Re: CR in EDN strings (Re: Basic Serializa… Anders Rundgren
- [Cbor] Re: CR in EDN strings (Re: Basic Serializa… Rohan Mahy
- [Cbor] Re: CR in EDN strings (Re: Basic Serializa… Carsten Bormann
- [Cbor] Re: CR in EDN strings (Re: Basic Serializa… Rohan Mahy
- [Cbor] Re: CR in EDN strings (Re: Basic Serializa… Anders Rundgren
- [Cbor] Re: CR in EDN strings (Re: Basic Serializa… Carsten Bormann
- [Cbor] Re: CR in EDN strings (Re: Basic Serializa… Carsten Bormann