-
Notifications
You must be signed in to change notification settings - Fork 28
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Quality issue: permutations produce the same hashes? #44
Comments
Hello @Dherse, The "standard" hash function Given that the rust's default Hasher seems to generate order-dependent hashes, I'd say that the fact that Fixing this will only affect |
Thank you, I am a large contributor to https://github.com/typst/typst and I am trying to see whether gxhash could replace Siphash 1-3 that we're currently using since it has so much higher performance hence #7 and this issue! Anyway, looking forward to it 🎉 |
My bad, issue is still open, I only tackled the quality bench part for now |
Fixed and published in v2.3.1 🎉 |
I have noticed a strange behavior which I am not sure whether it is intended or not:
The hashes of two u8
a
andb
are the same regardless of order:(a, b).hash(&mut state)
(b, a).hash(&mut state)
This is an issue in my particular use case because it prevents me from distinguishing between two distinct cases only by the hash.
I don't know whether this is actually a bug or no as I am a total noob about cryptography and hashing functions.
Thanks for you help/advice,
Dherse
The text was updated successfully, but these errors were encountered: