-
Notifications
You must be signed in to change notification settings - Fork 115
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
Capture payload size in the multihash #163
Comments
I should note that it was suggested to me to create a PR for this repo and perhaps call this multihash v2, however as per FAQ I don't feel like using it everywhere we use multihash is better not to mention pain of upgrade it would introduce. That said I think it is good idea to have a format for a fairly common (at least in my experience) use case that can be recommended in place of sidecar If there is both support and desire to make this into a real think I can take write something more formal, but even then could use some feedback in regards where description of this document should live and what format should it have. |
Can't the digest size be deduced? This would cleanup all the space that the multi-output hashes are taking up like blake2s and skein |
The digest size currently specifies truncation. For some hash functions (e.g., blake3), smaller digests are prefixes of larger digests so we only need one code. However, for hash functions like blake2b, different sizes produce entirely different digests. |
I understand, and that information is redundant if there is a payload size because you can deduce the hash size from the payload size. |
Almost in all instance where we use raw multihash we find ourselves capturing payload size an the side. It is also probably worth calling the fact that somewhat recently fr32-sha2-256-trunc254-padded-binary-tree multihash was defined to capture payload size to address potential vulnerabilities.
Given how common it is to want to capture payload size I would like to propose "multihash multihash" format that is multihash variant that uses multihash code
0x31
and encodes information about payload size and digest. Here is the exact format I'd like to proposeFormat
FAQ
The text was updated successfully, but these errors were encountered: