My main concern was speed and assurance that i would not see collisions. Beyond that, i am clearly naive on the subject.
My main concern was speed and assurance that i would not see collisions. Beyond that, i am clearly naive on the subject.
- Is there an (abstract) attack model? (Assuming that you have one if you ought to)
- Then: Can an attacker insert collisions into the DB, and is that problematic?
- Then: A non-cryptographic hash might be much easier to "reverse", especially for short inputs. Is that problematic?
If none of these are problematic you probably don't need a cryptographic hash.
Regarding performance: BLAKE2b on a Haswell gives you, in a "naive", pure C implementation (compiled to pure, non-vectorized AMD64 assembly), about 230 MB/s / GHz. (Referring to https://github.com/borgbackup/borg/issues/45#issuecomment-22... ), ie. something like 850-1000 MB/s on a desktop SKU. There are implementations that are around 10-30 % faster than that.
AFAIK all these newer n-c hash functions that popped up in the last couple years perform (on desktop SKUs) in the area of beyond ~10 GB/s.
Note that I am not a cryptographer, and my only piece of advice is: For the sake of god, don't use hash functions not designed for cryptographic security, if you need cryptographic security. It's that simple.
I would tend to say that SipHash is, in a cryptographic context, more an "if you know what you're doing" choice, and not at all a general purpose [cryptographic] hash function.
The paper clearly states that it is not collision resistant.
What I think of as "cryptographic hash function" is a function resistent to pre-image attack, second pre-image attack, and collision generation.
Neither of those are satisfied by SipHash, and can thus not classify as a cryptographic hash function by the normal definition.
If you need fingerprints, don't use SeaHash, but if you are looking to insert into e.g. a hash table, you shouldn't use BLAKE2. It's awfully slow for that.
That's a wide difference, around 32x faster.