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.
-
All objects are finally represented as an ordered
sequence of OCTETS.
-
Objects are length delimited - a 'counted' sequence of
octets.
-
New types of object can be defined out of the 'raw'
defined objects.
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:
#figure1587#
Figure: Bit/Octet Ordering in Concrete Ordering
-
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
to.
-
;SPM_quot;LSB;SPM_quot; and ;SPM_quot;MSB;SPM_quot; refer to least and most significant BIT
respectively
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
length):
verbatim57
-
The identifier determines the interpretation of the
contents.
-
The contents may itself be a data element or
combination of elements defined by context or
specification.
-
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
Class.