Identifier octets X.690
1 identifier octets
1.1 types
1.2 encoding
1.3 long form
identifier octets
types
data (especially members of sequences , sets , choices) can tagged unique tag number (shown in asn.1 within square brackets []) distinguish data other members. such tags can implicit (where encoded tlv tag of value instead of using base type tlv tag) or explicit (where tag used in constructed tlv wraps base type tlv). default tagging style explicit, unless implicit set @ asn.1 module-level. such tags have default class of context-specific, can overridden using class name in front of tag.
the encoding of choice value same encoding of value of chosen type. encoding may primitive or constructed, depending on chosen type. tag used in identifier octets tag of chosen type, specified in asn.1 definition of chosen type..
the following tags native asn.1:
encoding
the identifier octets encode element type asn.1 tag, consisting of class , number, , whether contents octets represent constructed or primitive value. note types can have values either primitive or constructed encodings. encoded 1 or more octets.
in initial octet, bit 6 encodes whether type primitive or constructed, bit 7–8 encode class of type, , bits 1–5 encode tag number. following values possible:
long form
where identifier not universal, tag number may large 5-bit tag field, encoded in further octets.
the initial octet encodes class , primitive/constructed before, , bits 1–5 1. tag number encoded in following octets, bit 8 of each 1 if there more octets, , bits 1–7 encode tag number. tag number bits combined, big-endian, encode tag number. least number of following octets should encoded; is, bits 1–7 should not 0 in first following octet.
Comments
Post a Comment