is there any reason to use SuperFastHash in druntime? (except speed)

ketmar via Digitalmars-d digitalmars-d at puremagic.com
Thu May 28 11:21:38 PDT 2015


On Thu, 28 May 2015 12:39:52 +0000, Vladimir Panteleev wrote:

> On Thursday, 28 May 2015 at 03:09:07 UTC, ketmar wrote:
>> SuperFastHash has known distribution problems[1].
> 
> BTW, something I noticed while browsing Rust docs today:
> 
>> The hashes are all keyed by the thread-local random number generator on
>> creation by default. This means that the ordering of the keys is
>> randomized, but makes the tables more resistant to denial-of-service
>> attacks (Hash DoS).
> 
> http://doc.rust-lang.org/std/collections/struct.HashMap.html
> 
> As I understand, D is certainly vulnerable to Hash DoS.

yes. and the interesting thing is that `toHash()` accepts seed, but it's 
not used in other code. looks to me like low-hanging fruit.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: not available
URL: <http://lists.puremagic.com/pipermail/digitalmars-d/attachments/20150528/0ba6d54f/attachment.sig>


More information about the Digitalmars-d mailing list