multiformats/multihash

Skein hash (for fine-grained uses)

DonaldTsang opened this issue · 8 comments

Skein hashes can have arbitrary lengths.
Which means that the same algorithm can be used to generate 256, 512 and 1024 bit hashes.
A longer hash means files are less likely to have hash collisions.
They can also produce shorter hashes for convenience.
It is as fast as BLAKE, faster than all other SHA3 finalists and SHA2.

Using 3xx code for 256-XXX, 512-XXX and 1024-XXX skein hashes would be good.
http://www.skein-hash.info/sites/default/files/skein1.3.pdf
www.skein-hash.info/sites/default/files/NIST_CD_102610.zip

It also has a Python implementation
https://pythonhosted.org/pyskein/

Please use 3byte varint range in case of hashes that take so many values. 3byte range starts at 0x4000 inclusive.

1024 is smaller than 2^15, so 0xc for code (next to BLAKE2), 1 byte for which Skein hash it is.

1024 is smaller than 2^15, so 0xc for code (next to BLAKE2), 1 byte for which Skein hash it is.

Sorry, could you rephrase it? Blake is at 0xb2 XX

Sorry, I meant 0xb3 for Skein. Edited the table and code.
Laying out Skein256 before Skein512 and Skein1024 is okay, right?
There are only 32+64+128 hashes, or 224 hashes in total

The BLAKE hash's code in HERE does not match up with the implementation in HERE

Recheck this please