News for hackers. Stuff that matters.
Re:Python Hash Tables: understanding dictionaries by asdflke on Saturday August 22, 2020 @11:31PM (#24249303)
So not the best article and advocates for md5? Also full of ads. Why is this getting traction?
Re:Python Hash Tables: understanding dictionaries by nightfly on Sunday August 23, 2020 @12:49AM (#24249594)
This is not advocating for md5. :/
Re:Python Hash Tables: understanding dictionaries by danpalmer on Sunday August 23, 2020 @05:32AM (#24250745)
This does introduce hash functions, list MD5 and other cryptographic hash functions as examples, and then go on to explain how hash functions are used in hash tables.

Not advocating for MD5, but it does strongly imply the use of cryptographic hash functions for hash tables, which is almost never the case, and a useful distinction to explain.

Cryptographic hash functions are trying to make the original data unrecoverable in any way, and essentially distributing as evenly throughout their output space as possible. They are also often trying to be slow to compute to prevent brute forcing.

On the other hand, hashing for a hash table doesn’t need to be secure in the same way (hence Python’s smaller bits just returning themselves as their hashed values). They also don’t need to distribute themselves evenly. They need to be fast, unlike a cryptographic hash, and they need to restrict the data to a fixed size.

Re:Python Hash Tables: understanding dictionaries by mastro35 on Sunday August 23, 2020 @06:14AM (#24250871)
Yes, maybe I haven't been clear, I tried just to explain what an hash is before introducing hash tables, if someone understood that cryptographic hash functions have to be used for hash table it's probably because my explanation wasn't clear enough... :(

Consider that I'm not a native speaker, so sometimes it's hard for me to send the exact message I would like to send... I will try to explain it better as soon as I will get anywhere I can use a computer :)

Thanks!

Re:Python Hash Tables: understanding dictionaries by Hnrobert42 on Sunday August 23, 2020 @09:45AM (#24251898)
What’s wrong with MD5 for non-cryptographic hashes?
Re:Python Hash Tables: understanding dictionaries by rurban on Sunday August 23, 2020 @02:13PM (#24253941)
Everything is wrong with MD5. Insecure, extremely slow, bad statistical properties. https://github.com/rurban/smhasher