Slide 16 of 41
Notes:
It is important here to avoid giving the impression that ASN.1 supports only a TLV style of encoding, and this slide gives a quick look at the so-called Packed Encoding Rules which were introduced in 1994.
These rules generally encode things into a (fixed for the type) minimum number of bits, so length fields can often be omitted. Similarly, the “T” part is only logically needed to avoid ambiguity in choices, optional elements, etc, and again is not routinely used in PER. PER is not a TLV style of encoding.
The PER encoding is much more akin to the sorts of encodings produced by the “bits and bytes” approach described earlier, and is generally much more efficient that with BER.
PER has its own mechanisms of resolving potential ambiguity, and of enabling version 1 systems to detect and to delimit added version 2 material. These mechanisms are described much later in the course.
However, the same ASN.1 notation for type definitions is still used, and the rules on providing unambiguous tags (in case they are needed for a BER encoding!) are still present as “rules for writing correct ASN.1”.
In fact, although PER does not encode tags, it exploit the fact that all elements have tags which are required to be unique in certain contexts (for example, the alternatives of a CHOICE)