3 ms·
> So I can use it in my hash-map, or whatever O(1) lookup... BTW in the past (20 years ago?) there have been attacks on non-cryptographic hashes used for hash
by TacticalCoder 2y ago
> So I can use it in my hash-map, or whatever O(1) lookup...
BTW in the past (20 years ago?) there have been attacks on non-cryptographic hashes used for hash maps: denial of service by creating crafted requests to HTTP servers... The parameteres would be picked maliciously and would be all ending in the same "buckets". That attack worked on both Java and PHP servers. IIRC it's been solved by adding random seeding (and I noticed that GxHash mentions it's seedable: not saying it'd counter every attack but it's already something).
- Quarrel 2y agoVery good point, and one I had heard of, but wasn't considering here.
- chii 2y ago> there have been attacks on non-cryptographic hashes used for hash maps There have been places where a dev chose to use a non-cryptographic hash when they should not have, because they hadn't thought of the threat model (out of ignorance, or just didnt occur to them). But in most cases, nothing happens. They gained performance, or ease of development, etc. So it's a worthy trade off most of the time (whether they did it knowingly or not).