Crypto hashes don't have a problem of being slow.. they are designed to be slow.
The conclusion tries to tie weak/fast hashes to crypto/secure hashes (the https mention), but they're worlds apart.
Crypto hashes don't have a problem of being slow.. they are designed to be slow.
The conclusion tries to tie weak/fast hashes to crypto/secure hashes (the https mention), but they're worlds apart.
Password hashes are designed to be slow, but those are a very distinct category of hash.
Cryptographic hash functions are usually designed to be fast since they are on the hot path for cryptographic signatures and for hash-based message authentication codes.
Password hashes are designed to be slow, but they are an entirely different beast.
The point about https in the conclusion is that the author’s PolyMur hash uses a polynomial construction related to GCM and poly1305, which makes it much harder to invert.
It's very common for keys to contain user input.
I never said they were.
> Crypto hashes don't have a problem of being slow.. they are designed to be slow.
No they're not. Only password-based key derivation functions are designed to be slow, every other hash tries to be as fast as possible within their security budget.
> The conclusion tries to tie weak/fast hashes to crypto/secure hashes (the https mention), but they're worlds apart.
Actually, the specific link I made between cryptographic strength universal hashing and maximum-speed universal hashing is precisely because they're not worlds apart. They use the same techniques, and stand on the same mathematical background.
The Siphashes are too short I think for general use, but when cut down and keyed they're okay for a hashmap.
Fast hashes are around 20.000 MiB/sec, blake2 around 350, siphash13 1800. That's insanely slow, for no benefits.
Nobody is talking about password hashes here.
This person's testing has blake3 at 250 cycles for small hashes. It's not a thousand times slower. And for a lot of uses, 250 cycles is plenty fast. That's like one uncached memory access.
That test does mention batching but I don't think it makes a particularly large difference, the paper shows 4 cycles per byte for 64 byte inputs and I don't think they're getting fancy: https://github.com/BLAKE3-team/BLAKE3-specs/blob/master/blak...
A modern AES-NI hash is 30.000 MiB/s. That's about 50x faster than blake3 or siphash13. And also not reversible.
When we look at hashes mentioned in this discussion where people are trying to be fast, blake3 is at 3000MB/s when vectorized, and cityhash, murmurhash, and siphash range from 5x faster to 2x slower if I take the smhasher numbers. There's not that much difference.
But also the number we need here is the latency of a small hash, not the max throughput. If blake3 takes 250 cycles for that, how much faster do you think you can go? You can't fit a reasonable hash into 10 cycles. You can't even fit o1hash into 10 cycles. And all of those numbers are pretty fast for most purposes.
AES-NI is a great tool! But isn't that arguing in favor of a crypto hash?
Not 10 cycles, but my polymur-hash can hash any value <= 49 bytes in 21 cycles on an Apple ARM machine: https://github.com/orlp/polymur-hash/.
I think it's a "reasonable hash" too, considering against non-interactive attackers it's provably secure (collision probability bounded up to n * 2^-60.2 for n bytes).