Hacker News new | ask | show | jobs
by Nvorzula 1992 days ago
To my understanding they're both [type, length, content] encoded formats, so they're similar there at least.

In my experience people really quite enjoy the IDL aspect of protobuf as the killer feature, and I am not sure any such compiler exists for ASN1.

2 comments

ASN.1 is specified as a compilable language. Open source compilers, such as snacc, have existed for 30 years. ASN.1 also defines multiple encodings, DER is used in crypto as you can compare encoded blocks bit by bit. Other encoding rules, such as BER, are tagged. Protobuffers is the same thing re-invented by people who probably never saw ASN.1.
ASN.1 is basically an IDL. There are multiple encodings for ASN.1 but DER is one of the most common ones (you can also encode to JSON or XML).

DER is indeed TLV (tag-length-value) and there are many code generators available.