random - Hash randomization in Perl 5 -



random - Hash randomization in Perl 5 -

when perl 5.8.1 came out added hash randomization. when perl 5.8.2 came out, thought, removed hash randomization unless environment variable (perl_hash_seed) present. seems if gravely mistaken as

perl_hash_seed=$seed perl -mdata::dumper -e 'print dumper{map{$_,1}"a".."z"}'

always kicks same key ordering regardless of value of $seed.

did hash randomization go away, doing wrong, or bug?

see algorithmic complexity attacks:

in perl 5.8.1 hash function randomly perturbed pseudorandom seed makes generating such naughty hash keys harder. [...] of 5.8.2 is used on individual hashes if internals observe insertion of pathological data.

so randomization doesn't happen, when perl detects it's needed.

perl random hash

Comments

Popular posts from this blog

iphone - Dismissing a UIAlertView -

c# - Can ProtoBuf-Net deserialize to a flat class? -

javascript - Change element in each JQuery tab to dynamically generated colors -