ASN.1 Made Simple — What is ASN.1?

What is ASN.1

Communication protocols describe the sequence, the content and the encoding of messages exchanged between computers communicating with each other. ASN.1 is a language for describing the content and the encoding of such messages. For example:

Contact ::= SEQUENCE {
name VisibleString,
phone NumericString
}

Explore OSS'
ASN.1 Playground

So, a contact named John Smith with a phone number of (987) 654-3210 might be converted to 0x3018800A4A6F686E20536D697468810A39383736353433323130 using the ASN.1 Basic Encoding Rules or 0x0A4A6F686E20536D6974680AA987654321 using the Packed Encoding Rules or <?xml version="1.0" encoding="UTF-8"?> <Contact> <name>John Smith</name> <phone>9876543210</phone> </Contact> if the XML Encoding Rules are used.

Download an
ASN.1 Reference Card

ASN.1 is a mature core technology that is widely used in infrastructures that require robust communication. ASN.1 is precise, with explicit instructions on exactly how any given type of information must be represented when transferred. ASN.1 is independent of the programming languages used to implement communications. Whether you prefer to work in C, C++, Java, C#, or even COBOL, you can still transfer information. One end of transfer could be written in Java while the other end is written in C, and they will still be able to exchange information using ASN.1 with its encoding rules.

ASN.1 is also independent of any hardware or operating system you might choose to use. This allows exchange of information whether one end is a cell phone and the other end is a super computer, or anything in between. ASN.1 is flexible, allowing simple easily understood descriptions, yet has the power, for those who need it, to enforce complex constraints in which the type of information in one component of a message could be determined by the value of another component in the message.

So ASN.1 is robust, precise, programming language independent, hardware independent, operating-system independent, flexible, and powerful.