3 ms·
I took a closer look, and it looks like the compression doesn't depend on the seed at all. This makes it look like any collision is a collision on all seeds.
by singron 2y ago
I took a closer look, and it looks like the compression doesn't depend on the seed at all. This makes it look like any collision is a collision on all seeds.
pub(crate) unsafe fn gxhash(input: &[u8], seed: State) -> State {
finalize(aes_encrypt(compress_all(input), seed))
}
For a hash table, you would normally use just the low bits to select a bucket, so this still protects you from collisions on just a subset of the bits, but if you can produce a large number of collisions on the exact 128-bit output, then it's not DOS-resistant.