Re: [Cbor] Unusual map labels, dCBOR and interop

Anders Rundgren <anders.rundgren.net@gmail.com> Sun, 24 March 2024 20:37 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 ED722C14F61E for <cbor@ietfa.amsl.com>; Sun, 24 Mar 2024 13:37:15 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.106
X-Spam-Level:
X-Spam-Status: No, score=-2.106 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, 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 7zPrxzXADCZY for <cbor@ietfa.amsl.com>; Sun, 24 Mar 2024 13:37:11 -0700 (PDT)
Received: from mail-lj1-x233.google.com (mail-lj1-x233.google.com [IPv6:2a00:1450:4864:20::233]) (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 CD912C14F5EF for <cbor@ietf.org>; Sun, 24 Mar 2024 13:37:11 -0700 (PDT)
Received: by mail-lj1-x233.google.com with SMTP id 38308e7fff4ca-2d6c9678cbdso16935291fa.2 for <cbor@ietf.org>; Sun, 24 Mar 2024 13:37:11 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1711312630; x=1711917430; 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=hkly7mg1A82SXPCwgJJuPxu9upTnOv9UqBnIlf8c+y0=; b=nQirEe23JzWdhO78mOYsbYN1Xi0TOy7XNJDHczZhhmfnP4LTnDiVumeAt+OEM8zdmk XKKeis84qudhxT60zT2vTWxBu8IOrCUx7dELhsTgpxW+OQ7Mnx41gqAX+otgleYLqGQB PK+yPIfzVpPTN/DYsby+DWKPIVjO4I55M4g8p0mzMIi5nzIerFV/Zl6OqvmwPZZFi0zr AS44I9WzI+X/bUJxAUh2l+VpCHwkfZoL3IGgMgn1oAOLIUirJMyPv119AJlJ+wIenXIu O7HUhs7Wj9iPYhsoUqeb3NZQ6ebRUVD5r+KieVxp6GokKrmk46/WLQWWM89e7fci8Q1I aspA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1711312630; x=1711917430; 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=hkly7mg1A82SXPCwgJJuPxu9upTnOv9UqBnIlf8c+y0=; b=eneftWwugdCGf7y7hM9Qu+INvvGv+fGF63TAZ+U3xe8m6URzp0CRRwy1PwpnmjPjjw zFgIMqR/fEWrnT/fI/OjpQINJKy292icZk9J80YIn4+TLy1ivl30682poeOQ5oCN+B+W 5LT+CjZA7skFSMT13GtZHcr096Hv3u3lBVgwLYPQJvg29GXl0MOjO7n5MKjDG0YhnMQr NPfQqsMOV8UQ8bJdAVx5c3wXSkjIt+IjpmiukT8my8xU07RQ3yU8q8rIPGfORx2A5yVH IQNF9R70/8Yo20m96mg6Xa1I+tHOk7nDdfsqvfRy/0i4Q3AWaBtaPGo/bwwCvKluHfsj CHgA==
X-Gm-Message-State: AOJu0YxgF1mOluyFPLkB9yCQ7mFja79oPAF/PgTz+Tanx/H0pAM4CwbQ J/6ArKHmWmBiiv6VpOrWP7nZVVF6gRkPiWck2ZbAoSlfkOGiYnDU1aLt03C2
X-Google-Smtp-Source: AGHT+IEjLCPSEWOFiPbUgIunSQQjQwuu8jASMOreFTJPfJdXIGwocGaf3GI9LAy6xySnUYAQRGW8dg==
X-Received: by 2002:a2e:8e96:0:b0:2d4:9fbe:b5f with SMTP id z22-20020a2e8e96000000b002d49fbe0b5fmr2710835ljk.36.1711312629685; Sun, 24 Mar 2024 13:37:09 -0700 (PDT)
Received: from ?IPV6:2a01:e0a:e1b:64b0:e1ec:b9bc:a0e4:6cca? ([2a01:e0a:e1b:64b0:e1ec:b9bc:a0e4:6cca]) by smtp.googlemail.com with ESMTPSA id f20-20020a05600c155400b0041477f3f99fsm6103491wmg.30.2024.03.24.13.37.08 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 24 Mar 2024 13:37:09 -0700 (PDT)
Message-ID: <cfff2fab-2b6b-4278-bab0-d5df7b12e3e4@gmail.com>
Date: Sun, 24 Mar 2024 21:37:07 +0100
MIME-Version: 1.0
User-Agent: Mozilla Thunderbird
To: "lgl island-resort.com" <lgl@island-resort.com>, Carsten Bormann <cabo@tzi.org>
Cc: "cbor@ietf.org" <cbor@ietf.org>
References: <8C245824-1990-4616-AB70-FFD4FACB1AE9@island-resort.com> <11E8A8A5-D891-49FF-AF16-697C06F463B3@tzi.org> <9A0CE364-C141-4EBE-9703-292C416D12F5@island-resort.com> <3D62C4F0-D570-4EE4-AF6A-163C708AA6BE@tzi.org> <58BA8F8C-0C63-4534-9BF7-255C32D02C16@island-resort.com>
Content-Language: en-US
From: Anders Rundgren <anders.rundgren.net@gmail.com>
In-Reply-To: <58BA8F8C-0C63-4534-9BF7-255C32D02C16@island-resort.com>
Content-Type: text/plain; charset="UTF-8"; format="flowed"
Content-Transfer-Encoding: 8bit
Archived-At: <https://mailarchive.ietf.org/arch/msg/cbor/Q9Yzx4rIcnBhKBrzBPK80gW8TpM>
Subject: Re: [Cbor] Unusual map labels, dCBOR and interop
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, 24 Mar 2024 20:37:16 -0000

On 2024-03-24 20:21, lgl island-resort.com wrote:
> 
<snip>
> 
> For dCBOR, I’d like to see map labels very restricted. I’m not a JSON user/expert, but it is a Jupiter-sized data point for me. It has massive use with only string labels.

What's the motive for bringing in constrains that are specific to the Blockchain Commons implementations into something intended as a multi-purpose IETF encoding profile/standard?  Lots of CBOR applications (probably the majority) already have this and other constraints but did not require a separate encoding standard to specify these.  Why can't Wolf et al do the same?

The only thing dCBOR needs to specify is the Numeric Reduction scheme.

> 
> I’ll propose integers and strings (major types 0-3) to start discussion. Maps and arrays seem too much. Only strings might be OK.
> 
> We’ll need Wolf and Christopher to weigh in. I haven’t heard from them lately.
> 
> I can imagine many use cases other than the Gordian Envelope finding dCBOR highly desirable because it eliminates all the CBOR stuff that is variable and a lot of stuff that is hard to understand. Most people aren’t as smart or as into this stuff as we are. Simple map labels line up with this.

Numeric Reduction will keep the use-cases to an absolute minimum.

Anders


> 
> 
>> (One of the things I wrote cn-cbor for in 2013 was to make sure one could do CBOR in a limited amount of code, as in some 768 bytes (not megabytes, not kilobytes); it did not need a restriction on map keys for that.  But of course the application code that is dealing with the data items once decoded is more complex when the data items are more complex, and that is not included in those 3/4 KiB.)
> 
> (It’s cool that you can build a tiny CBOR decoder and make object code size claims, but such may not be as easy to use or code-size efficient for larger stacks like SUIT and EAT. If a CBOR library does more of the work for you, then you have to write less code, not think as hard and test less. The code-size efficiency comes because there’s only one chunk of object code for common functions like map lookup by label and bstr wrapping/unwrapping. If the CBOR library is shared, then sharing is across all CBOR apps on the device.
> 
> As I’ve built out a stack for COSE and EAT, I’ve moved common functions into QCBOR. It makes QCBOR bigger, but the overall stack smaller.)
> 
> LL
> 
> 
> 
> 
> _______________________________________________
> CBOR mailing list
> CBOR@ietf.org
> https://www.ietf.org/mailman/listinfo/cbor