Definition -- Abstract Syntax Notation One

Definition: Abstract Syntax Notation One

Abstract Syntax Notation One (ASN.1) is a mechanism for encoding data in a binary form. It uses a TLV structure, in which each element has a type, length, and value. The type component is a data type that indicates what kind of information is stored in the element and indicates how the value should be encoded. The length component specifies the number of bytes in the value, and the value is the actual data held by the element.

Examples of ASN.1 elements include:

  • Null – Null elements do not hold any value. They are generally used as placeholders when an element is required but no value is needed.
  • Octet string – Octet string elements hold a set of zero or more octets (bytes) of data. It can be used for holding string or binary data.
  • Boolean – Boolean elements hold values that represent either "true" or "false".
  • Integer – Integer elements hold values that represent integer values.
  • Enumerated – Enumerated elements hold values that represent integer values where each value has a specific meaning.
  • Sequence – Sequence elements are containers that zero or more other ASN.1 elements in a manner where the order of the elements is significant.
  • Set – Set elements are containers that hold zero or more other ASN.1 elements in a manner where the order of the elements is not significant.

Note that ASN.1 is a general framework for binary encoding, but doesn't actually define how the data should be encoded. That is handled by an encoding rule, and there are a number of different kinds of ASN.1 encoding rules. LDAP uses the Basic Encoding Rules (BER) encoding, but other types include Distinguished Encoding Rules (DER), Canonical Encoding Rules (CER), and Packed Encoding Rules (PER).

See http://www.oss.com/asn1/larmouth.html for a PDF version of the "ASN.1 Complete" book by Professor John Larmouth for more information.

Enter labels to add to this page:
Please wait 
Looking for a label? Just start typing.

Sign up or Log in to add a comment or watch this page.


The individuals who post here are part of the extended Sun Microsystems community and they might not be employed or in any way formally affiliated with Sun Microsystems. The opinions expressed here are their own, are not necessarily reviewed in advance by anyone but the individual authors, and neither Sun nor any other party necessarily agrees with them.

Copyright 1994-2009 Sun Microsystems, Inc.
Powered by Atlassian Confluence
Sun Guidelines on Public Discourse Privacy Policy Terms of Use Trademarks Site Map Employment Investor Relations Contact