3 ms·
Are there any advantages of protobuf over using DER encoded ASN.1 ? The format looks very similar. It looks like they kind of reinvented the wheel here.
by Aaargh20318 6y ago
Are there any advantages of protobuf over using DER encoded ASN.1 ? The format looks very similar. It looks like they kind of reinvented the wheel here.
- Nvorzula 6y agoTo 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.
- Aaargh20318 6y agoASN.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.
- mianos 6y agoASN.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.
- kevin_thibedeau 6y agoASN.1 has a lot of cruft, particularly with the string encodings.