[Cbor] Re: [core] CBOR-YANG/SID

Carsten Bormann <cabo@tzi.org> Tue, 06 August 2024 18:45 UTC

Return-Path: <cabo@tzi.org>
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 764BEC1519A8 for <cbor@ietfa.amsl.com>; Tue, 6 Aug 2024 11:45:13 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.91
X-Spam-Level:
X-Spam-Status: No, score=-1.91 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01] autolearn=ham autolearn_force=no
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 dtl7M3rzorKh for <cbor@ietfa.amsl.com>; Tue, 6 Aug 2024 11:45:10 -0700 (PDT)
Received: from smtp.zfn.uni-bremen.de (smtp.zfn.uni-bremen.de [IPv6:2001:638:708:32::21]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-256) server-digest SHA256) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 71E96C1519A0 for <cbor@ietf.org>; Tue, 6 Aug 2024 11:45:09 -0700 (PDT)
Received: from smtpclient.apple (p5dc5d809.dip0.t-ipconnect.de [93.197.216.9]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.zfn.uni-bremen.de (Postfix) with ESMTPSA id 4Wdj0d4KpBzDCd9; Tue, 6 Aug 2024 20:45:05 +0200 (CEST)
Content-Type: text/plain; charset="utf-8"
Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3776.700.51\))
From: Carsten Bormann <cabo@tzi.org>
In-Reply-To: <21644.1722960741@obiwan.sandelman.ca>
Date: Tue, 06 Aug 2024 20:44:54 +0200
Content-Transfer-Encoding: quoted-printable
Message-Id: <0B7059B4-0F19-40C8-BF2F-E1D796F460AD@tzi.org>
References: <24615.1722628087@obiwan.sandelman.ca> <7E75452A-79A5-4B8B-9E6A-9CEF1C090D14@tzi.org> <12239.1722797673@obiwan.sandelman.ca> <2CC71993-140E-415F-89D9-2273F11FCC49@tzi.org> <21644.1722960741@obiwan.sandelman.ca>
To: Michael Richardson <mcr+ietf@sandelman.ca>
X-Mailer: Apple Mail (2.3776.700.51)
Message-ID-Hash: ZFKCM5BJODCHHLWKTNYSRQ5QD5P6YSDB
X-Message-ID-Hash: ZFKCM5BJODCHHLWKTNYSRQ5QD5P6YSDB
X-MailFrom: cabo@tzi.org
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 <cbor@ietf.org>
X-Mailman-Version: 3.3.9rc4
Precedence: list
Subject: [Cbor] Re: [core] CBOR-YANG/SID
List-Id: "Concise Binary Object Representation (CBOR)" <cbor.ietf.org>
Archived-At: <https://mailarchive.ietf.org/arch/msg/cbor/QVKG1C17Ha2k-stbwntCsU_rXec>
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>

>> Any opinions on how best to include hex-string, phys-address, and
>> mac-address from 6991 welcome (preferably with a single tag, because
>> the syntax is the same: (preferred lowercase) two-digit hex bytes
>> separated by colons).
> 
> I'm not sure I understand the question.
> I think that mac-address and hex-string should be binary on the wire, not hex.
> and no colons.  Effectively a bstr.  But, I think you might be asking what
> CBOR tag we put in front of it?

This.

We have tag 48 for MAC addresses, which has semantics (MAC address) as well as a representation format (directly as byte string).

hex-string, phys-address, and mac-address are semantically byte strings that all three have the same text-based representation format: colon-separated pairs of hex digits (3:1 expansion, well 3n-1).  Using the tag 48 we already have hit the byte string representation semantics (even though mac-address itself is restricted to exactly 6 bytes), but not necessarily the application semantics.  Decoders might reject any values that are not exactly 6 bytes or already start to interpret them as MAC addresses.  So it seems we can’t use tag 48 and need to allocate another tag (which will logically be part of the set described in Section 3.4.5.2, i.e., tag 21 to 23, for base64url, base64 classic, uppercase hex, even if it won’t be focused just on JSON).  Probably from 1+1 space.

Grüße, Carsten