Help us shape the future of Go! Take the 2026 Go Developer Survey

go-asn1

module
v0.5.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 29, 2026 License: Apache-2.0

README

go-asn1

Compiled ASN.1 specifications as native Go packages with generated marshal/unmarshal codecs.

Installation

go get github.com/gomaja/go-asn1@main

No tagged releases are published. Depend on the main branch and update with go get github.com/gomaja/go-asn1@main; do not use @latest or go get -u, which resolve older tagged versions still cached by the Go module proxy.

Usage

import "github.com/gomaja/go-asn1/telecom/lte/x2ap"

// Decode an X2AP PDU from APER bytes
var pdu x2ap.X2APPDU
err := pdu.UnmarshalAPER(data)

// Re-encode (byte-exact round-trip)
encoded, err := pdu.MarshalAPER()

Available Protocols

Protocols marked with [compiled] have generated Go code. Others have placeholder directories ready for future compilation.

telecom/ — Telecommunications
telecom/lte/ — 3GPP LTE (4G)
Package Spec Interface Encoding Status
lte/s1ap S1AP S1 (eNB ↔ MME) APER [compiled]
lte/x2ap X2AP X2 (eNB ↔ eNB) APER [compiled]
lte/rrc LTE-RRC Uu (UE ↔ eNB) UPER [compiled]
lte/m2ap M2AP M2 (MCE ↔ eNB) APER planned
lte/m3ap M3AP M3 (MCE ↔ MME) APER planned
lte/lpp LPP LTE-Uu (UE ↔ E-SMLC) — planned
lte/lppa LPPa SLs (eNB ↔ E-SMLC) APER [compiled]
lte/lppe LPPe LTE-Uu (UE ↔ location server) — planned
lte/lcsap LCS-AP SLg (MME ↔ E-SMLC) APER planned
lte/sabp SABP Iu-BC (RNC ↔ CBC) APER planned
lte/sbc_ap SBc-AP SBc (MME ↔ CBC) APER planned
lte/pcap PCAP Iupc (RNC ↔ SAS) APER planned
telecom/nr/ — 3GPP NR (5G)
Package Spec Interface Encoding Status
nr/ngap NGAP NG (gNB ↔ AMF) APER planned
nr/xnap XnAP Xn (gNB ↔ gNB) APER planned
nr/e1ap E1AP E1 (CU-CP ↔ CU-UP) APER planned
nr/e2ap E2AP E2 (near-RT RIC ↔ RAN) APER planned
nr/f1ap F1AP F1 (CU ↔ DU) APER planned
nr/rrc NR-RRC NR-Uu (UE ↔ gNB) UPER planned
nr/nrppa NRPPa NRPPa (gNB ↔ LMF) APER planned
nr/kpm_v2 KPM v2 E2 (O-RAN KPM service) — planned
nr/rc_v3 RC v3 E2 (O-RAN RC service) — planned
telecom/umts/ — 3GPP UMTS (3G)
Package Spec Interface Encoding Status
umts/ranap RANAP Iu (RNC ↔ CN) APER planned
umts/rnsap RNSAP Iur (RNC ↔ RNC) APER planned
umts/rrc UMTS-RRC Uu (UE ↔ Node B) UPER [compiled]
umts/hnbap HNBAP Iuh (HNB ↔ HNB-GW) APER planned
umts/rua RUA Iuh (HNB ↔ HNB-GW) APER planned
umts/nbap NBAP Iub (Node B ↔ RNC) APER planned
umts/sabp SABP Iu-BC (RNC ↔ CBC) APER planned

Compiling telecom/umts/rrc needs about 4 GB in one Go compiler process. On small CI runners, set GOFLAGS=-p=2 or lower to limit concurrent builds.

