01021-1

Which of the ASN.1 tags in the example below can be removed, and which tags are needed for the receiving agent to interpret the information sent to it?

    Family ::= [APPLICATION 1] SEQUENCE
          father [1] Person OPTIONAL,
         mother [2] Person OPTIONAL,
         children [3] SEQUENCE OF Person OPTIONAL }

    Person ::= [APPLICATION 2] CHOICE {
          socialsecuritynumber [1] NumericString,
          phonenumber [2] NumericString,
         name [3] Name }

    Name ::= [APPLICATION 3] CHOICE {
          fullname [1] Fullname,
         shortname [2] Shortname }

    FullName ::= [APPLICATION 4] SET {
          givenname [1] UniversalString,
         surname [2] UniversalString }

    ShortName ::= [APPLICATION 5]
         SET { inititals [1] UniversalString,
         surname [2] UniversalString }

Answer

Below is one of several possible correct answers.

Tags which can be removed are underscored in the answer below:

Family ::= [APPLICATION 1] SEQUENCE {
Not used in shown code
 
father [1] Person OPTIONAL,
only one of the Person types need to be explicitly tagged in order to be different from the other
 
mother [2] Person OPTIONAL,

 
children [3] SEQUENCE OF Person OPTIONAL }
This is the only SEQUENCE OF in the context, so the universal tag for SEQUENCE OF is enough to distinguish it

Person ::= [APPLICATION 2] CHOICE {
Disambiguated earlier
Only one of the NumericStrings need be tagged to disambiguate it from the others
 
socialsecuritynumber [1] NumericString,
 
phonenumber [2] NumericString,
 
name [3] Name }
Has separate tags defined below

Name ::= [APPLICATION 3] CHOICE {
Only used once
 
fullname [1] Fullname, ;
shortname [2] Shortname }
Has separate tags below
 
FullName ::= [APPLICATION 4] SET {
only one of the two types used in Name must have a different tag from the universal tag for SET
 
givenname [1] UniversalString,
surname [2] UniversalString }
Only one in the context need have different tag from the universal tag for UniversalString

ShortName ::= [APPLICATION 5] SET {
 
 
inititals [1] UniversalString,
surname [2] UniversalString }
Only one in the context need have different tag from the universal tag for UniversalString

Note:

A few student misunderstood the question and discussed which ASN.1 types could be removed, not which ASN.1 tags. However, to understand the difference between tags and types/elements is important in understanding both ASN.1 and XML.

List of exam questions