[saag] Relative OIDs are the simpler form of OID (Re: A si mpler form of OID)
Nico Williams <[email protected]>
| Newsgroups | gmane.ietf.saag |
|---|---|
| Message-ID | <aMudlk/weTxP7F+W@ubby> |
> The one thing I really, really like from ASN.1 that I haven't seen an > equivalent of in XML or JSON is the OID, an extensible identifier > format whose length is self describing. [...] FYI the _value_ part of a DER-encoded OID does not indicate how many sub-identifiers there are in the value. The only lengths that are self-described are the lengths of each sub-identifier, not of the whole OID. Anyways, what about using RELATIVE-OID? A relative OID is basically the same as an OID, but the first sub- identifier does not encode the first two arcs of an OID, and also a relative OID is meant to be relative to an [absolute] OID. You could then say that for any given relative OID slot in any given protocol the missing prefix is as specified in the protocol's spec, and you could have a leading arc value for any such relative OID namespace that says all arcs below are private use or to be derived from hashing as you suggested. The point is that you could reuse the OID/RELATIVE-OID encoding, retain the OID registries (such as they are or aren't, though here we could have IANA run each sub-namespace), and get what you wanted but without inventing a new thing nor a new encoding. Neither OIDs nor relative OIDs are self-describing as to length -- you have to convey the length of the encoded OID separately. You could, I suppose, apply your odd/even idea to relative OIDs to get something like what you wanted so that these identifiers are self-describing as to length, or maybe encode the number of sub-identifiers in the first one (or include that count outside the relative OID), or require a fixed number of sub-identifiers. I can imagine an OER-style protocol where knowing that a value is self-describing as to length the length is omitted, sure, but generally OER-style encoding rules omit lengths when they can because of value constraints that fix the value size, and TLV protocols never omit lengths (because they're not as awesome as OER-style encoding rules). Thus I expect that you probably don't need any such value to be self-describing as to length, thus relative OIDs should fit the bill. Nico -- _______________________________________________ saag mailing list -- [email protected] To unsubscribe send an email to [email protected]