[Cbor] Illogical handling of CBOR keys
Anders Rundgren <anders.rundgren.net@gmail.com> Wed, 24 July 2024 19:39 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 671CCC06ECA4 for <cbor@ietfa.amsl.com>; Wed, 24 Jul 2024 12:39:27 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.104
X-Spam-Level:
X-Spam-Status: No, score=-2.104 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_BLOCKED=0.001, RCVD_IN_ZEN_BLOCKED_OPENDNS=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-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=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 Y9ZckwFFS81V for <cbor@ietfa.amsl.com>; Wed, 24 Jul 2024 12:39:23 -0700 (PDT)
Received: from mail-wr1-x429.google.com (mail-wr1-x429.google.com [IPv6:2a00:1450:4864:20::429]) (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 2CC62C06ECB2 for <cbor@ietf.org>; Wed, 24 Jul 2024 12:39:04 -0700 (PDT)
Received: by mail-wr1-x429.google.com with SMTP id ffacd0b85a97d-367990aaef3so73226f8f.0 for <cbor@ietf.org>; Wed, 24 Jul 2024 12:39:04 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1721849942; x=1722454742; darn=ietf.org; h=content-transfer-encoding:subject:from:to:content-language :user-agent:mime-version:date:message-id:from:to:cc:subject:date :message-id:reply-to; bh=iymFP/cuaSibR6WqAR10MI/aQWTY65xMkXr9qT9T+IA=; b=it6uYLXQ5y4VoYUEOURkI4vDALNrDvO+KEMbLHIzQm93Eg9fSk195Y0GYWogHuWHnt zG/uQ2CQBgo2QI7JZVLQANhbqiBxpwgrrb77HpxoKM47UXtwWvTn0sD331aB+poQKzM0 GKcdfzn14+Y8NuYS+WhEqPDl4sowSoisG03M6eeeQUqLKk4Tyu2IqMv99KAuzBO+XOBt zNPs7RehRn302yWWtradc9oVZYpTRIdtwlciEXg4EORHN9F0p590N54mQvekGnBrhym/ 5hWCJen/YTE8l65hCW0LmgHqffXy3hCIVJNt/YY/StP4SQFwhLnHhK2pYg4+KXxb8px+ u1Og==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1721849942; x=1722454742; h=content-transfer-encoding:subject:from:to:content-language :user-agent:mime-version:date:message-id:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=iymFP/cuaSibR6WqAR10MI/aQWTY65xMkXr9qT9T+IA=; b=TKz4tEYGyaiRD0LzMnD7lTy4P/YwfOGfLBZtIrm/z9sAeEbAKrY4aieYjPSokvvqkX 9RgBvLLuzX5CWKkOa92NegLjsXjJOUmkdPGy/P4Pps0PB2+qJ7rBZF5f07vFnF0Qi5XP 1/xQd0DwVUoZiU++1KNrIJW+LdZ2dzF+dkxcG11XuFhib5kF2X+YaoSjPt2kEJr7V/89 TxIqPYVNXCLcVT9fL27OUvIyUgfe/4mY7HBKVWIvtV0zB+LARWqADR0pSzLHrz/Dtkh8 Kgeqlh5iOBDyGZC0rFxSoVgFe4iN8fO0hvOXaRx23Qz3FrQHerAWs5E/kDsYqnkGZehN SJRg==
X-Gm-Message-State: AOJu0YwTMefxysQ88DLqSnLviq2n6Lk81FjvRCV4X2XXAq7bsv/yxapk XzIqFtyJkXgnYn2VpZFhqYjD+ksQ0ZlTrZ/PD+ji12yOcdT6XPCgCpdVZQ==
X-Google-Smtp-Source: AGHT+IE8PzoYreskrGxSGJWMpZjAToHNvRkdIqRp/sD8XvOslrxnL9ACT0S+D+jmFXzp05CeNz1Ecg==
X-Received: by 2002:adf:fb0b:0:b0:360:96d8:ab7c with SMTP id ffacd0b85a97d-36b319e2e5fmr473783f8f.11.1721849941725; Wed, 24 Jul 2024 12:39:01 -0700 (PDT)
Received: from ?IPV6:2a01:e0a:e1b:64b0:85d3:bb06:4cc4:d62e? ([2a01:e0a:e1b:64b0:85d3:bb06:4cc4:d62e]) by smtp.googlemail.com with ESMTPSA id ffacd0b85a97d-3687868b262sm15111229f8f.30.2024.07.24.12.39.00 for <cbor@ietf.org> (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 24 Jul 2024 12:39:01 -0700 (PDT)
Message-ID: <6de79105-257b-4af7-aa9a-b74db488dfa1@gmail.com>
Date: Wed, 24 Jul 2024 21:39:00 +0200
MIME-Version: 1.0
User-Agent: Mozilla Thunderbird
Content-Language: en-US
To: "cbor@ietf.org" <cbor@ietf.org>
From: Anders Rundgren <anders.rundgren.net@gmail.com>
Content-Type: text/plain; charset="UTF-8"; format="flowed"
Content-Transfer-Encoding: 8bit
Message-ID-Hash: 343GIFWGBQ6KVRTJ5QHRBFD5PA2TMGRH
X-Message-ID-Hash: 343GIFWGBQ6KVRTJ5QHRBFD5PA2TMGRH
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
X-Mailman-Version: 3.3.9rc4
Precedence: list
Subject: [Cbor] Illogical handling of CBOR keys
List-Id: "Concise Binary Object Representation (CBOR)" <cbor.ietf.org>
Archived-At: <https://mailarchive.ietf.org/arch/msg/cbor/8EU8dig5muFWFVh455CJ64SCj6A>
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>
Related to CDE. https://www.rfc-editor.org/rfc/rfc8949#section-5.6 According to this section 0.0 and -0.0 are equivalent but only when used as keys. This does not make sense in a high-level encoder/decoder design where keys are just CBOR data items: https://cyberphone.github.io/javaapi/org/webpki/cbor/CBORMap.html#set(org.webpki.cbor.CBORObject,org.webpki.cbor.CBORObject) Question: does CDE compliance require you to follow this rule? According to the same section, JavaScript values 1 and 1.0 are equivalent which either imply numeric reduction or some special handling of keys. In the TC 39 proposal, keys are just CBOR data items: https://cyberphone.github.io/CBOR.js/doc/#cbor.map.set Since CDE compliance requires integer and floating point values to be separated, I assume that this is not really applicable. Anders
- [Cbor] Illogical handling of CBOR keys Anders Rundgren
- [Cbor] Re: Illogical handling of CBOR keys Carsten Bormann
- [Cbor] Re: Illogical handling of CBOR keys Anders Rundgren