News for hackers. Stuff that matters.
Re:6.5 Million LinkedIn Password Hashes Leaked by tocomment on Wednesday June 06, 2012 @08:48AM (#4073443)
This makes me wonder. I've been relying on Django's built in user authentication lately. Does anyone know if that's pretty safe? Is it doing the right thing for hashing passwords?
Re:6.5 Million LinkedIn Password Hashes Leaked by Glowbox on Wednesday June 06, 2012 @08:55AM (#4073490)
Disclaimer: I am not a cryptographic expert.

https://docs.djangoproject.com/en/dev/topics/auth/

Django by default uses the PBKDF2 algorithm, which is better than nothing/md5/no salt sha1.

I'd use bcrypt or scrypt by default, better be safe than sorry.

Re:6.5 Million LinkedIn Password Hashes Leaked by leif on Wednesday June 06, 2012 @09:08AM (#4073567)
Pbkdf2 is extremely good. Without deeper analysis (or a feature comparison) I'd be hesitant to say that bcrypt or scrypt are better.
Re:6.5 Million LinkedIn Password Hashes Leaked by tptacek on Wednesday June 06, 2012 @11:25AM (#4074343)
I sincerely mean no offense but this statement came directly out of your butt. Read the table on page 14 of Colin Percival's Usenix paper "Stronger Key Derivation Via Sequential Memory-Hard Functions" (which you could have found by Googling [scrypt paper]); PBKDF2 is ~5x faster (ie: costs ~5x less to break) than bcrypt; PBKDF2 and scrypt aren't even in the same ballpark.

From exactly where did you derive the idea that PBKDF2 is "extremely good"?

The reality is that all three of PBKDF2, bcrypt, and scrypt are just fine. But PBKDF2 and scrypt have drastically poorer library support than bcrypt; nobody should delay using a strong password hash so that they can optimize which one they use.

Re:6.5 Million LinkedIn Password Hashes Leaked by leif on Thursday June 07, 2012 @10:52AM (#4079255)
All three are extremely good for this use case, when the competition is SHA-1. Beyond that, I don't know enough to compare the three. So yeah, it came out of my butt.

If Colin has a paper on it then I trust his comparison. What I really meant to say is what you said: all three are just fine.

Also, I thought I remembered my comment's parent saying something stronger, either it was edited later, or I was drunk when I decided it was worth commenting on.

Re:6.5 Million LinkedIn Password Hashes Leaked by tptacek on Thursday June 07, 2012 @01:02PM (#4080057)
I just wanted to write the word "butt". Thanks for being cool about it. :)
Re:6.5 Million LinkedIn Password Hashes Leaked by leif on Thursday June 07, 2012 @06:42PM (#4081724)
hahahaha, well, what you wrote was worthwhile and (as far as I can tell) correct. Thanks.
Re:6.5 Million LinkedIn Password Hashes Leaked by mdavidn on Wednesday June 06, 2012 @02:35PM (#4075375)
Eh? PBKDF2 has configurable complexity and has found many more applications than bycrpt, from WPA2 to disk encryption. The crypto research behind PBKDF2 is much more rigorous.
Re:6.5 Million LinkedIn Password Hashes Leaked by tptacek on Wednesday June 06, 2012 @02:41PM (#4075411)
Please cite one academic cryptography paper that presents an analysis of PBKDF2, other than Colin's paper which damns it.

There is virtually no "rigorous" research into KDFs of any sort, let alone password KDFs. Most academic crypto research simply presumes passwords are taken from cryptographically secure random number generators and stored securely.

And with that said I want to remind you that I just cited a source, accepted at Usenix, that measured PBKDF2, bcrypt, and scrypt and found PBKDF2 inferior to bcrypt. You seem to want to pretend otherwise.

Re:6.5 Million LinkedIn Password Hashes Leaked by ams6110 on Wednesday June 06, 2012 @09:04AM (#4073538)
PBKDF2 is way better than salted hashes. It's right there with bcrypt and scrypt on the "good choices" list.
Re:6.5 Million LinkedIn Password Hashes Leaked by tptacek on Wednesday June 06, 2012 @11:27AM (#4074357)
Django has chosen a fine default and for the next several years it's probably unnecessary to second-guess it. Over time, GPU and (more importantly) FPGA-assisted hash cracking may or may not become more common, at which point you'd want to transition to something like scrypt.

You could literally flip a coin to decide between bcrypt and PBKDF2 and it wouldn't matter which side came up.

Re:6.5 Million LinkedIn Password Hashes Leaked by masklinn on Wednesday June 06, 2012 @09:03AM (#4073536)
> which is better than nothing/md5/no salt sha1.

It's also better than salted sha1 since it performs multiple iteration rounds leading to (configurable) higher computational complexity.

Re:6.5 Million LinkedIn Password Hashes Leaked by nyellin on Wednesday June 06, 2012 @09:08AM (#4073563)
I'm not an authority on this, but django_bcrypt is generally considered a best-practice in the Django community. Scrypt may replace that in the future, once implementations are widely available and battle-tested.
Re:6.5 Million LinkedIn Password Hashes Leaked by lemonad on Wednesday June 06, 2012 @09:17AM (#4073603)
Yes, and to make Django even more safe, a number of improvements have been made over the last year (e.g. https://code.djangoproject.com/ticket/15367).