/asn1-productions

Productions for ASN.1, sourced directly from the ITU specifications.

MIT LicenseMIT

ASN.1 Productions

What is ASN.1?

ASN.1 stands for Abstract Syntax Notation. ASN.1 was first specified in X.680 - Abstract Syntax Notation One (ASN.1), by the International Telecommunications Union. ASN.1 messages can be encoded in one of several encoding/decoding standards. It provides a system of types that are extensible, and can presumably describe every protocol. You can think of it as a protocol for describing other protocols as well as a family of standards for encoding and decoding said protocols. It is similar to Google's Protocol Buffers, or Sun Microsystems' External Data Representation (XDR).

For more information on what ASN.1 is, see documentation/asn1.md.

Why ASN.1?

ASN.1 is used in, or required by, multiple technologies, including:

If you look in the asn1 directory of WireShark's source code, you'll see all of the protocols that use ASN.1.

This list can also be found in documentation/asn1.d.

What are productions?

"Production," in this context, refers to grammatical rules that a parser uses.

Where did these productions come from?

These come from the official International Telecommunications Union specifications; more specifically, these:

What is the format of these productions?

The productions use the notation described in Section 5.2 of the International Telecommunications Union's X.680 - Abstract Syntax Notation One (ASN.1).

Though said specification says that these productions are in Backus-Naur Form (BNF), they are not. This is incorrect.

Todo

  • Convert it to Backus-Naur Form (BNF), Augmented Backus-Naur Form (ABNF), or Extended Backus-Naur Form (EBNF)
  • Create a Makefile with these targets:
    • combined which concatenates
    • lint which fails if any of the production or lexical item files do not meet syntactic requirements
  • Create lexical-items
  • Add quotes from documentation to comments of lexical-items files
  • Add regular expressions to comments of lexical-items files
  • Quote all caps keywords in productions
  • Trim trailing whitespace
  • Use consistent indentation (tabs or spaces) between files

See Also

Contact Me

If you would like to suggest fixes or improvements on this library, please just leave an issue on this GitHub page. If you would like to contact me for other reasons, please email me at jonathan@wilbur.space (My GPG Key) (My TLS Certificate). 🐗