The original CCITT Recommendation X.409, which first standardised the notation known today as ASN.1, included also a set of encoding rules. The intent of designers (it was in 1983) was to define a universal set of encoding rules which could be built into every system. Encoding would simply become a protocol. It was proposed to be used in all the RM OSI layers, but it failed for a number of non-technical reasons.
The BER generate encoding of class known as type - length - value (TLV), because the basis of encoding is a structure made up of those three parts. Many encoding schemes employ this structure, however only few of them apply this scheme as consistently as BER. That three parts are termed as Identifier, Length and Contents. Each part of encoding has an integral number of octets.
This structure can be simple:
Identifier |
Length |
Contents |
or nested in case of constructed types:
Identifier |
Length |
|
The Identifier conveys three pieces of information
The Length allows the end of the contents to be found. The receiving system need not understand the tag to find the end of contents and it allows encoding to be skipped if it cannot be decoded.
The Contents is the substance of the encoding, conveying the actual value.