After 29 years, Rivest’s S-expression draft is an RFC.
They are a straightforward, easy-to-parse S-expression format whose canonical representation is useful for cryptography. They are suitable as a general replacement for JSON, XML, HTML, ASN.1 and more.
Note that this is not a translation of the X.509 certificate above, though — I pulled it from <https://datatracker.ietf.org/doc/html/draft-ietf-spki-cert-e...>. Note that this is a very 90s example: MD5 and a bespoke data format instead of SHA-2 and ISO 8601.
I think it’s clear that an SPKI certificate is much, much more readable.
After 29 years, Rivest’s S-expression draft is an RFC.
They are a straightforward, easy-to-parse S-expression format whose canonical representation is useful for cryptography. They are suitable as a general replacement for JSON, XML, HTML, ASN.1 and more.
This XML (from https://www.w3schools.com/xml/note.xml):
could be this S-expression: But if every note must have a body, this might make even more sense:This JSON (taken from https://www.w3schools.com/js/js_json_intro.asp):
could be this S-expression: The canonical representation (suitable for cryptographic hashing) would be ((4:name4:John)(3:age2:30)(3:car())).The DER-encoded ASN.1 byte sequence Base64-encoded to MBMCAQUWDkFueWJvZHkgdGhlcmU/ could be represented as:
While we are all familiar with opaque X.509 certificates such as (from https://www.fm4dd.com/openssl/source/PEM/certs/512b-rsa-exam...): an SPKI certificate might be: Note that this is not a translation of the X.509 certificate above, though — I pulled it from <https://datatracker.ietf.org/doc/html/draft-ietf-spki-cert-e...>. Note that this is a very 90s example: MD5 and a bespoke data format instead of SHA-2 and ISO 8601.I think it’s clear that an SPKI certificate is much, much more readable.