telecom/gsm/ — 2G
Package Spec Interface Status
gsm/rrlp RRLP Um (MS ↔ SMLC) planned
telecom/ss7/ — SS7 / Intelligent Network
Package Spec Interface Encoding Status
ss7/tcap TCAP MTP3/SCCP (transaction layer) BER [compiled]
ss7/ansi_tcap ANSI TCAP MTP3/SCCP (ANSI variant) BER planned
ss7/gsm_map GSM MAP C/D/E/Gr (HLR/VLR/MSC) BER [compiled]
ss7/camel CAMEL gsmSSF ↔ gsmSCF BER planned
ss7/inap INAP SSF ↔ SCF (IN CS-1/CS-2) BER planned
ss7/ain AIN SSP ↔ SCP (N. America) BER planned
ss7/charging_ase Charging ASE CAP/MAP (charging extension) BER planned
ss7/ros ROS — (Remote Operations base) BER planned
ss7/ansi_map ANSI MAP A/B/D (IS-41 ANSI variant) BER planned
ss7/isdn_sup ISDN supplementary DSS1 (Q.931/Q.932) BER planned
ss7/q932 Q.932 DSS1 (generic procedures) BER planned
ss7/q932_ros Q.932 ROS DSS1 (facility IE) BER planned
ss7/qsig QSIG QSIG (PBX ↔ PBX) BER planned
ss7/lnpdqp LNPDQP NPDB (number portability query) BER planned
telecom/esim/ — eSIM Provisioning
Package Spec Interface Status
esim/sgp22 SGP.22 ES9+ (LPA ↔ SM-DP+) planned
esim/sgp32 SGP.32 ES2+ (SM-DP+ ↔ SM-DS, IoT) planned
telecom/li/ — Lawful Interception
Package Spec Interface Status
li/HI2Operations HI2 HI2 (MF ↔ LEMF) planned
li/lix2 LI-X2 X2 (IRI-POI ↔ MF) planned
telecom/charging/ — 3GPP Charging
Package Spec Interface Status
charging/gprscdr GPRS CDR Ga (CDF ↔ CGF) planned
telecom/atn/ — Aeronautical Telecommunications
Package Spec Interface Status
atn/atn_cm ATN Context Management air-ground (aircraft ↔ ATC) planned
atn/atn_cpdlc ATN CPDLC air-ground (pilot ↔ controller) planned
atn/atn_ulcs ATN Upper Layer air-ground (ATN upper layer) planned
telecom/tetra/ — TETRA
Package Spec Interface Status
tetra/tetra TETRA Um (MS ↔ SwMI) planned
security/ — Security & PKI
security/x509/ — X.509 & Certificate Extensions
Package Spec Status
x509/x509af X.509 Authentication Framework planned
x509/x509ce X.509 Certificate Extensions planned
x509/x509if X.509 Information Framework planned
x509/x509sat X.509 Selected Attribute Types planned
x509/pkix1explicit PKIX1 Explicit planned
x509/pkix1implicit PKIX1 Implicit planned
x509/pkixac PKIX Attribute Certificate planned
x509/pkixalgs PKIX Algorithms planned
x509/pkixproxy PKIX Proxy Certificate planned
x509/pkixqualified PKIX Qualified Certificates planned
x509/pkixtsp PKIX Timestamp planned
x509/pkcs10 PKCS#10 (CSR) planned
x509/pkcs12 PKCS#12 (key store) planned
x509/ocsp OCSP planned
x509/logotypecertextn Logotype Certificate Ext planned
x509/wlancertextn WLAN Certificate Ext planned
x509/ns_cert_exts Netscape Certificate Ext planned
x509/cbrs_oids CBRS OIDs planned
x509/nist_csor NIST CSOR planned
x509/novell_pkis Novell PKIS planned
x509/tcg_cp_oids TCG CP OIDs planned
security/cms/ — Cryptographic Message Syntax
Package Spec Status
cms/cms CMS (RFC 5652) planned
cms/ess ESS (RFC 2634) planned
cms/cmp CMP (RFC 4210) planned
cms/crmf CRMF (RFC 4211) planned
security/auth/ — Authentication
Package Spec Status
auth/kerberos Kerberos (RFC 4120) planned
auth/pkinit PKINIT planned
auth/spnego SPNEGO planned
auth/credssp CredSSP planned
directory/ — X.500 / LDAP
Package Spec Interface Status
directory/ldap LDAP TCP/IP (client ↔ directory) planned
directory/dap DAP DUA ↔ DSA planned
directory/dsp DSP DSA ↔ DSA (chaining) planned
directory/disp DISP DSA ↔ DSA (shadow replication) planned
directory/dop DOP DSA ↔ DSA (operational binding) planned
directory/x721 X.721 manager ↔ agent (managed objects) planned
voip/ — Voice over IP (H.323 family)
Package Spec Interface Status
voip/h225 H.225 RAS: EP ↔ GK; Q.931: EP ↔ EP planned
voip/h235 H.235 — (security framework for H.323) planned
voip/h245 H.245 EP ↔ EP (media control channel) planned
voip/h248 H.248/Megaco MGC ↔ MG (media gateway control) planned
voip/h282 H.282 FECC (far-end camera control) planned
voip/h283 H.283 LCT (logical channel transport) planned
voip/h323 H.323 — (umbrella signaling) planned
voip/h450 H.450 EP ↔ EP (supplementary services) planned
voip/h450_ros H.450 ROS EP ↔ EP (remote operations) planned
voip/h460 H.460 EP ↔ GK (NAT/firewall traversal) planned
voip/h501 H.501 PE ↔ PE (address resolution) planned
voip/t124 T.124 GCC (conference control) planned
voip/t125 T.125 MCS (multipoint communication) planned
voip/t38 T.38 GW ↔ GW (fax over IP) planned
network/ — Network Management
Package Spec Interface Status
network/snmp SNMP manager ↔ agent (UDP/161) planned
network/cmip CMIP manager ↔ agent (OSI stack) planned
messaging/ — X.400 Messaging
Package Spec Interface Status
messaging/p1 P1 MTA ↔ MTA (message transfer) planned
messaging/p7 P7 UA ↔ MS (message store access) planned
messaging/p22 P22 UA ↔ UA (interpersonal messaging) planned
messaging/p772 P772 MMHS (military messaging) planned
messaging/smrse SMRSE SMSC ↔ SMSC (SMS relay) planned
osi/ — OSI Protocols
Package Spec Interface Status
osi/acse ACSE — (association control, layer 7) planned
osi/pres Presentation Layer — (OSI layer 6) planned
osi/rtse RTSE — (reliable transfer, layer 7) planned
osi/ftam FTAM — (file transfer, layer 7) planned
transport/ — Transport & Location
Package Spec Interface Status
transport/ieee1609dot2 IEEE 1609.2 DSRC/C-V2X (V2X security) planned
transport/its ITS ETSI ITS-G5 (vehicle ↔ infra) planned
transport/ulp ULP SET ↔ SLP (SUPL user plane) planned
transport/ilp ILP SPC ↔ SLC (SUPL internal) planned
energy/ — Power Grid (IEC 61850)
Package Spec Interface Status
energy/goose GOOSE IED ↔ IED (multicast events) planned
energy/sv Sampled Values MU ↔ IED (multicast samples) planned
energy/mms MMS client ↔ server (IEC 61850 MMS) planned
metering/ — Smart Metering
Package Spec Interface Status
metering/cosem DLMS/COSEM client ↔ meter (smart metering) planned
other/ — Miscellaneous
Package Spec Status
other/z3950 Z39.50 (library search) planned
other/c1222 C12.22 (metering) planned
other/cdt CDT planned
other/gdt GDT planned
other/glow Ember+ Glow planned
other/akp AKP planned
other/acp133 ACP 133 (military dir) planned
other/idmp IDMP planned
other/mpeg_audio MPEG Audio planned
other/mpeg_pes MPEG PES planned
other/mudurl MUD URL planned
other/llc_v1 LLC v1 planned

