- From: Manu Sporny <msporny@digitalbazaar.com>
- Date: Mon, 13 Aug 2018 22:31:50 -0400
- To: public-credentials@w3.org
On 08/13/2018 09:42 AM, elf-pavlik@hackers4peace.net wrote: > Could you possibly explain very shortly how does it compare to RFC > 6920 Naming Things with Hashes > https://datatracker.ietf.org/doc/rfc6920/ Yes, we've actually used RFC 6920 for many years... > It seams like both try to address including information about > algorithm used and hash length. You could argue that ni:// is for a different set of use cases than multihash. ni:// is useful when you're pointing to things with domain names and possibly query parameters in them. Things that typically map to HTTP .well-known URLs. Things that you probably wouldn't copy-paste around, etc. Multihash is useful when you want a compact, deterministic, copy-pasteable, binary and human representation of a hash. You get deterministic with ni://, but you don't get compact, copy-paste, or binary and human representations at the same time. For example, let's say I wanted to link to a content addressed document on a server... I could do this using RFC 6920: ni://example.com/blake2s-128;slAQCk7G8WKeSSYtcJPi+CoyeA== ... which would be translated to this: http://example.com/.well-known/ni/blake2s-128/slAQCk7G8WKeSSYtcJPi+CoyeA== or if I wanted to use a particular file path for URLs with clean semantics, I'd do this: https://example.com/documents?id=ni%3A%2F%2F%2Fblake2s-128%3BslAQCk7G8WKeSSYtcJPi%2BCoyeA%3D%3D Developers may find the ergonomics of the two URLs above problematic. Now compare the above with using a multihash to solve the same problem: https://example.com/documents/ZeM3u9YD2obamakRCRczRzJza3 The URL above expresses the same thing that the ni:// value above expresses... but it's a lot cleaner to work with. There are a number of other advantages, but hopefully that provides some idea of why multihashes are typically preferred over ni:// style URLs. -- manu -- Manu Sporny (skype: msporny, twitter: manusporny, G+: +Manu Sporny) Founder/CEO - Digital Bazaar, Inc. blog: The State of W3C Web Payments in 2017 http://manu.sporny.org/2017/w3c-web-payments/
Received on Tuesday, 14 August 2018 02:32:37 UTC