-
Notifications
You must be signed in to change notification settings - Fork 29
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Hash has arbitrary seed-independent multicollisions, is not DoS resistant #83
Comments
Thanks a lot for this analysis @orlp! Let's see if we can improve DoS resistance without compromising performance. I don't know if it can be made 100% proof but I'm sure it can be improved (maybe using the seed in the main construction). Btw DoS resistance is not advertised (unless I missed something?). See in readme:
|
I disagree. The way it is worded it sounds like it has some DoS resistance when there is none at all. Similarly with multicollision resistance. |
Let's see first if we can address this 😄 Feel free to submit a PR if you want. |
Did not has much time to work on this, so in the meantime I've clarified the DOS resistance part in the readme https://github.com/ogxd/gxhash?tab=readme-ov-file#security |
There's probably a lot more problems with DoS resistance here. The most obvious one, IMO, is https://github.com/ogxd/gxhash/blob/main/src/hasher.rs#L113-L117
|
Mixing the seed at the start instead of the end should significantly improve DoS resistance. I'm currently (slowly) exploring this path. |
There are probably other issues as well, but this line is particularly problematic:
gxhash/src/gxhash/platform/x86.rs
Line 86 in 8bee61e
This is trivial to invert and allows you to create arbitrary seed-independent multicollisions. I would suggest not advertising DoS resistance on this hash at all.
The text was updated successfully, but these errors were encountered: