Hacker News new | ask | show | jobs
by userbinator 3715 days ago
Almost every time I see yet another structured data format I'm surprised at the number of people who haven't ever heard of ASN.1, despite it forming the basis of many protocols in widespread use.
3 comments

Usual ASN.1 caveat: parsing its specifications requires money and a lot of time, implementing many of its encodings (e.g. unaligned PER) is a lifetime's work, and even the simpler ones thousands of eyes haven't managed to get right despite years of effort (see OpenSSL, NSPR, etc)

ASN.1 also has a million baroque types (VideotexString, anyone?) where most people just need "string", "small int", "big int", etc.

Some more on BER parsing hell here: https://mirage.io/blog/introducing-asn1

Usual ASN.1 caveat: parsing its specifications requires money and a lot of time, implementing many of its encodings (e.g. unaligned PER) is a lifetime's work

...unless you're Fabrice Bellard, who apparently wrote one just because it was one of the minor obstacles on the way to writing a full LTE base station:

http://www.bellard.org/ffasn1/

We heard of it and we despise it. It's the most horrible structured data format out there in the wild. Even worse than XML, and this is quite something.
10.5.7.34.211.3.7.9.7.3.1.4 YOUAREINTHEHELLOFTHOBJECTIDENTIFIERS.