Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Is there an agreed-upon URI and namespace for multihash? #132

Open
IS4Code opened this issue Apr 11, 2021 · 5 comments
Open

Is there an agreed-upon URI and namespace for multihash? #132

IS4Code opened this issue Apr 11, 2021 · 5 comments

Comments

@IS4Code
Copy link

IS4Code commented Apr 11, 2021

In XML signatures and linked data, one would use a URI for a particular hash function, like http://www.w3.org/2001/04/xmldsig-more#md5 for the MD5 function, and the prefix urn:md5: to identify a byte stream with its hash (for use in a magnet: link for example). Sorry if this is not the right place to ask, but are these conventions used here? I have found one instance of urn:multihash:, so that seems usable enough, but I am clueless about the URI.

One could say that if you already have a way to specify the hash function together with its result, there is not much advantage to using multihash, but not all hashes have existing identifiers, so a way to use its identifier table would be useful.

@vmx
Copy link
Member

vmx commented Apr 12, 2021

I guess if a URI is required, it would then just point to Multihash, without pointing to a specific algorithm as the Multihash value itself already contains the information about the hash algorithm.

@troyronda
Copy link

An urn:multihash namespace would be useful.

It would also be good to include the multibase character.

urn:multihash:<mb><multihash>

@melvincarvalho
Copy link

melvincarvalho commented Aug 4, 2022

@IllidanS4 I raised this same question in the W3C community group on multihash

See these two specs proposed to the IETF:

https://www.ietf.org/id/draft-multiformats-multibase-05.html
https://www.ietf.org/id/draft-multiformats-multihash-04.html

FYI: here is the issue I raised:

w3c-ccg/multihash#20

It seems that we could register a mh:// URI scheme perhaps, but this does not take into account multibase and CIDs. Still room for discussion but it would be good to get something stable, nailed down quite soon for those interested in the URI part.

Currently mh: is preferred slightly to multihash: as it is more compact. While less descriptive, I think most could live with mh and it mirrors things like ni

@rvagg
Copy link
Member

rvagg commented Aug 8, 2022

could mh:// just dictate that the following string be a multibase representation of the multihash?

@joakim
Copy link

joakim commented Jan 13, 2023

When there's no authority, there shouldn't be a //, shaving off a few more bytes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants