Author haypo
Recipients PaulMcMillan, Vlado.Boza, dmalcolm, haypo, koniiiik
Date 2012-04-19.23:26:31
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
I don't understand this issue: can you write a short script to test a collision? 

"E.g this strings collide for every prefix ending on 0xcd"

Do you mean that prefix & 0xff == 0xcd?

"0x27fd5a18, 0x26fe78fa"

Is it a byte string or an Unicode string? b'\x27\xfd\x5a\x18' and b'\x26\xfe\x78\xfa'?


Using PYTHONHASHSEED environment variable, it's easy to find two values generating the same _Py_HashSecret. Just one example:

* _Py_HashSecret = {0xcd5192eff3fd4d58, 0x3926b1431b200720}
*  _Py_HashSecret = {0xcd5192eff3fd4d58, 0x3926b1431b200720}


I wrote to try to compute a collision, but the programs fail with:
Fail to generate a new seed!
# seeds = 65298
So it fails to generate a new random seed after testing 65298 different seeds. I ran the script with a function generating a seed, a seed generate a prefix "ending with 0xDC".

See attached program: it generates a random seed. Uncomment "seed = generate_seed_0xCD()" if the prefix must ends with 0xCD byte.
Date User Action Args
2012-04-19 23:26:32hayposetrecipients: + haypo, dmalcolm, PaulMcMillan, Vlado.Boza, koniiiik
2012-04-19 23:26:32hayposetmessageid: <>
2012-04-19 23:26:32haypolinkissue14621 messages
2012-04-19 23:26:31haypocreate