4 classes of types are distinguished. The class is encoded
in bits 8 and 7 of the first octet of the identifier.
Table: Identifier Classes
Two forms of Identifier are distinguished by bit 6 of the
First Identifier Octet:
apply across all applications - basic types defined in ASN.1
local to a specific application but global within that application.
within a restricted context of the application, e.g. tags within a set or
arbitrary identifiers chosen by the ;SPM_quot;user;SPM_quot;.
The construction of extension octets is by the following
The element is atomic.
The element has contents - one or more
primitive or constructor elements.
The last five bits (bits 5 to 1) of the first Identifier
Octet and any extension Octets are used to construct the ID
code of the element.
Within 1 Octet up to 30 identifiers may be defined.
Further identifiers are formed with Extension Octets.
Valid ID Code octets will take the form:
The Length specifies the length in octets of the contents of
the element. It is itself variable in length, taking 3
forms shown in table #tbt71#1609>.
Bits 5-1 of Octet 1 are all set to 1.
Each extension Octet encodes the remaining binary
value, the last Octet having bit 8 clear.
Thus bits 7-1 of all extension octets
plus bits 7-1 of the last octet are concatenated to form
one bitfield encoding the unsigned binary integer ID
The ID code is formed from the shortest number of
Octets possible: no leading extension octets can have
bit 8 clear.
Table: Length encodings
The Interpretation of the contents field depends upon the ID
Code and any context dependency implied by the ASN.1
specification. Octets are sequenced exactly as the ASN.1
order implies: linear order of items in a specification
occupy successive Octets of the contents.
Read the ASN.1 spec from top to bottom!
Read each item from left to right!