Subject: Re: [Cbor] Benjamin Kaduk's No Objection on draft-ietf-cbor-tags-oid-06: (with COMMENT)

From: Carsten Bormann <[email-masked]>
Date: Wed, 19 May 2021 16:32:20 +0200

On 2021-04-08, at 10:00, Carsten Bormann <[email-masked]> wrote:
> 
>> Section 2
>> 
>>  Tag TBD110: tags a byte string as the [X.690] encoding of a relative
>>  object identifier (also "relative OID").  Since the encoding of each
>>  number is the same as for [RFC6256] Self-Delimiting Numeric Values
>>  (SDNVs), this tag can also be used for tagging a byte string that
>>  contains a sequence of zero or more SDNVs.
>> 
>> I did not think that CBOR was prone to reusing tag values for types that
>> are semantically different but happen to have the same binary encoding
>> rules.  Should generic SDNVs get a dedicated tag?
> 
> Relative OIDs by their nature need context to interpret them.
> The same kind of context could say that they are really SDNV sequences outside the OID mechanism.
> Saying “this is an SDNV sequence but I won’t tell you how to use it” isn’t particularly useful.
> New tags could be allocated when specific non-OID SDNV usage patterns emerge.

And, after some more discussion today in the CBOR interim today, we made a small change to make this more obvious:

https://github.com/cbor-wg/cbor-oid/commit/64af0b#diff-9c4233

 Since the encoding of each
 number is the same as for {{-sdnv}} Self-Delimiting Numeric Values
 (SDNVs), this tag can also be used for tagging a byte string that
-contains a sequence of zero or more SDNVs.
+contains a sequence of zero or more SDNVs (or a more
+application-specific tag can be created for such an application).

Thank you for bringing this up; this is clearly a detail many would have missed!

Grüße, Carsten