International Telecommunication Union ASN.1 Today and Tomorrow © 2002 OSS Nokalva
What is ASN.1? What are Encoding Rules? ASN.1 (Abstract Syntax Notation One) defines the syntax of messages to be exchanged between peer applications independently of local representation. Encoding Rules define how application messages should be encoded while in transit between peers.
Sample ASN.1 Definition Power to express both simple and complex types. Types may be constrained in size and/or value. More powerful constraints are available. Fields may be marked as OPTIONAL. Type extensibility allows for smooth enhancements. Age ::= INTEGER (0..7) User ::= SEQUENCE { name IA5String (SIZE(1..128)), age Age, address IA5String OPTIONAL,... }
Rich Set of Types BOOLEAN INTEGER BIT STRING OCTET STRING NULL REAL ENUMERATED SEQUENCE SEQUENCE OF GeneralizedTime IA5String BMPString UTF8String
What are the Basic Encoding Rules BER specifies how data should be encoded for transmission, independently of machine type, programming language, or representation within an application program. BER is highly structured, prefixing all values with a tag and a length. Application 1Application Age ::= INTEGER (0..7) firstGrade Age ::= 6 Value Length Tag } Total of 24 bits
What are the Packed Encoding Rules? Like BER, PER specifies how data should be encoded for transmission, independently of machine type, programming language, or representation within an application program. Unlike BER, tags are never transmitted, while lengths and values are not transmitted if known by both peers. PERs reason for existence is to conserve bandwidth. It is valuable in audio and video over the Internet, air-ground communication, radio- paging, or wherever bandwidth is at a premium. Application 1Application Age ::= INTEGER (0..7) firstGrade Age ::= 6 total length of 3 bits
What are the XML Encoding Rules? Just like BER and PER, XER also specifies how data should be encoded for transmission, independently of machine type, programming language, or representation within an application program. Unlike the more compact encoding rules, XER is immediately legible. XERs reason for existence is ease of legibility (no tools are needed), but XER uses significantly more bandwidth. Application 1Application 2 6 Age ::= INTEGER (0..7) firstGrade Age ::= 6 total length of 12 octets
ECN Encoding Control Notation Customize the encoding Modify (improve) the standard ASN.1 encoding rules Retrofit ASN.1 syntax to non-ASN.1 protocols
Some Benefits of ASN.1 Application protocol designers can focus on the information that needs to be exchanged Provides implementors with a more precise description of the messages to be exchanged Application programmers can focus on the substance of their application Allows you to choose the most suitable programming language Development time significantly reduced with use of quality ASN.1 tools Proven technology Widely adopted International Standard
ASN.1 can be used with most modern programming languages, including Java and C++, as well as older ones such as C and COBOL. ASN.1 PersonalInfo ::= SEQUENCE { married BOOLEAN, age INTEGER ( ), name PrintableString } Generated C header file: typedef struct PersonalInfo { ossBoolean married; int age; char *name; } PersonalInfo; Encoding/decoding: ossEncode(world, PersonalInfo_PDU, &inBuf, &outBuf); ossDecode(world, &pdunum, &inBuf, &outBuf); Using ASN.1
Development Work Flow ASN.1 Syntax ASN.1 Compiler C Header File Application Source Code include C/C++ Compiler Encoder/ Decoder Libraries Linker Executable Application
Current Uses of ASN.1 Audio & Video over the Internet AT&T, Intel, IBM, Microsoft, 3COM Electronic Commerce American Express, GTE, MasterCard, VISA Telephony AT&T, MCI, Motorola, Nokia, Sprint Aviation FAA, ICAO Manufacturing Ford, Mercedes Benz, Mitsubishi Network Management Bull, Compaq, Hewlett-Packard, Sun Routers Bay Networks, Cisco, Racal, Xyplex
ASN.1 and Encoding Rules Standards Documents ITU-T Rec. X.680 | ISO/IEC Basic ASN.1 Notation ITU-T Rec. X.681 | ISO/IEC Information Object Classes ITU-T Rec. X.682 | ISO/IEC Constraints ITU-T Rec. X.683 | ISO/IEC Parameterization ITU-T Rec. X.690 | ISO/IEC Basic Encoding Rules (BER) Canonical Encoding Rules (CER) Distinguished Encoding Rules (DER) ITU-T Rec. X.691 | ISO/IEC Packed Encoding Rules (PER)
ITU-T Rec. X.692 | ISO/IEC Encoding Control Notation (ECN) ITU-T Rec. X.693 | ISO/IEC XML Encoding Rules (XER) ITU-T Rec. X.694 | ISO/IEC Encoding XML-Defined Data Using ASN.1 Newest ASN.1 and Encoding Rules Standards Documents
ASN.1 Into the Future Security standards: XML Cryptographic Message Syntax (XCMS) Biometrics Information Management and Security (X9.84) Intelligent Transportation System (ITS) Electric Power Utilities Cellular telephones (UMTS)
The future: Why ASN.1? XML ASN.1 as an XML schema notation is simpler than and about as powerful as XSD. Users can benefit from the browser display capabilities of XML and still have compact ASN.1 encodings. PER The compact encodings of PER are ideal for low- bandwidth applications of which there are many. PER can go where XML encodings can not. It makes XML usable in applications that it otherwise cannot touch.
The future: Why ASN.1? (cont.) ECN Apply ASN.1 to legacy protocols. Replace error-prone hand encodings and bitmaps with machine-processable cutomized encodings. DER Used in every secure web purchase, secure , digital signatures, etc. Extensibility The extensibility built into ASN.1 allows version 1 systems to seamlessly interwork with version 2 systems.
ASN.1 Consortium Share technical information and solutions Develop implementors agreement on limits to impose on ASN.1 Coordinate with the ASN.1 Project to promote the use of ASN.1 Keep interested parties abreast of upcoming applications of ASN.1 in industry Create test suite database