This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author vstinner
Recipients Arfrever, Mark.Shannon, PaulMcMillan, Zhiping.Deng, alex, barry, benjamin.peterson, christian.heimes, dmalcolm, eric.araujo, georg.brandl, gvanrossum, jcea, lemburg, pitrou, terry.reedy, vstinner
Date 2012-01-05.01:05:58
SpamBayes Score 4.134712e-07
Marked as misclassified No
Message-id <1325725559.56.0.557718997796.issue13703@psf.upfronthosting.co.za>
In-reply-to
Content
> At least for Python 2.x hash(str) and hash(unicode) have to yield
> the same result for ASCII only strings. 

Ah yes, I forgot Python 2: I wrote my patch for Python 3.3. The two hash functions should be modified to be randomized.

> hash("") should always return 0

Ok, I can add a special case. Antoine told me that hash("") gives prefix ^ suffix, which is too much information for the attacker :-)

> for small strings we could use a different seed
> than for larger strings

Why? The attack doesn't work with short strings? What do you call a "short string"?
History
Date User Action Args
2012-01-05 01:05:59vstinnersetrecipients: + vstinner, lemburg, gvanrossum, barry, georg.brandl, terry.reedy, jcea, pitrou, christian.heimes, benjamin.peterson, eric.araujo, Arfrever, alex, dmalcolm, Mark.Shannon, Zhiping.Deng, PaulMcMillan
2012-01-05 01:05:59vstinnersetmessageid: <1325725559.56.0.557718997796.issue13703@psf.upfronthosting.co.za>
2012-01-05 01:05:58vstinnerlinkissue13703 messages
2012-01-05 01:05:58vstinnercreate