News for hackers. Stuff that matters.
Re:Maybe we shouldn't skip SHA-3 by tptacek on Friday June 02, 2017 @09:46AM (#14469813)
Definitely don't use MD5!
Re:Maybe we shouldn't skip SHA-3 by StreamBright on Friday June 02, 2017 @11:12AM (#14470458)
What if the use case is not security sensitive, I just want to implement a distributed hash ring for example?
Re:Maybe we shouldn't skip SHA-3 by takeda on Friday June 02, 2017 @12:13PM (#14471001)
Make sure it can easily be replaced if needed though. I also use it in contexts where I need some consistent "randomization" (like your hash ring).

The thing is that even though security might not be an issue in your application, you might discover in the future that it is. For example python dict relies on hash table to store key-values, doesn't seem like something that would be concerning (you're not encrypting or keeping anything secret), but python applications then started being targeted by collision attacks. The attacks' goal was to insert many elements that hashed to the same value, which caused DoS. Their solution though was to use salt value which is different on every run.

The point is that something that might not seem like a security issue might turn out to be later on. It doesn't necessary mean we should always strong cryptographic hash functions (in many cases they might be too expensive) but at least write code in such way that we can easily replace it with something else if we need to.

Re:Maybe we shouldn't skip SHA-3 by stouset on Friday June 02, 2017 @11:29AM (#14470597)
BLAKE2 is faster and has features you might find useful in that sort of scenario. And doesn't forfeit security, should you decide to use this in a an unexpectedly security-sensitive application.
Re:Maybe we shouldn't skip SHA-3 by btrask on Friday June 02, 2017 @12:06PM (#14470921)
If the use case isn't security critical, and you know for a fact it won't become security critical later, and MD5 is convenient for whatever reason, then just use MD5.

Pardon my frustration, but: Jesus Christ, people. Why do we need to sell everyone on the fancy new thing in a hypothetical situation where it is defined not to matter?

Re:Maybe we shouldn't skip SHA-3 by ben0x539 on Friday June 02, 2017 @12:48PM (#14471318)
Because now people are carrying an MD5 implementation around with them, and when the next vaguely-hash-shaped problem comes up, they're gonna reach for that without really evaluating, b/c they've used it before so and it's at the top of their mental cache and it's even more convenient now. :/

I guess it's not entirely equivalent but I'm still sorta reeling from a "why should we introduce [something like bcrypt] for password storage when we already have these other perfectly fine hash functions in use in our codebase" convo at a previous project.

Re:Maybe we shouldn't skip SHA-3 by JoachimS on Monday June 05, 2017 @12:42PM (#14489024)
No No No. Then you add another dependency on MD5. And MD5 is a very slow, complex hash function. Use MurMur, City or any of a number of really fast, non secure hash functions instead.
Re:Maybe we shouldn't skip SHA-3 by andrewflnr on Friday June 02, 2017 @02:10PM (#14472109)
A situation where it is defined not to matter is unrealistic. Things you don't think are "security critical" have a tendency to unexpectedly become so; at least that's my impression. Why not use a more secure algorithm?
Re:Maybe we shouldn't skip SHA-3 by StreamBright on Friday June 02, 2017 @12:19PM (#14471058)
Exactly this. I dont like when people try to sell new things even though my use case is perfectly fine with the older solution. I understand the security implications, yet there more to this topic than just security.
Re:Maybe we shouldn't skip SHA-3 by JoachimS on Monday June 05, 2017 @12:40PM (#14489012)
Then you are using a _very_ slow hash function for which there are many algorithms better than MD5.
Re:Maybe we shouldn't skip SHA-3 by bradleyjg on Friday June 02, 2017 @11:28AM (#14470592)
If the application isn't security sensitive why not a faster non-cryptographic hash like farmhash?
Re:Maybe we shouldn't skip SHA-3 by takeda on Friday June 02, 2017 @12:14PM (#14471007)
Maybe because it is less popular, this is first time I hear about it. Probably it's also not as widely available.
Re:Maybe we shouldn't skip SHA-3 by StreamBright on Friday June 02, 2017 @12:20PM (#14471069)
I agree. There is also siphash that we use.
Re:Maybe we shouldn't skip SHA-3 by dom0 on Friday June 02, 2017 @01:12PM (#14471591)
These are often not packaged, so less available. Though for some applications you wouldn't want a library anyway.

(Also, xxhash)

Re:Maybe we shouldn't skip SHA-3 by JoachimS on Monday June 05, 2017 @12:44PM (#14489047)
I totally hear you. ;-)