Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

ASN.1

> Abstract Syntax Notation One (ASN.1) is a standard interface description language for defining data structures that can be serialized and deserialized in a cross-platform way. It is broadly used in telecommunications and computer networking, and especially in cryptography.

https://en.wikipedia.org/wiki/Abstract_Syntax_Notation_One

Or keep re-inventing the wheel. It's not like the people paying you will notice or care, eh?



Asn.1 is incredibly hard to actually implement . There are dozens of cases of security bugs based on bad parsers. Also there are a dozen different encodings of asn.1 data including json (JER). Its age also means that it has a bunch of obsolete datatypes.

Protobuf and friends have most of the power without a lot of the drawbacks.


> Asn.1 is incredibly hard to actually implement.

For whom?

> There are dozens of cases of security bugs based on bad parsers.

You're saying this on a thread called "Parsing JSON Is a Minefield", eh?

In any event, this is not unique to ASN.1. I haven't checked but I don't doubt there are similar cases for Protobuf, etc.

> Also there are a dozen different encodings of asn.1 data including json (JER).

So what? That's the opposite of a problem.

> Its age also means that it has a bunch of obsolete datatypes.

So don't use them.

- - - -

My point is that if the time and effort that was spent on Protobuf and CapnProto and all the others had somehow been spent instead on perfecting ASN.1 then, uh, that would have been good...


> My point is that if the time and effort that was spent on Protobuf and CapnProto and all the others had somehow been spent instead on perfecting ASN.1 then, uh, that would have been good...

I wrote proto2 in 20% time at Google and I developed Cap'n Proto entirely on my own time, unpaid. If you think ASN.1 could be perfected with a similar amount of work then why don't you do it?


It seems like I may have offended you, I didn't mean to, and I apologize.

I'd love to discuss this but don't want to get in a flame war.

In re: ASN.1, if I ever have to de/serialize some messages again (I'm quasi-retired ATM) I would use ASN1SCC "an ASN.1 compiler that was developed for ESA to cover all data modelling needs of space applications."

> The compiler is targetting safe systems and generate either Spark/Ada or C code. Runtime library is minimalistic and open-source. The tool handles custom binary encoding layouts, is fully customizable through a code templating engine, generates ICDs and automatic test cases."

https://essr.esa.int/project/asn1scc-asn-1-space-certifiable...




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: