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

please help me-silly or is there a typo? #52

Open
yarikoptic opened this issue Oct 6, 2016 · 3 comments
Open

please help me-silly or is there a typo? #52

yarikoptic opened this issue Oct 6, 2016 · 3 comments

Comments

@yarikoptic
Copy link

New to multihash (sounds sound ;) ) so pardon my ignorance and possibly RTFM question.
https://github.com/multiformats/multihash/blob/master/README.md#idea-self-describe-the-values-to-distinguish
has an example for sha3 256 which starts with 1420caad, but according to the multihash table (https://github.com/multiformats/multihash/blob/master/README.md#table-for-multihash-v100-rc-semver) 0x16 sha3-256. So why example doesn't start with 16? (I guessed that those examples are autogenerated so there must be no mistakes/bug, thus I guess it is all my misunderstanding)

@satra
Copy link

satra commented Oct 6, 2016

sha3 used to be 14 but has been deprecated, so i believe the readme is out of date in those pictures.

also in that picture sha2-512 should have length: 0x40 not 0x20

but only the captain @jbenet can clarify ;)

@Nemo157
Copy link

Nemo157 commented Nov 3, 2016

The 0x20 byte sha2-512 multihash is a valid multihash. It means the resulting 512-bit hash has been truncated to 256-bits and only those first 256-bits of the hash should be checked when validating the hash (see #1 (comment)).

Although, that reference is still just a comment in an issue, it really should be added to the actual spec if it is going to be the standard.

@RichardLitt
Copy link
Member

@Nemo157 Want to make a PR? :)

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

4 participants