{"id":2408,"date":"2023-09-05T18:23:45","date_gmt":"2023-09-06T01:23:45","guid":{"rendered":"https:\/\/self-issued.info\/?p=2408"},"modified":"2023-09-05T21:56:28","modified_gmt":"2023-09-06T04:56:28","slug":"multiformats-considered-harmful","status":"publish","type":"post","link":"https:\/\/self-issued.info\/?p=2408","title":{"rendered":"Multiformats Considered Harmful"},"content":{"rendered":"<p><span class=\"plain\"><img decoding=\"async\" align=\"right\" src=\"https:\/\/self-issued.info\/images\/ietf-logo.png\" alt=\"IETF logo\"><\/span>While I usually reserve my time and energy for advancing good ideas, I\u2019m making an exception to publicly state the reasons why I believe \u201c<a href=\"https:\/\/github.com\/msporny\/charter-ietf-multiformats\/\">multiformats<\/a>\u201d should not be considered for standardization by the IETF.<\/p>\n<p>1. Multiformats institutionalize the failure to make a choice, which is the opposite of what good standards do.  Good standards make choices about representations of data structures resulting in interoperability, since every conforming implementation uses the same representation.  In contrast, multiformats enable different implementations to use a multiplicity of different representations for the same data, harming interoperability.  <a href=\"https:\/\/datatracker.ietf.org\/doc\/html\/draft-multiformats-multibase-03#appendix-D.1\">https:\/\/datatracker.ietf.org\/doc\/html\/draft-multiformats-multibase-03#appendix-D.1<\/a> defines 23 equivalent and non-interoperable representations for the same data!<\/p>\n<p>2. The stated purpose of \u201c<a href=\"https:\/\/www.ietf.org\/archive\/id\/draft-multiformats-multibase-08.html\">multibase<\/a>\u201d is \u201c<i>Unfortunately, it&#8217;s not always clear what base encoding is used; that&#8217;s where this specification comes in. It answers the question: Given data &#8216;d&#8217; encoded into text &#8216;s&#8217;, what base is it encoded with?<\/i>\u201d, which is wholly unnecessary.  Successful standards DEFINE what encoding is used where.  For instance, https:\/\/www.rfc-editor.org\/rfc\/rfc7518.html#section-6.2.1.2 defines that \u201cx\u201d is base64url encoded.  No guesswork or prefixing is necessary or useful.<\/p>\n<p>3. Standardization of multiformats would result in unnecessary and unhelpful duplication of functionality \u2013 especially of key representations.  The primary use of multiformats is for \u201cpublicKeyMultibase\u201d \u2013 a representation of public keys that are byte arrays.  For instance, the only use of multiformats by the <a href=\"https:\/\/www.w3.org\/TR\/did-core\/\">W3C DID spec<\/a> is for publicKeyMultibase.  The IETF already has several perfectly good key representations, including X.509, JSON Web Key (JWK), and COSE_Key.  There\u2019s not a compelling case for another one.<\/p>\n<p>4. publicKeyMultibase can only represent a subset of the key types used in practice.  Representing many kinds of keys requires multiple values \u2013 for instance, RSA keys require both an exponent and a modulus.  By comparison, the X.509, JWK, and COSE_Key formats are flexible enough to represent all kinds of keys.  It makes little to no sense to standardize a key format that limits implementations to only certain kinds of keys.<\/p>\n<p>5. The \u201c<a href=\"https:\/\/www.ietf.org\/archive\/id\/draft-multiformats-multihash-07.html\">multihash<\/a>\u201d specification relies on a non-standard representation of integers called \u201cDwarf\u201d.  Indeed, the referenced Dwarf document lists itself as being at http:\/\/dwarf.freestandards.org\/ &#8211; a URL that no longer exists!<\/p>\n<p>6. The \u201cMultihash Identifier Registry\u201d at <a href=\"https:\/\/www.ietf.org\/archive\/id\/draft-multiformats-multihash-07.html#mh-registry\">https:\/\/www.ietf.org\/archive\/id\/draft-multiformats-multihash-07.html#mh-registry<\/a> duplicates the functionality of the IANA \u201cNamed Information Hash Algorithm Registry\u201d at <a href=\"https:\/\/www.iana.org\/assignments\/named-information\/named-information.xhtml#hash-alg\">https:\/\/www.iana.org\/assignments\/named-information\/named-information.xhtml#hash-alg<\/a>, in that both assign (different) numeric identifiers for hash functions.  If multihash goes forward, it should use the existing registry.<\/p>\n<p>7.  It\u2019s concerning that <a href=\"https:\/\/msporny.github.io\/charter-ietf-multiformats\/\">the draft charter<\/a> states that \u201c<i>Changing current Multiformat header assignments in a way that breaks backward compatibility with production deployments<\/i>\u201d is out of scope.  Normally IETF working groups are given free rein to make improvements during the standardization process.<\/p>\n<p>8. Finally, as a member of the W3C DID and W3C Verifiable Credentials working groups, I will state that it is misleading for the draft charter to say that \u201c<i>The outputs from this Working Group are currently being used by \u2026 the W3C Verifiable Credentials Working Group, W3C Decentralized Identifiers Working Group\u2026<\/i>\u201d.  The documents produced by these working groups intentionally contain no normative references to multiformats or any data structures derived from them.  Where they are referenced, it is explicitly stated that the references are non-normative.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>While I usually reserve my time and energy for advancing good ideas, I\u2019m making an exception to publicly state the reasons why I believe \u201cmultiformats\u201d should not be considered for standardization by the IETF. 1. Multiformats institutionalize the failure to make a choice, which is the opposite of what good standards do. Good standards make [&hellip;]<\/p>\n","protected":false},"author":4,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[32,25],"tags":[],"class_list":["post-2408","post","type-post","status-publish","format-standard","hentry","category-ietf","category-specifications"],"_links":{"self":[{"href":"https:\/\/self-issued.info\/index.php?rest_route=\/wp\/v2\/posts\/2408","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/self-issued.info\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/self-issued.info\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/self-issued.info\/index.php?rest_route=\/wp\/v2\/users\/4"}],"replies":[{"embeddable":true,"href":"https:\/\/self-issued.info\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=2408"}],"version-history":[{"count":2,"href":"https:\/\/self-issued.info\/index.php?rest_route=\/wp\/v2\/posts\/2408\/revisions"}],"predecessor-version":[{"id":2411,"href":"https:\/\/self-issued.info\/index.php?rest_route=\/wp\/v2\/posts\/2408\/revisions\/2411"}],"wp:attachment":[{"href":"https:\/\/self-issued.info\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=2408"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/self-issued.info\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=2408"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/self-issued.info\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=2408"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}