Bulat-Ziganshin / FARSH

Fast and Reliable (but not Secure) Hash
MIT License
53 stars 4 forks source link

zzHash-wide internal state 96 bytes and using levels off chunking #5

Open Alain2019 opened 5 years ago

Alain2019 commented 5 years ago

Hi

I've seen you're efforts to get xxhash33 -> 128 bit hash with two levels of chunking.

Using 2 levels needs the chunk-size to be a multiple of the internal state. (Not with 1 level, you then get a new "stream" that can be hashed, it doesn't has to fit in chunk).

This is not easy with an internal state of 96 bytes (or 12 64-bit words), but is rather easy with an internal state of 64 bytes (or 8 64-bit words). Was there a speed benefit in going to 12 words instead of 8 words? (i know that 12 is more or less the maximum on x64 because there are 16 64-bit registers.)