ASN.1

Last updated
ASN.1
Abstract Syntax Notation One
StatusIn force; supersedes X.208 and X.209 (1988)
Year started1984
Latest version(02/21)
February 2021
Organization ITU-T
Committee Study Group 17
Base standardsASN.1
Related standards X.208, X.209, X.409, X.509, X.680, X.681, X.682, X.683
Domain cryptography, telecommunications
Website https://www.itu.int/rec/T-REC-X.680/

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. [1]

Contents

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. [2] 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 series. [3] The latest revision of the X.680 series of recommendations is the 6.0 Edition, published in 2021.

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
ProtocolSpecificationSpecified or customary encoding rulesUses
Interledger Protocol https://interledger.org/rfcs/asn1/index.html Octet Encoding Rules
NTCIP 1103 - Transport Management Protocols NTCIP 1103 Octet Encoding RulesTraffic, Transportation, and Infrastructure Management
X.500 Directory Services The ITU X.500 Recommendation SeriesBasic Encoding Rules, Distinguished Encoding RulesLDAP, TLS (X.509) Certificates, Authentication
Lightweight Directory Access Protocol (LDAP) RFC   4511 Basic Encoding Rules
PKCS Cryptography Standards PKCS Cryptography StandardsBasic Encoding Rules and Distinguished Encoding RulesAsymmetric Keys, certificate bundles
X.400 Message Handling The ITU X.400 Recommendation SeriesAn early competitor to email
EMV EMVCo PublicationsPayment cards
T.120 Multimedia conferencingThe ITU T.120 Recommendation SeriesBasic Encoding Rules, Packed Encoding RulesMicrosoft's Remote Desktop Protocol (RDP)
Simple Network Management Protocol (SNMP) RFC   1157 Basic Encoding RulesManaging 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 SeriesManaging telephone connections over the Public Switched Telephone Network (PSTN)
ITU H-Series Multimedia ProtocolsThe ITU H.200, H.300, and H.400 Recommendation SeriesVoice 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 RulesExchanging 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.882An 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 RulesBuilding automation and control, such as with fire alarms, elevators, HVAC systems, etc.
Kerberos RFC   4120 Basic Encoding RulesSecure authentication
WiMAX 2 Wide Area Networks
Intelligent Network The ITU Q.1200 Recommendation SeriesTelecommunications and computer networking
X2APBasic 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 identifierObject descriptor value
Specification
Unit of serialization
Encoded elements
discernable without
foreknowledge of
specification
Octet aligned
Encoding control
notation rules defined
Description
DottedIRI
2.1.1/ASN.1/Basic-EncodingBasic Encoding of a single ASN.1 typeITU X.690OctetYesYesNoThe 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 more flexible encoding rules.
2.1.2.1/ASN.1/BERDerived/DistinguishedEncodingDistinguished encoding of a single ASN.1 typeITU X.690OctetYesYesNoA restricted subset of the Basic Encoding Rules (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.
2.1.2.0/ASN.1/BERDerived/CanonicalEncodingCanonical encoding of a single ASN.1 typeITU X.690OctetYesYesNoA restricted subset of the Basic Encoding Rules (BER). Employs almost all of the same restrictions as the Distinguished Encoding Rules (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).
Basic Packed
Encoding Rules
(PER) Aligned [7]
2.1.3.0.0/ASN.1/PackedEncoding/Basic/AlignedPacked encoding of a single ASN.1 type (basic aligned)ITU X.691BitNoYesNoEncodes 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. Capable of producing very compact encodings, but at the expense of complexity, and the PER are highly dependent upon constraints placed on data types.
Basic Packed
Encoding Rules
(PER) Unaligned [7]
2.1.3.0.1/ASN.1/PackedEncoding/Basic/UnalignedPacked encoding of a single ASN.1 type (basic unaligned)ITU X.691BitNoNoNoA variant of the Aligned Basic Packed Encoding Rules (PER), but it does not pad data values with bits to produce an integral number of octets.
Canonical Packed
Encoding Rules
(CPER) Aligned [7]
2.1.3.1.0/ASN.1/PackedEncoding/Canonical/AlignedPacked encoding of a single ASN.1 type (canonical aligned)ITU X.691BitNoYesNoA variant of the Packed Encoding Rules (PER) that specifies a single way of encoding values. The Canonical Packed Encoding Rules have a similar relationship to the Packed Encoding Rules that the Distinguished Encoding Rules (DER) and the Canonical Encoding Rules (CER) have to the Basic Encoding Rules (BER).
Canonical Packed
Encoding Rules
(CPER) Unaligned [7]
2.1.3.1.1/ASN.1/PackedEncoding/Canonical/UnalignedPacked encoding of a single ASN.1 type (canonical unaligned)ITU X.691BitNoNoNoA variant of the Aligned Canonical Packed Encoding Rules (CPER), but it does not pad data values with bits to produce an integral number of octets.
Basic XML
Encoding Rules
(XER) [8]
2.1.5.0/ASN.1/XMLEncoding/BasicBasic XML encoding of a single ASN.1 typeITU X.693CharacterYesYesYesEncodes ASN.1 data as XML.
Canonical XML
Encoding Rules
(CXER) [8]
2.1.5.1/ASN.1/XMLEncoding/CanonicalCanonical XML encoding of a single ASN.1 typeITU X.693CharacterYesYesYes
Extended XML
Encoding Rules
(EXER) [8]
2.1.5.2/ASN.1/XMLEncoding/ExtendedExtended XML encoding of a single ASN.1 typeITU X.693CharacterYesYesYes
Octet
Encoding Rules
(OER) [9]
2.1.6.0Basic OER encoding of a single ASN.1 typeITU X.696OctetNoYesA set of encoding rules that encodes values on octets, but does not encode tags or length determinants like the Basic Encoding Rules (BER). Data values encoded using the Octet Encoding Rules often look like those found in "record-based" protocols. The Octet Encoding Rules (OER) were designed to be easy to implement and to produce encodings more compact than those produced by the Basic Encoding Rules (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 Packed Encoding Rules), save CPU cycles, and lower encoding/decoding latency.
Canonical
Encoding Rules
(OER) [9]
2.1.6.1Canonical OER encoding of a single ASN.1 typeITU X.696OctetNoYes
JSON
Encoding Rules
(JER) [10]
ITU X.697CharacterYesYesYesEncodes ASN.1 data as JSON.
Generic String
Encoding Rules
(GSER) [11]
1.2.36.79672281.0.0Generic String Encoding Rules (GSER) RFC   3641 CharacterYesNoAn incomplete specification for encoding rules that produce human-readable values. The purpose of GSER is to represent encoded data to the user or input data from the user, in a very straightforward format. GSER was originally designed for the Lightweight Directory Access Protocol (LDAP) and is rarely used outside of it. The use of GSER in actual protocols is discouraged since not all character string encodings supported by ASN.1 can be reproduced in it.
BACnet
Encoding Rules
ASHRAE 135OctetYesYesYesEncodes elements as tag-length-value (TLV) sequences like the Basic Encoding Rules (BER).
Signalling Specific
Encoding Rules
(SER)
France Telecom R&D Internal DocumentOctetYesYesUsed primarily in telecommunications related protocols, such as GSM and SS7. Designed to produce an identical encoding from ASN.1 that previously-existing protocols not specified in ASN.1 would produce.
Lightweight
Encoding Rules
(LWER)
Internal document by INRIA.Memory WordYesOriginates from an internal document produced by INRIA detailing the "Flat Tree Light Weight Syntax" (FTLWS). Abandoned in 1997 due to the superior performance of the Packed Encoding Rules (PER). Optionally Big-Endian or Little-Endian transmission as well as 8-bit, 16-bit, and 32-bit memory words. (Therefore, there are six variants, since there are six combinations of those options.)
Minimum Bit
Encoding Rules
(MBER)
BitProposed in the 1980s. Meant to be as compact as possible, like the Packed Encoding Rules (PER).
NEMA Packed
Encoding Rules
BitAn incomplete encoding rule specification produced by NEMA. It is incomplete because it cannot encode and decode all ASN.1 data types. Compact like the Packed Encoding Rules (PER).
High Speed
Coding Rules
"Coding Rules for High Speed Networks"Definition of these encoding rules were a byproduct of INRIA's work on the Flat Tree Light Weight Syntax (FTLWS).

Encoding Control Notation

ASN.1 recommendations provide a number of predefined encoding rules. If none of the existing encoding rules are suitable, the Encoding Control Notation (ECN) provides a way for a user to define his or her own customized encoding rules.

Relation to Privacy-Enhanced Mail (PEM) Encoding

Privacy-Enhanced Mail (PEM) encoding is entirely unrelated to ASN.1 and its codecs, but encoded ASN.1 data, which is often binary, is often PEM-encoded so that it can be transmitted as textual data, e.g. over SMTP relays, or through copy/paste buffers.

Example

This is an example ASN.1 module defining the messages (data structures) of a fictitious Foo Protocol:

FooProtocolDEFINITIONS::=BEGINFooQuestion::=SEQUENCE{trackingNumberINTEGER,questionIA5String}FooAnswer::=SEQUENCE{questionNumberINTEGER,answerBOOLEAN}END

This could be a specification published by creators of Foo Protocol. Conversation flows, transaction interchanges, and states are not defined in ASN.1, but are left to other notations and textual description of the protocol.

Assuming a message that complies with the Foo Protocol and that will be sent to the receiving party, this particular message (protocol data unit (PDU)) is:

myQuestionFooQuestion::={trackingNumber5,question"Anybody there?"}

ASN.1 supports constraints on values and sizes, and extensibility. The above specification can be changed to

FooProtocolDEFINITIONS::=BEGINFooQuestion::=SEQUENCE{trackingNumberINTEGER(0..199),questionIA5String}FooAnswer::=SEQUENCE{questionNumberINTEGER(10..20),answerBOOLEAN}FooHistory::=SEQUENCE{questionsSEQUENCE(SIZE(0..10))OFFooQuestion,answersSEQUENCE(SIZE(1..10))OFFooAnswer,anArraySEQUENCE(SIZE(100))OFINTEGER(0..1000),...}END

This change constrains trackingNumbers to have a value between 0 and 199 inclusive, and questionNumbers to have a value between 10 and 20 inclusive. The size of the questions array can be between 0 and 10 elements, with the answers array between 1 and 10 elements. The anArray field is a fixed length 100 element array of integers that must be in the range 0 to 1000. The '...' extensibility marker means that the FooHistory message specification may have additional fields in future versions of the specification; systems compliant with one version should be able to receive and transmit transactions from a later version, though able to process only the fields specified in the earlier version. Good ASN.1 compilers will generate (in C, C++, Java, etc.) source code that will automatically check that transactions fall within these constraints. Transactions that violate the constraints should not be accepted from, or presented to, the application. Constraint management in this layer significantly simplifies protocol specification because the applications will be protected from constraint violations, reducing risk and cost.

To send the myQuestion message through the network, the message is serialized (encoded) as a series of bytes using one of the encoding rules. The Foo protocol specification should explicitly name one set of encoding rules to use, so that users of the Foo protocol know which one they should use and expect.

Example encoded in DER

Below is the data structure shown above as myQuestion encoded in DER format (all numbers are in hexadecimal):

30 13 02 01 05 16 0e 41 6e 79 62 6f 64 79 20 74 68 65 72 65 3f


DER is a type–length–value encoding, so the sequence above can be interpreted, with reference to the standard SEQUENCE, INTEGER, and IA5String types, as follows:

30 — type tag indicating SEQUENCE 13 — length in octets of value that follows   02 — type tag indicating INTEGER   01 — length in octets of value that follows     05 — value (5)   16 — type tag indicating IA5String       (IA5 means the full 7-bit ISO 646 set, including variants,        but is generally US-ASCII)   0e — length in octets of value that follows     41 6e 79 62 6f 64 79 20 74 68 65 72 65 3f — value ("Anybody there?")

Example encoded in XER

Alternatively, it is possible to encode the same ASN.1 data structure with XML Encoding Rules (XER) to achieve greater human readability "over the wire". It would then appear as the following 108 octets, (space count includes the spaces used for indentation):

<FooQuestion><trackingNumber>5</trackingNumber><question>Anybodythere?</question></FooQuestion>

Example encoded in PER (unaligned)

Alternatively, if Packed Encoding Rules are employed, the following 122 bits (16 octets amount to 128 bits, but here only 122 bits carry information and the last 6 bits are merely padding) will be produced:

01 05 0e 83 bb ce 2d f9 3c a0 e9 a3 2f 2c af c0

In this format, type tags for the required elements are not encoded, so it cannot be parsed without knowing the expected schemas used to encode. Additionally, the bytes for the value of the IA5String are packed using 7-bit units instead of 8-bit units, because the encoder knows that encoding an IA5String byte value requires only 7 bits. However the length bytes are still encoded here, even for the first integer tag 01 (but a PER packer could also omit it if it knows that the allowed value range fits on 8 bits, and it could even compact the single value byte 05 with less than 8 bits, if it knows that allowed values can only fit in a smaller range).

The last 6 bits in the encoded PER are padded with null bits in the 6 least significant bits of the last byte c0 : these extra bits may not be transmitted or used for encoding something else if this sequence is inserted as a part of a longer unaligned PER sequence.

This means that unaligned PER data is essentially an ordered stream of bits, and not an ordered stream of bytes like with aligned PER, and that it will be a bit more complex to decode by software on usual processors because it will require additional contextual bit-shifting and masking and not direct byte addressing (but the same remark would be true with modern processors and memory/storage units whose minimum addressable unit is larger than 1 octet). However modern processors and signal processors include hardware support for fast internal decoding of bit streams with automatic handling of computing units that are crossing the boundaries of addressable storage units (this is needed for efficient processing in data codecs for compression/decompression or with some encryption/decryption algorithms).

If alignment on octet boundaries was required, an aligned PER encoder would produce:

01 05 0e 41 6e 79 62 6f 64 79 20 74 68 65 72 65 3f

(in this case, each octet is padded individually with null bits on their unused most significant bits).

Tools

Most of the tools supporting ASN.1 do the following:

A list of tools supporting ASN.1 can be found on the ITU-T Tool web page.

Online tools

Comparison to similar schemes

ASN.1 is similar in purpose and use to google protocol buffers and Apache Thrift, which are also interface description languages for cross-platform data serialization. Like those languages, it has a schema (in ASN.1, called a "module"), and a set of encodings, typically type–length–value encodings. Unlike them, ASN.1 does not provide a single and readily usable open-source implementation, and is published as a specification to be implemented by third-party vendors. However, ASN.1, defined in 1984, predates them by many years. It also includes a wider variety of basic data types, some of which are obsolete, and has more options for extensibility. A single ASN.1 message can include data from multiple modules defined in multiple standards, even standards defined years apart.

ASN.1 also includes built-in support for constraints on values and sizes. For instance, a module can specify an integer field that must be in the range 0 to 100. The length of a sequence of values (an array) can also be specified, either as a fixed length or a range of permitted lengths. Constraints can also be specified as logical combinations of sets of basic constraints.

Values used as constraints can either be literals used in the PDU specification, or ASN.1 values specified elsewhere in the schema file. Some ASN.1 tools will make these ASN.1 values available to programmers in the generated source code. Used as constants for the protocol being defined, developers can use these in the protocol's logic implementation. Thus all the PDUs and protocol constants can be defined in the schema, and all implementations of the protocol in any supported language draw upon those values. This avoids the need for developers to hand code protocol constants in their implementation's source code. This significantly aids protocol development; the protocol's constants can be altered in the ASN.1 schema and all implementations are updated simply by recompiling, promoting a rapid and low risk development cycle.

If the ASN.1 tools properly implement constraints checking in the generated source code, this acts to automatically validate protocol data during program operation. Generally ASN.1 tools will include constraints checking into the generated serialization / deserialization routines, raising errors or exceptions if out-of-bounds data is encountered. It is complex to implement all aspects of ASN.1 constraints in an ASN.1 compiler. Not all tools support the full range of possible constraints expressions. XML schema and JSON schema both support similar constraints concepts. Tool support for constraints varies. Microsoft's xsd.exe compiler ignores them.

ASN.1 is visually similar to Augmented Backus-Naur form (ABNF), which is used to define many Internet protocols like HTTP and SMTP. However, in practice they are quite different: ASN.1 defines a data structure, which can be encoded in various ways (e.g. JSON, XML, binary). ABNF, on the other hand, defines the encoding ("syntax") at the same time it defines the data structure ("semantics"). ABNF tends to be used more frequently for defining textual, human-readable protocols, and generally is not used to define type–length–value encodings.

Many programming languages define language-specific serialization formats. For instance, Python's "pickle" module and Ruby's "Marshal" module. These formats are generally language specific. They also don't require a schema, which makes them easier to use in ad hoc storage scenarios, but inappropriate for communications protocols.

JSON and XML similarly do not require a schema, making them easy to use. They are also both cross-platform standards that are broadly popular for communications protocols, particularly when combined with a JSON schema or XML schema.

Some ASN.1 tools are able to translate between ASN.1 and XML schema (XSD). The translation is standardised by the ITU. This makes it possible for a protocol to be defined in ASN.1, and also automatically in XSD. Thus it is possible (though perhaps ill-advised) to have in a project an XSD schema being compiled by ASN.1 tools producing source code that serializes objects to/from JSON wireformat. A more practical use is to permit other sub-projects to consume an XSD schema instead of an ASN.1 schema, perhaps suiting tools availability for the sub-projects language of choice, with XER used as the protocol wireformat.

For more detail, see Comparison of data serialization formats.

See also

Related Research Articles

The Lightweight Directory Access Protocol is an open, vendor-neutral, industry standard application protocol for accessing and maintaining distributed directory information services over an Internet Protocol (IP) network. Directory services play an important role in developing intranet and Internet applications by allowing the sharing of information about users, systems, networks, services, and applications throughout the network. As examples, directory services may provide any organized set of records, often with a hierarchical structure, such as a corporate email directory. Similarly, a telephone directory is a list of subscribers with an address and a phone number.

<span class="mw-page-title-main">XML</span> Markup language by the W3C for encoding of data

Extensible Markup Language (XML) is a markup language and file format for storing, transmitting, and reconstructing arbitrary data. It defines a set of rules for encoding documents in a format that is both human-readable and machine-readable. The World Wide Web Consortium's XML 1.0 Specification of 1998 and several other related specifications—all of them free open standards—define XML.

In computer programming, Base64 is a group of tetrasexagesimal binary-to-text encoding schemes that represent binary data in sequences of 24 bits that can be represented by four 6-bit Base64 digits.

The Financial Information eXchange (FIX) protocol is an electronic communications protocol initiated in 1992 for international real-time exchange of information related to securities transactions and markets. With trillions of dollars traded annually on the NASDAQ alone, financial service entities are employing direct market access (DMA) to increase their speed to financial markets. Managing the delivery of trading applications and keeping latency low increasingly requires an understanding of the FIX protocol.

A management information base (MIB) is a database used for managing the entities in a communication network. Most often associated with the Simple Network Management Protocol (SNMP), the term is also used more generically in contexts such as in OSI/ISO Network management model. While intended to refer to the complete collection of management information available on an entity, it is often used to refer to a particular subset, more correctly referred to as MIB-module.

Bencode is the encoding used by the peer-to-peer file sharing system BitTorrent for storing and transmitting loosely structured data.

<span class="mw-page-title-main">JSON</span> Open standard file format and data interchange

JSON is an open standard file format and data interchange format that uses human-readable text to store and transmit data objects consisting of attribute–value pairs and arrays. It is a common data format with diverse uses in electronic data interchange, including that of web applications with servers.

URL encoding, officially known as percent-encoding, is a method to encode arbitrary data in a Uniform Resource Identifier (URI) using only the US-ASCII characters legal within a URI. Although it is known as URL encoding, it is also used more generally within the main Uniform Resource Identifier (URI) set, which includes both Uniform Resource Locator (URL) and Uniform Resource Name (URN). As such, it is also used in the preparation of data of the application/x-www-form-urlencoded media type, as is often used in the submission of HTML form data in HTTP requests.

Fast Infoset is an international standard that specifies a binary encoding format for the XML Information Set as an alternative to the XML document format. It aims to provide more efficient serialization than the text-based XML format.

Within communication protocols, TLV is an encoding scheme used for informational elements. A TLV-encoded data stream contains code related to the record type, the record value's length, and finally the value itself.

KLV (Key-Length-Value) is a data encoding standard, often used to embed information in video feeds. The standard uses a type–length–value encoding scheme. Items are encoded into Key-Length-Value triplets, where key identifies the data, length specifies the data's length, and value is the data itself. It is defined in SMPTE 336M-2007, approved by the Society of Motion Picture and Television Engineers. Due to KLV's large degree of interoperability, it has also been adopted by the Motion Imagery Standards Board.

A Canonical S-expression is a binary encoding form of a subset of general S-expression. It was designed for use in SPKI to retain the power of S-expressions and ensure canonical form for applications such as digital signatures while achieving the compactness of a binary form and maximizing the speed of parsing.

Action Message Format (AMF) is a binary format used to serialize object graphs such as ActionScript objects and XML, or send messages between an Adobe Flash client and a remote service, usually a Flash Media Server or third party alternatives. The Actionscript 3 language provides classes for encoding and decoding from the AMF format.

A variable-length quantity (VLQ) is a universal code that uses an arbitrary number of binary octets to represent an arbitrarily large integer. A VLQ is essentially a base-128 representation of an unsigned integer with the addition of the eighth bit to mark continuation of bytes. VLQ is identical to LEB128 except in endianness. See the example below.

TTCN-3(Testing and Test Control Notation version 3) is a strongly typed testing language used in conformance testing of communicating systems. TTCN-3 is written by ETSI in the ES 201 873 series, and standardized by ITU-T in the Z.160 Series. TTCN-3 has its own data types and can be combined with ASN.1, IDL and XML type definitions.

The Encoding Control Notation (ECN) is a standardized formal language that is part of the Abstract Syntax Notation One (ASN.1) family of international standards. ECN is designed to be used along with ASN.1, and each ECN specification (a coherent set of encoding definitions) is explicitly related to a particular ASN.1 specification (a coherent set of type definitions).

LEB128 or Little Endian Base 128 is a variable-length code compression used to store arbitrarily large integers in a small number of bytes. LEB128 is used in the DWARF debug file format and the WebAssembly binary encoding for all integer literals.

This is a comparison of data serialization formats, various ways to convert complex objects to sequences of bits. It does not include markup languages used exclusively as document file formats.

X.690 is an ITU-T standard specifying several ASN.1 encoding formats:

Universal Binary JSON (UBJSON) is a computer data interchange format. It is a binary form directly imitating JSON, but requiring fewer bytes of data. It aims to achieve the generality of JSON, combined with being much easier to process than JSON.

References