Encoding Rules

Encoding Description Used by
APER Aligned PER S1AP, X2AP, NGAP, RANAP, and most 3GPP signaling
UPER Unaligned PER LTE-RRC, NR-RRC, and radio interface protocols
BER/DER Basic/Distinguished Encoding Rules TCAP, MAP, CAMEL, X.509, LDAP, SNMP
OER Octet Encoding Rules Some ITS specs

License

Licensed under the Apache License, Version 2.0. See NOTICE for the attribution of the third-party specifications from which the packages are generated.

Directories

Path Synopsis
Package runtime provides common ASN.1 runtime types used by generated code.
Package runtime provides common ASN.1 runtime types used by generated code.
ber
Package ber provides BER/DER encoding and decoding primitives.
Package ber provides BER/DER encoding and decoding primitives.
constraint
Package constraint provides ASN.1 constraint representations.
Package constraint provides ASN.1 constraint representations.
per
Package per implements PER (Packed Encoding Rules) codec primitives for ASN.1 UPER and APER encoding/decoding.
Package per implements PER (Packed Encoding Rules) codec primitives for ASN.1 UPER and APER encoding/decoding.
tag
Package tag provides ASN.1 tag definitions and utilities.
Package tag provides ASN.1 tag definitions and utilities.
telecom
lte/lppa
Package lppa contains generated APER codecs.
Package lppa contains generated APER codecs.
lte/rrc
Package rrc contains generated UPER codecs.
Package rrc contains generated UPER codecs.
lte/s1ap
Package s1ap contains generated APER codecs.
Package s1ap contains generated APER codecs.
lte/x2ap
Package x2ap contains generated APER codecs.
Package x2ap contains generated APER codecs.
umts/rrc
Package rrc contains generated UPER codecs.
Package rrc contains generated UPER codecs.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL