In ASN.1 all objects actually transmitted are encoded as
octets or sequences of octets (see #fn79#1584>. There is a standard encoding
schema which allows for extensions, and permits length-
delimited and typecast objects to be constructed.
The representation of Octets and Octet-Sequences should
always conform to the ISO/CCITT standard to ensure ordering
and identification of Octets and Bits within Octets remains
correct. This is simply defined as:
All objects are finally represented as an ordered
sequence of OCTETS.
Objects are length delimited - a 'counted' sequence of
New types of object can be defined out of the 'raw'
Figure: Bit/Octet Ordering in Concrete Ordering
The Data Element The basic unit of an ASN.1 specification is
the data element or element for short. This is a variable
length object but always has three fields (each of variable
Octet #tex2html_wrap_inline4222# is to the left of Octet i
Bit #tex2html_wrap_inline4224# is to the left of bit j
;SPM_quot;first;SPM_quot; and ;SPM_quot;last;SPM_quot; refer to leftmost or rightmost
depending on whether bits or octets are being referred
;SPM_quot;LSB;SPM_quot; and ;SPM_quot;MSB;SPM_quot; refer to least and most significant BIT
The identifier determines the interpretation of the
The contents may itself be a data element or
combination of elements defined by context or
The size and encoding of each of these 'fields' depends
on circumstances as laid out below.
the Identifier Field
This Field is one or more octets in length, and
identifies the 'type' of element. This in turn governs
the interpretation of the contents field.
The field consists of a number of sub-fields, bit-
sequences which encode various attributes of the
identifier and by extension its contents part.
Class (two bits) defining the 'scope' of the
identifier within this and other specifications.
Form (one bit) defining the 'nature' of the
contents, simple or complex.
Code (upwards of 5 bits) encoding the 'identity'
of the identifier, the (possibly context-
dependent) mark that allows it's recognition.
The context of the Code is determined by the