Re: [Cbor] Status of Appendix A in RFC 8949

Anders Rundgren <anders.rundgren.net@gmail.com> Fri, 05 May 2023 07:27 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 94945C151543 for <cbor@ietfa.amsl.com>; Fri, 5 May 2023 00:27:58 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.095
X-Spam-Level:
X-Spam-Status: No, score=-2.095 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, NICE_REPLY_A=-0.001, RCVD_IN_DNSWL_BLOCKED=0.001, RCVD_IN_ZEN_BLOCKED_OPENDNS=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, 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=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 1LMrvt2QvnX8 for <cbor@ietfa.amsl.com>; Fri, 5 May 2023 00:27:54 -0700 (PDT)
Received: from mail-wr1-x42d.google.com (mail-wr1-x42d.google.com [IPv6:2a00:1450:4864:20::42d]) (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 A43DCC14CE46 for <cbor@ietf.org>; Fri, 5 May 2023 00:27:54 -0700 (PDT)
Received: by mail-wr1-x42d.google.com with SMTP id ffacd0b85a97d-307664010fdso1001693f8f.0 for <cbor@ietf.org>; Fri, 05 May 2023 00:27:54 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1683271673; x=1685863673; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=eCA3vaHKODLrB1gBRrNugJ69JA+WHeVU9dBY+js07Bs=; b=KAJ7BXe5VreL/cSBktmDvwIpPQ9Dklunhv0IvTUWGwZc7vQvX00vCWRxumrl9pk+05 DwXfqzzhnAvmGBh7/Pa1uaYfyOcSG/9ZmceDpAa7Vt5iubU9YN41yM7xZUL39vJZpjX1 PeJZBBAHqSkTgkFWH1klqYRhm2nB9bYbZfmtjHE2jqMI0Ajs/L4TaKC14qMQ4QF0KzIv S/KR9HI2lNit9R2kg5iMsHU/R2E3kvrSQhJgkzjizLrcPX2aohEV1LpZ79Nwct2uCK9F MRxaYmLBa4PQNoxPNvzPnoIgTpw6985Qbb2MWSaJS3OXJaeML5I3nJ5gwx79x40a23ZZ Hd+w==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1683271673; x=1685863673; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=eCA3vaHKODLrB1gBRrNugJ69JA+WHeVU9dBY+js07Bs=; b=Yk/1b5oJFGzQn95U7AcDYe1UsW8buxA/wBsO3DzAqPl+7T8+BAGS9OzX+fnvhpQYS/ zshLvaRzjYLGFA+NYMSbYFqPwhsw6xHyXsN5ZWT1X2OgPlnXuCNPxFww8NBs80B0nWx8 3EGVWQ2IEc0j23w1crgmaptO48y2wBtcDiUMA0m6ubQQgKKsoLJ1hkc9d5xXo9hdLE3p A4Y1VipMEaymxgmV4JMMGHr4sJlAvl8y4aIFDV2aCeI9SLiI2HNQtC6fgw/uO3WmjXLu XLZVNLIhpcPE0VANfB8y1JVsxdQaKgq5VKj7UswrgfFyRRJripZKx9d3aA/+afRNWlqi FDow==
X-Gm-Message-State: AC+VfDyTYQMJgBCOqekTgA1UlFTby4afvVpyjydUYVV3MLnuUdepXvpv ssyRP7PMdVdnn00ownUvyMZ1nLZ9JP8=
X-Google-Smtp-Source: ACHHUZ4nBoBDRzfr3ArtB/CXGlSuaK+hvDxGnttZlsp4ReQHiDvXrTDbIoEIKLhHvM0coWdM2ub0FQ==
X-Received: by 2002:a5d:6a47:0:b0:306:2d16:9b4f with SMTP id t7-20020a5d6a47000000b003062d169b4fmr652080wrw.9.1683271672638; Fri, 05 May 2023 00:27:52 -0700 (PDT)
Received: from ?IPV6:2a01:e34:ec4e:5670:b310:ae53:9c1e:16cc? ([2a01:e34:ec4e:5670:b310:ae53:9c1e:16cc]) by smtp.googlemail.com with ESMTPSA id v12-20020a5d678c000000b00304a876c3c1sm1484990wru.5.2023.05.05.00.27.51 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 05 May 2023 00:27:52 -0700 (PDT)
Message-ID: <e16961f5-edbc-233e-3e24-e3a20bc57ea4@gmail.com>
Date: Fri, 05 May 2023 09:27:52 +0200
MIME-Version: 1.0
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.10.1
Content-Language: en-US
To: Carsten Bormann <cabo@tzi.org>
Cc: "cbor@ietf.org" <cbor@ietf.org>
References: <8233a692-df84-f093-96bf-fe99c03adfc5@gmail.com> <31111796-3CF7-4F8F-A805-4CBE1124E9D8@tzi.org>
From: Anders Rundgren <anders.rundgren.net@gmail.com>
In-Reply-To: <31111796-3CF7-4F8F-A805-4CBE1124E9D8@tzi.org>
Content-Type: text/plain; charset="UTF-8"; format="flowed"
Content-Transfer-Encoding: 8bit
Archived-At: <https://mailarchive.ietf.org/arch/msg/cbor/u9I67K3-02tRUh4XXbEVN6BwNgA>
Subject: Re: [Cbor] Status of Appendix A in RFC 8949
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: Fri, 05 May 2023 07:27:58 -0000

https://cbor.me produces CBOR data items like 0xf9c400 that are rejected by applications building on https://www.ietf.org/archive/id/draft-mcnally-deterministic-cbor-01.html#name-reduction-of-floating-point

Still both solutions claim to be RFC compliant.

So the question is simply: is a CBOR interoperability profile a suitable work item for the CBOR WG, or should it preferably be taken to OASIS, ETSI, or the W3C?

The target for an interoperability profile are the 80-90% of all developers working with enterprise systems as well as open standards for banking and similar.

thanx,
Anders

On 2023-05-05 8:
52, Carsten Bormann wrote:
>> In
>> https://www.rfc-editor.org/rfc/rfc8949.html#name-examples-of-encoded-cbor-da
>> there is a table with some example values given in Diagnostic Notation and how they are to be encoded in CBOR.
>>
>> A problem with this is that the appendix is not marked as "non-normative" although it it is (apparently…)
> 
> It is not marked as informative because it is normative.
> As far as examples can be normative, of course.
> But if your CBOR diagnostic notation implementation does not handle these examples as given, it is not a CBOR diagnostic notation implementation.
> 
>> based on Rule 2 in section 4.2.2.
> 
> CBOR diagnostic notation is a readable representation for what is actually being interchanged.
> If your  are changing a 4.0 to a 4, this becomes visible at this level.
> 
>> Why is that a problem? Well, in
>> https://www.ietf.org/archive/id/draft-mcnally-deterministic-cbor-01.html#name-reduction-of-floating-point
>> Rule 1 is (apparently...) applied, which means that "-4.0" would return 0x23 rather than 0xf9c400 proposed in Appendix A as well as by Carsten's CBOR playground (https://cbor.me/)
> 
> Again, diagnostic notation for 0x23 is “-4”.
> Both “-4” and “-4.0” actually have multiple encodings each, with a defined preferred encoding.
> 
>> Taking CBOR to the world of shrink-wrapped software comparable to Open API will undoubtedly require a CBOR interoperability profile.
> 
> You keep saying that.
> 
>> In such a profile, deterministic encoding is a side effect.
> 
> Not at all, as deterministic encoding also does things like determining map ordering, which many applications (and thus their “profiles”) do not need.
> 
> Grüße, Carsten
> 
>