keymutex icon indicating copy to clipboard operation
keymutex copied to clipboard

Platform-dependentcy and randomization in HashHandles

Open xiegeo opened this issue 6 years ago • 0 comments

I was looking for a keyed mutex and found your useful repo. Thank you for providing it.

I have two questions:

  1. HashHandle func(key string) uint returns a platform-dependent sized number, is this by design? Are the hash functions 32 or 64 bits?

  2. Is anyone else interested in a randomized HashHandle that is unpredictable to an attacker? In this case, the attacker (with access to source code) attempts to create requests that map to the same bucket by the hash function, therefor decreasing the performance of the server. I believe the build-in map in go is protected against this attack.

xiegeo avatar Sep 25 '19 05:09 xiegeo