Abstract Syntax Notation One (ASN.1) is a standard interface description language (IDL) for defining data structures that can be serialized and deserialized in a cross-platform way. It is broadly used in telecommunications and computer networking, and especially in cryptography.

Protocol developers define data structures in ASN.1 modules, which are generally a section of a broader standards document written in the ASN.1 language. The advantage is that the ASN.1 description of the data encoding is independent of a particular computer or programming language. Because ASN.1 is both human-readable and machine-readable, an ASN.1 compiler can compile modules into libraries of code, codecs, that decode or encode the data structures. Some ASN.1 compilers can produce code to encode or decode several encodings, e.g. packed, BER or XML.

ASN.1 is a joint standard of the International Telecommunication Union Telecommunication Standardization Sector (ITU-T) in ITU-T Study Group 17 and International Organization for Standardization/International Electrotechnical Commission (ISO/IEC), originally defined in 1984 as part of CCITT X.409:1984. In 1988, ASN.1 moved to its own standard, X.208, due to wide applicability. The substantially revised 1995 version is covered by the X.680–X.683 series.ITU-T X.680 - Specification of basic notation The latest revision of the X.680 series of recommendations is the 6.0 Edition, published in 2021.

Structure X.680 defines the basic lexical items of the ASN.1 language (special tokens, format of basic literal values, etc.). It defines the syntax of a "module definition", the definition of a module within a protocol. A module definition can contain data types, predefined information objects written in those data types (detailed syntax in X.681), constraint elements (detailed syntax in X.682), among other things. X.681 defines the syntax of an information object, which allows for objects in custom datatypes to be represented in the language (akin to object literals in other languages). It also defines a way to reference a specific value from an object using a dot notation as if it is a table. X.682 defines constraint elements, which can be used to apply more advanced constraints in a module. X.683, Parameterization of ASN.1 specifications, allows assignments and definitions to vary according to parameters.

Language support ASN.1 is a data type declaration notation. It does not define how to manipulate a variable of such a type. Manipulation of variables is defined in other languages such as SDL (Specification and Description Language) for executable modeling or TTCN-3 (Testing and Test Control Notation) for conformance testing. Both these languages natively support ASN.1 declarations. It is possible to import an ASN.1 module and declare a variable of any of the ASN.1 types declared in the module.

Applications ASN.1 is used to define a large number of protocols. Its most extensive uses continue to be telecommunications, cryptography, and biometrics.

+ Protocols that use ASN.1 Protocol Specification Specified or customary encoding rules Uses Interledger Protocol ILPV4 Specification Octet Encoding Rules NTCIP 1103 - Transport Management Protocols NTCIP 1103 Octet Encoding Rules Traffic, Transportation, and Infrastructure Management X.500 Directory Services The ITU X.500 Recommendation Series Basic Encoding Rules, Distinguished Encoding Rules LDAP, TLS (X.509) Certificates, Authentication Lightweight Directory Access Protocol (LDAP) Basic Encoding Rules PKCS Cryptography Standards PKCS Cryptography Standards Basic Encoding Rules and Distinguished Encoding Rules Asymmetric Keys, certificate bundles X.400 Message Handling The ITU X.400 Recommendation Series An early competitor to email EMV EMVCo Publications Payment cards T.120 Multimedia conferencing The ITU T.120 Recommendation Series Basic Encoding Rules, Packed Encoding Rules Microsoft's Remote Desktop Protocol (RDP) Simple Network Management Protocol (SNMP) Basic Encoding Rules Managing and monitoring networks and computers, particularly characteristics pertaining to performance and reliability Common Management Information Protocol (CMIP) ITU Recommendation X.711 A competitor to SNMP but more capable and not nearly as popular Signalling System No. 7 (SS7) The ITU Q.700 Recommendation Series Managing telephone connections over the Public Switched Telephone Network (PSTN) ITU H-Series Multimedia Protocols The ITU H.200, H.300, and H.400 Recommendation Series Voice over Internet Protocol (VoIP) BioAPI Interworking Protocol (BIP) ISO/IEC 24708:2008 Common Biometric Exchange Formats Framework (CBEFF) NIST IR 6529-A Basic Encoding Rules Authentication Contexts for Biometrics (ACBio) ISO/IEC 24761:2019 Computer-supported telecommunications applications (CSTA) Basic Encoding Rules Dedicated short-range communications (DSRC) SAE J2735 Packed Encoding Rules Vehicle communication IEEE 802.11p (IEEE WAVE) IEEE 1609.2 Vehicle communication Intelligent Transport Systems (ETSI ITS) ETSI EN 302 637 2 (CAM)ETSI EN 302 637 3 (DENM) Unaligned Packed Encoding Rules Vehicle communication Global System for Mobile Communications (GSM) 2G Mobile Phone Communications General Packet Radio Service (GPRS) / Enhanced Data rates for GSM Evolution (EDGE) 2.5G Mobile Phone Communications Universal Mobile Telecommunications System (UMTS) 3G Mobile Phone Communications Long-Term Evolution (LTE) 4G Mobile Phone Communications 5G 5G Mobile Phone Communications Common Alerting Protocol (CAP) XML Encoding Rules Exchanging Alert Information, such as Amber Alerts Controller–pilot data link communications (CPDLC) Aeronautics communications Space Link Extension Services (SLE) Space systems communications Manufacturing Message Specification (MMS) ISO 9506-1:2003 Manufacturing File Transfer, Access and Management (FTAM) An early and more capable competitor to File Transfer Protocol, but its rarely used anymore. Remote Operations Service Element protocol (ROSE) ITU Recommendations X.880, X.881, and X.882 An early form of Remote procedure call Association Control Service Element (ACSE) ITU Recommendation X.227 Building Automation and Control Networks Protocol (BACnet) ASHRAE 135-2020 BACnet Encoding Rules Building automation and control, such as with fire alarms, elevators, HVAC systems, etc. Kerberos Basic Encoding Rules Secure authentication WiMAX 2 Wide Area Networks Intelligent Network The ITU Q.1200 Recommendation Series Telecommunications and computer networkingX2APBasic Aligned Packed Encoding Rules Lawful Interception (LI) Handover Interface ETSI TS 102 232-1 Lawful Interception

