asn.1

What ASN.1 type does the tag 0x0F (decimal 15) correspond to? Is it undefined?


Question is in the title. When I went through all defined primitive types, I got 0x01 through 0x22 (34) basically, but 0 and 0x0F (15) seem not defined.


Solution

  • The Recommendation ITU-T X.680 | ISO/IEC 8824-1 that specifies ASN.1 contains the following table (on page 14 in the PDF version):

    number description
    UNIVERSAL 0 Reserved for use by the encoding rules
    UNIVERSAL 1 Boolean type
    UNIVERSAL 2 Integer type
    UNIVERSAL 3 Bitstring type
    UNIVERSAL 4 Octetstring type
    UNIVERSAL 5 Null type
    UNIVERSAL 6 Object identifier type
    UNIVERSAL 7 Object descriptor type
    UNIVERSAL 8 External type and Instance-of type
    UNIVERSAL 9 Real type
    UNIVERSAL 10 Enumerated type
    UNIVERSAL 11 Embedded-pdv type
    UNIVERSAL 12 UTF8String type
    UNIVERSAL 13 Relative object identifier type
    UNIVERSAL 14 The time type
    UNIVERSAL 15 Reserved for future editions of this Recommendation | International Standard
    UNIVERSAL 16 Sequence and Sequence-of types
    UNIVERSAL 17 Set and Set-of types
    UNIVERSAL 18-22, 25-30 Character string types
    UNIVERSAL 23-24 UTCTime and GeneralizedTime
    UNIVERSAL 31-34 DATE, TIME-OF-DAY, DATE-TIME and DURATION respectively
    UNIVERSAL 35 OID internationalized resource identifier type
    UNIVERSAL 36 Relative OID internationalized resource identifier type
    UNIVERSAL 37-... Reserved for addenda to this Recommendation | International Standard

    So 0x00, 0x0F and 0x25 and above are reserved, 0 for internal use and the others for "future editions" and "addenda". It is not clear what these future uses can be, but the position at exactly the 0xf border may point to some kind of memory/storage related uses.