Earlier quoted context omitted.
Would you rather write a parser for this: SEQUENCE { SEQUENCE { OBJECT IDENTIFIER '1 2 840 113549 1 1 1' NULL } BIT STRING 0 unused bits, encapsulates { SEQUENCE { INTEGER 00 EB 11 E7 B4 46 2E 09 BB 3F 90 7E 25 98 BA 2F C4 F5 41 92 5D AB BF D8 FF 0B 8E 74 C3 F1 5E 14 9E 7F B6 14 06 55 18 4D E4 2F 6D DB CD EA 14 2D 8B F8 3D E9 5E 07 78 1F 98 98 83 24 E2 94 DC DB 39 2F 82 89 01 45 07 8C 5C 03 79 BB 74 34 FF AC 04 AD 15…
The ASN.1 notation wasn't meant for parsing. And then people started writing parsing generators for it, so they adapted. However, you're abusing a text format for human reading and pretending it's a serialization format. The BER/PER are binary formats and great where binary formats are needed. You also have XER (XML) and JER (JSON) if you want text. You can create an s-expr encoding if you want. Separate ASN.1--the d…
They should be the same, in order to facilitate human debugging. And we were discussing ASN.1, not its serialisations. Frankly, I thought that it was fairer to compare the S-expression to ASN.1, because both are human-readable, rather than to an opaque blob like:
MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDrEee0Ri4Juz+QfiWYui/9UGSXau/2P8LjnTD8V4Unn+2FAZVGE3kL23bzeoULYv4PeleB3gfm
Sure, that blob is far more space-efficient, but it’s also completely opaque without tooling. Think how many XPKI errors over the years have been due to folks being unable to know at a glance what certificates and keys actually say.