-
Notifications
You must be signed in to change notification settings - Fork 114
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
Supporting KangarooTwelve #108
Comments
Do they provide any benefit over blake2b? |
@Stebalien According to the benchmark KangarooTwelve is 2.92/2.21=1.32x faster than BLAKE2b, since kangarooTwelve is engineered by Team Keccak to be an ultra-fast version of SHAKE arbitrary length hash (see https://keccak.team/kangarootwelve.html for more info) |
For future reference this will come in handy multiformats/multicodec#56 |
I see, I was looking at a different benchmark. It appears to really depend on the CPU. I'm not really against these but I'd like to carefully consider which ones are likely to be used for identifying content (needs a single byte code). Do you know of any existing users of these hash functions? |
@Stebalien If I were to be in charge of Multihash, I would treat the multihash ID as book indexing, where each code can have up to 4 bytes, so that many different types of hashes are included.
|
I just don't want to regret any decisions later. Either regret choosing a short code because we never use it or regret choosing a long code because we find it really useful. However, I agree with your analysis. This seems useful to include as either a 2 or 3 byte code. |
Since BLAKE3 exists as a replacement for BLAKE2, it might be a good idea to reconsider K12. |
I would like KangarooTwelve and MarsupilamiFourteen to be added to Multiformats as K12 is faster than SHA1, and M14 is expected to be as about as fast as SHA1 and twice as fast as SHA256.
Statistics: https://bench.cr.yp.to/results-hash.html#oki
M12 is 2.21 cpb, M14 is assumed to be 2.21*(14/12)*(168/136)=3.185 Cycles per byte
For comparison, SHA1 is 3.06 cpb, MD5 is 4.33 cpb, and SHA256 is 6.65 cpb
The text was updated successfully, but these errors were encountered: