Skip to content
| Marketplace
Sign in
Visual Studio Code>Programming Languages>ASN.1New to Visual Studio Code? Get it now.
ASN.1

ASN.1

Jonathan M. Wilbur

|
20,446 installs
| (0) | Free
ASN.1 syntax, snippets, formatting, and more.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

ASN.1 VS Code Extension

  • Author: Jonathan M. Wilbur <jonathan@wilbur.space>
  • Copyright Year: 2018
  • License: MIT License
  • Version: See version file or git tags.

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:

  • X.509 Certificates, used in SSL/TLS
  • Lightweight Directory Access Protocol (LDAP)
  • X.400, the messaging system used by the U.S. Military
  • X.500
  • The magnetic stripes on credit cards and debit cards
  • Microsoft's Remote Desktop Protocol (RDP)
  • Simple Network Management Protocol (SNMP)
  • Common Management Information Protocol (CMIP)
  • Signalling System Number 7 (SS7), used to make most phone calls on the Public Switched Telephone Network (PSTN).
  • Kerberos 5
  • H.323 Video conferencing
  • Biometrics Protocols:
    • BioAPI Interworking Protocol (BIP)
    • Common Biometric Exchange Formats Framework (CBEFF)
    • Authentication Contexts for Biometrics (ACBio)
  • Computer Supported Telecommunications Applications (CSTA)
  • Dedicated Short Range Communications (SAE J2735)
  • Cellular telephony:
    • Global System for Mobile Communications (GSM)
    • Global Packet Radio Service (GPRS) / Enhanced Data Rates for Global Evolution (EDGE)
    • Universal Mobile Telecommunications System (UTMS)
    • Long-Term Evolution (LTE)

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.

Building

You can build this library by running tsc. The outputs will all be in dist.

Capabilities

  • Syntax highlighting
  • Bracket matching
  • Limited hints, warnings, and errors
  • Limited formatting
  • Go to definition
  • Hover definitions

Limitations

Unfortunately, I designed this extension poorly from the start, so don't get too creative:

  • Validation can't occur across lines.
  • Comments inserted in the middle of lines can screw things up.
  • Strings are treated just like syntax.

But don't let that scare you. This will work fine for 99% of cases.

See Also

  • X.680 - Abstract Syntax Notation One (ASN.1), published by the International Telecommunications Union.
  • ASN.1: Communication Between Heterogeneous Systems by Olivier Dubuisson

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). :boar:

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2025 Microsoft