[Drip] Re: [Cbor] Request for CBOR/CDDL review
Daniel Migault <mglt.ietf@gmail.com> Thu, 24 October 2024 02:22 UTC
Return-Path: <mglt.ietf@gmail.com>
X-Original-To: tm-rid@ietfa.amsl.com
Delivered-To: tm-rid@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id CF90FC151082; Wed, 23 Oct 2024 19:22: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, HTML_MESSAGE=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] 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 Tu6Ha-O5Uz0d; Wed, 23 Oct 2024 19:22:15 -0700 (PDT)
Received: from mail-ot1-x334.google.com (mail-ot1-x334.google.com [IPv6:2607:f8b0:4864:20::334]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature ECDSA (P-256) server-digest SHA256) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 2A379C14F6EC; Wed, 23 Oct 2024 19:22:15 -0700 (PDT)
Received: by mail-ot1-x334.google.com with SMTP id 46e09a7af769-7092dd03223so179689a34.1; Wed, 23 Oct 2024 19:22:15 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1729736534; x=1730341334; darn=ietf.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=P3pVeH6te2R3w2kOn6pVMFKRdB/xEfWJXPHaknwERyU=; b=Qx+P7O2yOnUAoBf6WVLctIVp3at7mLaAkSEU4PcRC0MZnAwKumUosOXH2ve76/Lo0C ZgssUY6hBOMEuHZ7XoTBET8/dONCAWzAWW5LcGRsqdsZjIr+roLk1PWYWF5ArK+NFMyB OWNrhHso9y44L0o/opvLsWWy4bP5aGY7c0r1QMFtg8PmYVs64bWdxvcbo0qy+rKR8rvg YyahwRnWxOEtK8af6IcQwgkL7JYHYmBtycPGqZ+Q58IoYO6zvQuxTNA+xM47AcwiMmQt H3sC3fKcfPCi4rO83186brbLvZSyW2Bcyt62kn+yHkHB2u8yFQJz4AbVU3Q1hYRNMrPU DH2A==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1729736534; x=1730341334; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=P3pVeH6te2R3w2kOn6pVMFKRdB/xEfWJXPHaknwERyU=; b=AHwGIEMSkrTfmaRNoKFUPqs90snvXKGfJdPQThGmQjMqi3mCFTtiTdPeywp7Wm8NHy zJZqLujNVRkPeSZ8LqC2ktvyUP1wgl+ViZh0QW+WnstRmwnlx2qFFBnmrr986olJk1Yg XSqhLVtEoiHelu4hN1A8QA22ukz4cZrv9Qq5NGmkVHfjs9J7p/QwVzSGeo5YPUqpDUel Zmvi94V8BDSQuo86AIYQoc+iSV/l+FZ24SoZXyV4X4RcYX6Qr1xcMkEr3XLj0rWjq4zz 0LHjSSRnAgbgQwKlwfCqALPUsFVd5s86+ETZIBp5aP2gDAzvH6UzbtZJi4aE7sGyJfPe e/6g==
X-Forwarded-Encrypted: i=1; AJvYcCUjXwFeRtjnYwEds+hBYYIQbDKBrP9uS9P5VqW7+0cAgz/v+f5wQCxxf5TZ2kILpkcSQEuCLHp8@ietf.org, AJvYcCXD/WAdaR7rS87y+ZAS8uL89bIX/BYu3rUROgCADZfCUdUd1KlZbeBJpQ607eAdr/0Icr1m@ietf.org
X-Gm-Message-State: AOJu0YyRn58+2+iEuUUQC/3ba4OSaTX68fa+PQEyug1SQq6KF0bTOlFn gwNxnpx59+3h2WEa0riHLY5QMzXwuhev0AS4x9gYLyxuy6j1yMMnFWVHjpTP4BaHU8r6wZNC56J 4oDdzZ6O5UZoOnxxHTQW4h8ZQYr0=
X-Google-Smtp-Source: AGHT+IEXrl0SRiIge8Q8PvhIaFPdLouYIacebv+8g2jYiCdOVaggDqcLAH17Q5vSAlfeSfcrggwimEdKl73yf0sBUUw=
X-Received: by 2002:a05:6870:828f:b0:287:0:9ecc with SMTP id 586e51a60fabf-28ccb9888aamr4832756fac.33.1729736534266; Wed, 23 Oct 2024 19:22:14 -0700 (PDT)
MIME-Version: 1.0
References: <SA3PR13MB65154B944CC74588366DB0DE887F2@SA3PR13MB6515.namprd13.prod.outlook.com> <Zxlrn7Yfp9A2hieT@hephaistos.amsuess.com>
In-Reply-To: <Zxlrn7Yfp9A2hieT@hephaistos.amsuess.com>
From: Daniel Migault <mglt.ietf@gmail.com>
Date: Wed, 23 Oct 2024 22:22:02 -0400
Message-ID: <CADZyTkk59Uqut55wXGzYaj7OZ0NEmv0hp+q2+BGW6jwPuq=8xA@mail.gmail.com>
To: Christian Amsüss <christian@amsuess.com>
Content-Type: multipart/alternative; boundary="000000000000ae1c8d06252fab55"
Message-ID-Hash: W7KRCXR3YFVBJBFHCCUSSVI4ESBZ4BPD
X-Message-ID-Hash: W7KRCXR3YFVBJBFHCCUSSVI4ESBZ4BPD
X-MailFrom: mglt.ietf@gmail.com
X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header
CC: Adam Wiethuechter <adam.wiethuechter@axenterprize.com>, "cbor@ietf.org" <cbor@ietf.org>, "tm-rid@ietf.org" <tm-rid@ietf.org>
X-Mailman-Version: 3.3.9rc6
Precedence: list
Subject: [Drip] Re: [Cbor] Request for CBOR/CDDL review
List-Id: Drone Remote Identification Protocol <tm-rid.ietf.org>
Archived-At: <https://mailarchive.ietf.org/arch/msg/tm-rid/XLDUseQsEwVgrqZg_OuvHfjnBeU>
List-Archive: <https://mailarchive.ietf.org/arch/browse/tm-rid>
List-Help: <mailto:tm-rid-request@ietf.org?subject=help>
List-Owner: <mailto:tm-rid-owner@ietf.org>
List-Post: <mailto:tm-rid@ietf.org>
List-Subscribe: <mailto:tm-rid-join@ietf.org>
List-Unsubscribe: <mailto:tm-rid-leave@ietf.org>
Thanks Christian for the feedback. This is very well appreciated.
Cheers!
Daniel
On Wed, Oct 23, 2024 at 5:36 PM Christian Amsüss <christian@amsuess.com>
wrote:
> Hello Adam,
>
> thanks to bringing this to this group's attention; I think I can provide
> some feedback here:
>
> * A.1:
> - The CDDL is serialized in an unconventional way -- .size is a
> control, so the usual form to write would be
>
> tstr .size 15
>
> as opposed to the form with the parentheses. The form used might not
> be wrong (I don't know the grammar well enough to say that), but if
> nothing else it is unusual enough to trip up readers.
>
> (Also applies to B.1)
>
> - Just a remark: uint .size 2 just means any uint in from 0 to 65535,
> inclusive. It has no impact on serialization (which will use 1, 2 or
> 3 octets depending on the value). That is probably what you want, as
> it is the usual behavior of CBOR, let's just be sure you don't
> expect it to always be encoded in 16 bits. Rephrasing the HHIT
> Entity Type description of A.3 may help avoid that impression,
> maybe "This field is a number with values defined in".
>
> Taking that into further context, is there a reason this is limited
> to 16 bits, as the type registry is? If those are only ever to be
> used in CBOR, CBOR readily supports integers up to 64 bit, so this
> might just as well be left open. Unless there is a mandate that the
> CBOR is expressed in preferred encoding or even CDE (deterministic
> encoding), receivers should be ready to receive values in encodings
> up to 64 bit anyway.
>
> - For the #6.TBD you mentioned to be waiting for a draft, I'm not sure
> which draft you are referring to, but you can ask the authors and
> chairs of that document to do an early allocation -- or you use the
> mechanism proposed in draft-bormann-cbor-draft-numbers.
>
> * A.2:
>
> - The text in figure 4 is not correct diagnostic notation: The base64
> value should be b64'WQGC...uAo=' (b64 prefix, single quotes, three
> dots for ellipsis, and the padding is not required)
>
> - Appendix G of 8610 is not a formal definition; we have one in the
> pipeline as draft-ietf-cbor-edn-literals (which is past WGLC,
> although the outcome of IESG processing may be to be sent back to
> the WG for confirmation of some resolution, we'll know in Dublin).
> This also has an ABNF grammar.
>
> Note that diagnostic notation (neither as specified nor in the
> upcoming document) is not intended as an interchange format. To my
> understanding, the presentation format of DNS records is merely a
> convention shared between DNS servers, and not an interchange
> format. If that is the case, the use of EDN is certainly fine -- I
> just find the "MUST be in Extended Diagnostic Notation" odd in that
> case.
>
> (Also applies to B.2)
>
> - Unless IPv6 addresses become valid certificates, there are no IPv6
> addresses in hhit-rr, so the limitation on the base64 representation
> is odd.
>
> * A.3:
>
> - Is Abbreviation intended to be text for human consumption? (From it
> being a text string, and the lack of specific defined content, I'd
> guess so). If so, with ART-ART reviewer hat on, you may want to
> consider whether language and direction information should be
> embeddable here. For that, CBOR has you covered: You can put
> `abbreviation: tstr / tag38` in there (where tag38 is defined in
> RFC9290). How the length limitation is best applied would then
> depend on where that is coming from (which I don't see from this
> document).
>
> If this is not intended for human consumption, or if there are some
> concrete conventions to be upheld (say, only characters from some
> internationally agreed-on set), it may make sense to express those
> constraints if they are sufficiently stable.
>
> * B in general:
>
> - I'm certainly biased working in the area of byte shaving, but I do
> find it odd to see string keys in here. Have you considered just
> using numeric values for the dictionary keys?
>
> Using the EDN extension point of application literals for the e''
> literal type (draft-ietf-cbor-edn-e-ref), CDDL such as
>
> bcast-rr = {
> uas_type => nibble-field,
> uas_ids => [+ uas-id-grp],
> ; abbreviated
> }
> uas_type = 0
> uas_ids = 1
>
> would read in diagnostic notation:
>
> {
> e'uas_type': 0,
> e'uas_ids': [4, h'012001003FFE0001056A2621D4EF572EF5'],
> ...: ...
> }
>
> and be more compact in its representation.
>
> * B.2:
>
> - The example does not match the CDDL: The rule `[+ auth-grp]` creates
> a single array with multiple repetitions of auth-grp, so auths
> should be `[5, b64'QYDQ...dqo', 5, b64'AYDQ...Wgs', 5,
> b64'AYDQ...7gA']`. This saves space, and the CDDL ensures that it is
> understood without the deep structure how the fields are grouped.
> Same goes for uas_ids: According to the CDDL, that should just be
> one level of array.
>
> - There is a mismatch between the label "auth" and "auths".
>
>
> Hope this helps
> Christian
> (who should *really* read up on the state of DRIP, given that properly
> done privacy preserving transponders would be an awesome thing in so
> many more areas than drones)
>
> --
> To use raw power is to make yourself infinitely vulnerable to greater
> powers.
> -- Bene Gesserit axiom
> --
> Tm-rid mailing list -- tm-rid@ietf.org
> To unsubscribe send an email to tm-rid-leave@ietf.org
>
--
Daniel Migault
Ericsson
- [Drip] Request for CBOR/CDDL review Adam Wiethuechter
- [Drip] Re: [Cbor] Request for CBOR/CDDL review Christian Amsüss
- [Drip] Re: [Cbor] Request for CBOR/CDDL review Daniel Migault
- [Drip] Re: [Cbor] Request for CBOR/CDDL review Adam Wiethuechter