[Python-Dev] Hash collision security issue (now public) (original) (raw)

Armin Ronacher armin.ronacher at active-4.com
Thu Dec 29 13:57:07 CET 2011


Hi,

Something I should add to this now that I thought about it a bit more:

Assuming this should be fixed on a language level the solution would probably be to salt hashes. The most common hash to salt here is the PyUnicode hash for obvious reasons.

Where to add the salt to? Unicode strings and bytestrings (byte objects) I guess since those are the most common offenders. Sometimes tuples are keys of dictionaries but in that case a contributing factor to the hash is the string in the tuple anyways.

Also related: since this is a security related issue, would this be something that goes into Python 2? Does that affect how a fix would look like?

Regards, Armin



More information about the Python-Dev mailing list