Encoding Control Notation - Uses of ECN

Uses of ECN

An ASN.1 type has a set of abstract values. Encoding rules specify the representation of these abstract values as a series of bits. There are applications in which special encodings, different from those obtainable through any of the standard sets of ASN.1 encoding rules, are required.

Here are some examples of possible situations that require some smaller or larger deviations from the standard encodings:

  • a protocol may require extremely compact encodings; even though the Unaligned Packed Encoding Rules (PER) are generally quite compact, further compactness can be achieved in certain cases by exploiting the statistical distribution of the values of certain fields or by removing other forms of redundancy;
  • a protocol may require that certain parts of an encoded message be easily accessible without the need to decode the whole message with, say, a full PER decoder; in general, jumping into the middle of a PER-encoded message and starting to decode from that point is not a recommended practice, but in certain cases this may be necessary or useful; in such cases, access to particular parts of an encoding can be facilitated and made reliable by specifying a modified version of PER;
  • there are some standard protocols that encode their data in a tag-length-value (TLV) format similar to BER; one might want to create a formal ASN.1 specification for one of those protocols and specify a modified version of BER that matches the ad-hoc TLV format;
  • there are many standard protocols that encode their data in an ad-hoc binary format (usually specified with tables), which may differ significantly from PER or any other set of ASN.1 encoding rules; one might want to create a formal ASN.1 specification for one of those protocols and specify a binary encoding that matches the ad-hoc format.

In the above cases and in many other similar cases, the combined use of ASN.1 and ECN makes it possible to create a full, formal specification of both abstract syntax (schema) and encodings. Encoders and decoders can then be automatically generated from the combined specifications. This is a significant factor in reducing both the amount of work and the possibility of errors in making interoperable systems. Another significant advantage of ECN is the ability to provide automatic tool support for testing. These advantages are available with ASN.1 alone when standardized encoding rules suffice, but ECN provides these advantages in circumstances where the standardized encoding rules are not sufficient.

Read more about this topic:  Encoding Control Notation