Comment by pocksuppet
13 hours ago
ASN.1 is protobufs designed by committee. It is a general-purpose serialization format, but there's no good reason to choose it instead of protobufs.
13 hours ago
ASN.1 is protobufs designed by committee. It is a general-purpose serialization format, but there's no good reason to choose it instead of protobufs.
> It is a general-purpose serialization format
Yes. My point is that in practice it hasn't really been used for much outside of cryptography.
> there's no good reason to choose it instead of protobufs
Well, the reason it is used in a lot of the places it is, is because protobufs didn't exist when those protocols or file formats were created.
There are also some things that ASN.1 does better at a technical level. Of important significance to cryptography is that the DER representation is "canonical", meaning that there is only one way to serialize a set of data to bytes. That's important because it means that you can just hash the contents of the serialization for signatures, rather than having to have some kind of separate canonicalization step (which is a common source of mistakes).