Currently existing Go libraries for asn1 support are either reflection-based (crypto/asn1) or very low-level (golang.org/x/crypto/cryptobyte). Idea is to provide Protobuf-like experience for working with ASN1 in Golang.
Originally started to back gorberos kerberos wannabe-library.
- Custom Lexer consumes from bufio.Reader and called by Parser
- Parser is built using goyacc based on BNF provided in X.680 standard. As the result, Parser produces ASN1 module AST.
- AST is used by Code Generator to produce declarations, serialization, and deserialization code.
- Lexer
- identifiers
- numbers
- keywords
- symbols
- strings, bit strings, hex strings
- XML
- Parser
- module definition BNF
- parse Kerberos (rfc4120)
- yield AST from parser
- parse SNMPv1 (rfc1157, rfc1155)
- parse LDAP (rfc4511)
- SNMPv2 (rfc3411–3418)
- Code Generator
- declaration generator
- crypto/asn1 compatible generation mode
- verify serialization on Kerberos
- DER serialization generator
- DER deserialization generator