Centre for Testing & Interoperability * ETSI Approach * Specification Languages * ASN.1

Abstract Syntax Notation One (ASN.1)

Abstract Syntax Notation One (ASN.1) is a standardized notation used for describing the structure of data carried by messages exchanged between communicating entities. The notation is developed and maintained by ITU-T as ITU-T X.680 to X.683 (ISO/IEC 8824-1 to 4). The latest version was published in November 2008.

ASN.1 is a mature notation with a long record of reliability and interoperability. It supports the exchange of information in any form (audio, video, data.); it has full and direct support of international alphabets. Although ASN.1 is used in applications as diverse as parcel tracking, power distribution and biomedicine, its most extensive use continues to be in telecommunications. Examples of its use include protocol standards for UMTSTM, Voice over IP, Interactive television, digital certificates and signatures, authentication and cryptography.

In addition, ASN.1 is well integrated with other standardized languages and notations such as SDL and TTCN-3.

ASN.1 Abstract and Concrete Syntaxes

ASN.1 has an abstract syntax as defined in the ITU-T X.680 series of recommendations. The recommendations specify a number of simple and structured built-in types which allow the user of the notation to define more complex types and associated data values by combining these built-in types. In addition this notation also provides a set of subtype constructors (e.g. value range, size constraint) to define types whose values are only a subset of the values of some other type (the parent type).

Examples of simple built-in types are: boolean, enumerated, integer, octet string, while examples of built-in structured types are: sequence, set, choice, etc.

ASN.1 has several alternative concrete syntaxes as defined in the ITU-T X.690 series. The abstract syntax is the form that would normally appear in a protocol standard and is used to describe data structures at the level of human readability. The concrete syntax defines the specific set of encoding rules used to convert the abstract form to the actual stream of bits that is sent over a communication media.

The separation between abstract and concrete syntax brings substantial benefits during protocol standard development. Full attention is initially given to the semantics of data, their relations and their range or size limits, while details of concrete syntax are deferred for later consideration.

Typical encoding rules are Basic Encoding Rules (BER) and Packed Encoding Rules (PER).

For most protocol specifications, ASN.1 abstract specifications with standardized encoding rules yield sufficiently compact transfer syntax. In situations where this is felt insufficient, specialized encoding rules can be specified using Encoding Control Notation (ECN). ECN notation is developed and maintained by ITU-T as ITU Recommendation X.692 (ISO/IEC 8825-3). In specifying the encoding rules with ECN, two approaches can be taken: 

  • design of a complete set of (new) encoding rules or 
  • overloading/specialization of standardized encoding rules (such as PER) where required. 

ASN.1 Extensibility

An advantage of ASN.1 is that it offers concepts that support extensibility of protocol data structures. That in turn allows older and newer versions of protocols to interwork. This feature is lacking in many other data description notations, despite being essential to any system which is expected to survive for some time.

ASN.1 Benefits for Protocol Testing

Tools are available to translate ASN.1 specifications into over 150 programming languages including C, C++, and Java. Since ASN.1 specifications can be checked by tools, this approach is in all aspects superior to the traditional way of specifying bit tables.

Most protocol standards in ETSI are accompanied by related test specifications. ASN.1 data definitions can be directly imported into test suites written in TTCN. This speeds up test suite development, but more importantly it aids the implementation of actual test tools.

ASN.1 and XML

The XML Encoding Rules, XER (Rec. ITU-T X.693), allow the encoding of ASN.1 values in XML markup format for the purpose of transmission. ASN.1 can be used as a schema for XML, in the same way as XSD is used.

The mapping from W3C XML Schemas into ASN.1 modules (Rec. ITU-T X.694) takes as input a schema written in XML Schema and produces an ASN.1 module containing a set of type definitions such that there is a one-to-one correspondence between ASN.1 abstract values and valid XML instances.

ASN.1 application domains

The list below will highlight the domains where the use of ASN.1 is widespread.

  • Directory and LDAP (X.500, Directory Access Protocol, LDAP) 
  • Security, authentication, and cryptography (Digital certificates such as X.509, Public Key Cryptography Standard, RSA encryption, Secure Electronic Transaction, Kerberos) 
  • Mobile telephony (Universal Mobile Telecommunication System –UMTS, Long Term Evolution – LTE, an evolution of UMTS, LTE-Advanced, the successor of LTE) 
  • Banking (ANSI standard X9.84 on Biometric information management and security) 
  • Transportation (a number of standards related to Road transport and traffic telematics) 
  • Electronic cards and tags (RFID, ISO/IEC 7816-4 standard for exchanging data with integrated circuit cards with contacts) 
  • Aviation (The Aeronautical Telecommunication Network -ATN) 

ASN.1 module database

A comprehensive collection of the specifications can be found in the ASN.1 module database. The database currently contains well over 700 ASN.1 modules.

ASN.1 Books

  • ASN.1 — Communication Between Heterogeneous Systems



    by Olivier Dubuisson
  • ASN.1 Complete



    by John Larmouth
  • Abstract Syntax Notation One (ASN.1): The Tutorial and Reference



    by Douglas Steedman

The books can be downloaded from http://www.oss.com/asn1/booksintro.html

ASN.1 Tools

A comprehensive list of ASN.1 tools can be consulted at http://www.itu.int/ITU-T/asn1/links/index.htm

Example ASN.1 specified protocols 

3GPP

Name Abbreviation Technology
Radio Resource Control RRC (UMTS) UMTS
Radio Access Network Application Part RANAP UMTS
Radio Network Subsystem Application Part RNSAP UMTS
Node B Application Part NBAP UMTS
RANAP User Adaption RUA UMTS
Home Node B (HNB) Application Part HNBAP UMTS
Mobile Application Part MAP UMTS
CAMEL Application Part CAP UMTS
Handover interface for Lawful Interception LI UMTS
Radio Resource Control RRC (LTE) LTE
S1 Application Protocol S1AP LTE
X2 Application protocol X2AP LTE
M2 Application Protocol M2AP LTE Advanced
M3 Application Protocol M3AP LTE Advanced

Intelligent Transport Systems

Name Abbreviation
Cooperative Awareness Messaging CAM
Decentralized Environmental Notification for Cooperative Road Hazard Warning DENM
CALM FAST Networking and Transfer Protocol FNTP
CALM FAST Service Advertisement Protocol FSAP