A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2018-May/153584.html below:

[Python-Dev] Hashes in Python3.5 for tuples and frozensets

[Python-Dev] Hashes in Python3.5 for tuples and frozensets [Python-Dev] Hashes in Python3.5 for tuples and frozensetsChristian Heimes christian at python.org
Wed May 16 21:41:49 EDT 2018
On 2018-05-16 18:10, Raymond Hettinger wrote:
> 
> 
>> On May 16, 2018, at 5:48 PM, Anthony Flury via Python-Dev <python-dev at python.org> wrote:
>>
>> However the frozen set hash, the same in both cases, as is the hash of the tuples - suggesting that the vulnerability resolved in Python 3.3 wasn't resolved across all potentially hashable values.
> 
> You are correct.  The hash randomization only applies to strings.  None of the other object hashes were altered.  Whether this is a vulnerability or not depends greatly on what is exposed to users (generally strings) and how it is used.
> 
> For the most part, it is considered a feature that integers hash to themselves.  That is very fast to compute :-) Also, it tends to prevent hash collisions for consecutive integers.

Raymond is 100% correct. Just one small nit pick: randomization applies
to both string and bytes.

Christian

More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4