On Apr 13, 2014, at 5:12 AM, demerphq wrote:
On 12 April 2014 19:47, Reini Urban via RT wrote:
On Sat Apr 12 03:43:15 2014, zefram@fysh.org wrote:
bulk88 via RT wrote:
[16:32] <@rurban> PERL_HASH_FUNC_SDBM and PERL_HASH_FUNC_DJB2: simple
fix: U32 hash = *((U32*)seed);
This apparently refers to the two lines

U32 hash = *((U32*)seed + len);

in hv_func.h, in S_perl_hash_sdbm() and S_perl_hash_djb2(), which look
like they should each be

U32 hash = *((U32*)seed) + len;
sorry, but this is nonsense.
No it is not. It is the correct fix to my change.
It is nonsense nevertheless, but it is the correct fix for the seed=0 case.

The real fix for collision attacks is to avoid O(n/2) collision lookup.
You will never be able to avoid collisions at all and you can easily attack
any hash function if the seed is known. It makes not much sense to
perturb and slow down a hash function at all.
yves had the idea to add the seed to the key, which is a different kind of nonsense, but not the problem here.
I have no idea what you are talking about.
Bad, because you wrote it and blogged about. To refresh your mind:

Search Discussions

Discussion Posts


Related Discussions

Discussion Navigation
viewthread | post
posts ‹ prev | 11 of 11 | next ›
Discussion Overview
groupperl5-porters @
postedOct 14, '13 at 1:11a
activeApr 13, '14 at 5:44p



site design / logo © 2021 Grokbase