On Fri, Dec 30, 2011 at 06:06:26PM +0100, Xavier Leroy wrote: > Indeed. The optional "seed" parameter to Hashtbl.create does exactly > this in the new implementation of Hashtbl (the one based on Murmur3).
It may be worth noting that Perl solved this problem (back in 2003) by unconditionally using a seed which is a global set to a random number during interpreter initialization. Each run of the interpreter results in a different seed, and (it is supposed therefore) users of Perl simply don't need to worry about algorithmic complexity attacks. http://perl5.git.perl.org/perl.git/blob/HEAD:/hv.h#l104 http://dev.perl.org/perl5/news/2003/perl-5.8.1.html#Hash_Randomisation Rich. -- Richard Jones Red Hat -- Caml-list mailing list. Subscription management and archives: https://sympa-roc.inria.fr/wws/info/caml-list Beginner's list: http://groups.yahoo.com/group/ocaml_beginners Bug reports: http://caml.inria.fr/bin/caml-bugs