Your skill will accomplish what the force of many cannot |
|
PerlMonks |
Re: Randomizing Hash Implementation?by tilly (Archbishop) |
on Apr 10, 2005 at 00:06 UTC ( [id://446320]=note: print w/replies, xml ) | Need Help?? |
Yes, there is a random variable that is set on each iteration in recent Perls which causes the hashing algorithm to change. This is a response to a possible denial of service attack on Perl-based applications. The basis of the attack is that while on average adding n entries to a hash is O(n), if you encounter the wrong data set it is O(n*n). If you know the hashing algorithm that someone is using you may therefore be able to feed them data that will cause them to use up a surprising amount of CPU time. This makes denial of service attacks easier. But now there is no way to predict exactly what hashing algorithm you'll face, making it impossible to construct a dataset that reliably causes Perl to run into this problem.
In Section
Seekers of Perl Wisdom
|
|