Thank you Carsten for the clarification, if you don't mind me asking one more
question, am I correct in thinking that this:
map-example {
17 => int,
* label => values
}
would not allow for any poetry to be sent at label 17, because 17 is not
optional in that case? Or is it still the case that the extension line would
allow them, and that 17 ^ => int is preferable?
Thank you,
Amaury
________________________________
From: Carsten Bormann <[email protected]>
Sent: 01 December 2025 14:39
To: Amaury Chamayou <[email protected]>
Cc: Orie <[email protected]>; Rohan Mahy <[email protected]>; Henk Birkholz
<[email protected]>; cose <[email protected]>
Subject: [COSE] Re: [EXTERNAL] Re: Example EDN in
draft-ietf-cose-merkle-tree-proofs-17
On Dec 1, 2025, at 15:23, Amaury Chamayou
<[email protected]> wrote:
>
> So this bit of CDDL would seemingly allow a COSE_Key with labels 2 to 5 set
> to basically any value, according to
> https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.rfc-editor.org%2Frfc%2Frfc8610%23section-3.5.4&data=05%7C02%7CAmaury.Chamayou%40microsoft.com%7C5456bb350076486be8f108de30e78717%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C639001968144182670%7CUnknown%7CTWFpbGZsb3d8eyJFbXB0eU1hcGkiOnRydWUsIlYiOiIwLjAuMDAwMCIsIlAiOiJXaW4zMiIsIkFOIjoiTWFpbCIsIldUIjoyfQ%3D%3D%7C0%7C%7C%7C&sdata=tfrGVS5Mk2a%2FBqTlDOvymT08M2lXDFfSNJvMPa0gEXw%3D&reserved=0<https://www.rfc-editor.org/rfc/rfc8610#section-3.5.4>,
> which seems unlikely to be the intent.
The whole CDDL line
* label => values
may be used to encode values that are unlikely to be the intent:
E.g., I can send label 17 with a poem by the German psychiatrist Heinrich
Hoffmann as the value.
In practice, this wildcard line assumes that the recipient has ways to validate
matching map entries by means that are not described in the CDDL.
(CDDL does have sockets, which can be used to give the extensibility more
structure, but they are not used here.)
What a cut can change here as per the definition in Section 3.5.4 of RFC 8610
is to not accept this wildcard definition in those cases where a map key
already matched a previous definition.
In many cases, this is better than accepting it when the value didn’t match;
i.e., we limit the extensibility to new cases with new labels, and don’t allow
the wildcard to accept additional values for a new case with an existing label.
Grüße, Carsten
_______________________________________________
COSE mailing list -- [email protected]
To unsubscribe send an email to [email protected]
_______________________________________________
COSE mailing list -- [email protected]
To unsubscribe send an email to [email protected]