You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Are codes for Blake2b and Blake2s across implementations incosistent? #100
Hello, I'm not sure I'm missing something important here but in the list of implementations some use {Blake2b 0x40, Blake2s 0x41} and others {Blake2b 0xb240, Blake2s 0xb260}. The latter agreeing with multibase and multihash CSV tables.
It looks like this was changed to take into account the fact that these hash functions are parameterized over their length. 0xb240 is actually blake2b-512 while 0x40 didn't actually specify the length.
Activity
Stebalien commentedon Sep 19, 2018
No, the first ones look incorrect. Which implementation uses 0x40 and 0x41?
Stebalien commentedon Sep 19, 2018
Ah, interesting, it looks like it was changed a few years ago.
Stebalien commentedon Sep 19, 2018
It looks like this was changed to take into account the fact that these hash functions are parameterized over their length. 0xb240 is actually blake2b-512 while 0x40 didn't actually specify the length.
Stebalien commentedon Sep 19, 2018
One here: multiformats/clj-multihash#11
arnau commentedon Sep 19, 2018
True, worth mentioning that the ongoing PR #41 still has a mention to the 0x40 and 0x41.
ebkalderon commentedon Sep 28, 2018
The descriptions of the BLAKE2 hash codes on Multiformats.io and in the IETF draft spec for multihashes suggest that the correct codes for BLAKE2 are:
0xb2400xb2200xb2600xb250arnau commentedon Sep 28, 2018
Looks like this issue has been solved. Perhaps it would be good to mention in the list of implementations the ones that are not up to date?
Thanks for the help 👍
Stebalien commentedon Sep 28, 2018
I've been filing bugs but probably haven't found all of them.