Encodings ASN.1 is closely associated with a set of encoding rules that specify how to represent a data structure as a series of bytes. The standard ASN.1 encoding rules include: + ASN.1 Encoding Rules Encoding rules Object identifier Specification Unit of serialization Encoded elements discernable without foreknowledge of specification Octet aligned Encoding control Description Dotted Basic Encoding Rules(BER)ITU-T X.690 - Basic Encoding Rules (BER) 2.1.1 /JointISOITUT/ASN.1/Basic-Encoding ITU X.690 Octet The first specified encoding rules. Encodes elements as tag-length-value (TLV) sequences. Typically provides several options as to how data values are to be encoded. This is one of the most flexible encoding rules. Distinguished Encoding Rules(DER)ITU-T X.690 - Distinguished Encoding Rules (DER) 2.1.2.1 /JointISOITUT/ASN.1/BERDerived/DistinguishedEncoding ITU X.690 Octet A restricted subset of the BER. Typically used for things that are digitally-signed because, since the DER allow for fewer options for encoding, and because DER-encoded values are more likely to be re-encoded on the exact same bytes, digital signatures produced by a given abstract value will be the same across implementations and digital signatures produced over DER-encoded data will be less susceptible to collision-based attacks. Canonical Encoding Rules(CER)ITU-T X.690 - Canonical Encoding Rules (CER) 2.1.2.0 /JointISOITUT/ASN.1/BERDerived/CanonicalEncoding ITU X.690 Octet A restricted subset of the BER. Employs almost all of the same restrictions as the DER but the noteworthy difference is that the CER specify that many large values (especially strings) are to be "chopped up" into individual substring elements at the 1000-byte or 1000-character mark (depending on the data type). Packed Encoding Rules Unaligned (PER-U/UPER) 2.1.3.0.1 /JointISOITUT/ASN.1/PackedEncoding/Basic/Unaligned ITU X.691 Bit Encodes values on bits. Sometimes simply called "PER". The PERs in general are capable of producing very compact encodings, but at the expense of complexity; they are also highly dependent upon constraints placed on data types. Packed Encoding Rules Aligned (PER-A/APER)ITU-T X.691 - Packed Encoding Rules (PER) 2.1.3.0.0 /JointISOITUT/ASN.1/PackedEncoding/Basic/Aligned ITU X.691 Bit Encodes values on bits, but if the bits encoded are not evenly divisible by eight, padding bits are added until an integral number of octets encode the value. Canonical PackedEncoding Rules Unaligned(CPER-U) 2.1.3.1.1 /JointISOITUT/ASN.1/PackedEncoding/Canonical/Unaligned ITU X.691 Bit A variant of the PER-U that specifies a single way of encoding values. Sometimes simply called "CPER". The CPERs have a similar relationship to the PERs that the DER and the CER have to the BER. Canonical PackedEncoding Rules Aligned(CPER-A) 2.1.3.1.0 /JointISOITUT/ASN.1/PackedEncoding/Canonical/Aligned ITU X.691 Bit A variant of the PER-A that specifies a single way of encoding values. Basic XMLEncoding Rules(XER)ITU-T X.693 - XML Encoding Rules (XER) 2.1.5.0 /JointISOITUT/ASN.1/XMLEncoding/Basic ITU X.693 Character Encodes ASN.1 data as XML. Canonical XMLEncoding Rules(CXER) 2.1.5.1 /JointISOITUT/ASN.1/XMLEncoding/Canonical ITU X.693 Character Variant of XER that produces only one possible encoding for a given value. Extended XMLEncoding Rules(EXER) 2.1.5.2 /JointISOITUT/ASN.1/XMLEncoding/Extended ITU X.693 Character Variant of XER that adds options and instructions controlling stylistic choices of the encoder. Octet Encoding Rules(OER)ITU-T X.696 - Octet Encoding Rules (OER) 2.1.6.0 /JointISOITUT/ASN.1/OEREncoding/Basic ITU X.696 Octet A set of encoding rules that encodes values on octets, but does not encode tags or length determinants like the BER does. Data values encoded using the OER often look like those found in "record-based" protocols. The OER were designed to be easy to implement and to produce encodings more compact than those produced by the BER. In addition to reducing the effort of developing encoder/decoders, the use of OER can decrease bandwidth utilization (though not as much as the PER), save CPU cycles, and lower encoding/decoding latency.