6 ms·
Keeping passwords safe by staying up to date
- JacobAldridge 14y agoAs a HN non-hacker old-timer, I've read plenty of conversations about security and had a vague idea of what the heck y'all were talking about with hashes, salts etc. But this post explained it all so clearly, I found it immensely useful to put some of the pieces together. Have already shared it with some of my even-less-technical colleagues so they too can appreciate 1) the complexity, 2) the problem, and 3) the importance of their role in setting passwords. Well written JGC!
- jgrahamc 14y agoThanks for the kind words. For those who are interested in how to do the hash upgrade, I wrote a blog post on my personal site here: http://blog.jgc.org/2012/06/one-way-to-fix-your-rubbish-password.html http://blog.jgc.org/2012/06/one-way-to-fix-your-rubbish-pass...
- nickpresta 14y agoDepending on the framework you're using, if any, there might already be a built-in way to upgrade your users' passwords. For Django: https://docs.djangoproject.com/en/dev/topics/auth/#password-upgrading https://docs.djangoproject.com/en/dev/topics/auth/#password-...
- mp3geek 14y agoo/t, jgrahamc, when does the spdy beta start? :)
- sp332 14y agoHere is a name-and-shame site for services that store and send passwords in plain text (or any reversible encryption): http://plaintextoffenders.com/ http://plaintextoffenders.com/
- ceejayoz 14y agoThere are a number there that are new registration e-mail, which doesn't necessarily mean it's stored insecurely. E-mailing it around isn't a great idea, certainly, but it's not as bad as storing it reversibly.
- SkyMarshal 14y agoReally nice writeup, but why not also append a discussion of scrypt and its use of both CPU work factor and memory-hard functions to confound Moore's Law? It's the next step after bcrypt, after all. It may not be be implemented across as many platforms as bcrypt yet, but there's plenty for people to experiment with [1], if only for learning and educational purposes. 1. http://www.freebsd.org/cgi/cvsweb.cgi/ports/security/scrypt/ http://www.freebsd.org/cgi/cvsweb.cgi/ports/security/scrypt/ http://manpages.ubuntu.com/manpages/oneiric/man1/scrypt.1.html http://manpages.ubuntu.com/manpages/oneiric/man1/scrypt.1.ht... http://rubygems.org/gems/scrypt http://rubygems.org/gems/scrypt http://pypi.python.org/pypi/scrypt/ http://pypi.python.org/pypi/scrypt/ https://github.com/search?q=scrypt https://github.com/search?q=scrypt
- jgrahamc 14y agoThe article describes what we did at CloudFlare, not a general survey of cryptographic hash functions. We chose not to use scrypt because it is relatively new. I fully expect that scrypt will stand the test of time and I'll probably be happy using it.
- tomjen3 14y agoPlease not again. Discussions of passwords always brings up these stupid scrypt bcrypt fanboy comments. Repeating it one more time won't change anything.
- SkyMarshal 14y agoEasy there. You're projecting and reading a little too much into it. I'm not a fanboy, it simply struck me as a conspicuous oversight to write what appeared to be a survey of password hashing history and technology, and not mention scrypt at all. It's very instructive, especially for people new to this stuff, to see the contrast between bcrypt's CPU-hard algorithm and scrypt's CPU-hard + memory-hard algorithm. But jgrahamc's clarification above makes sense - it wasn't meant to be a general survey, but only what CloudFlare has done.
- hcurtiss 14y agoWhere do you store the individual salts, or the rules for creating the salts? Do you hash those too? It seems like they'd have to be sitting somewhere so that you could salt the input password before hashing to compare with the salted/hashed password in your database. If the salts are sitting in a database, and that database is compromised, aren't we sitting right back where we started with hashed passwords that may be subject to attack by rainbow tables? // question asked by an attorney who knows nothing about this subject but what he's read on HN.
- ceejayoz 14y agoThat's why they recommend bcrypt. Generating a rainbow table for a sha1 salted string is very quick with the right hardware. Generating one for a bcrypt string is going to take ages, and improvements in computing power can be dealt with by increasing the work factor for the bcrypt hashed strings in one's database.
- tedunangst 14y agoWhy in the world would anybody create a rainbow table for a salted string?
- ceejayoz 14y agoThe username it's attached to is "admin"? Plenty of situations where cracking the administrator's password via a custom rainbow table is potentially worth it.
- andrewla 14y agoRainbow tables are a very specific form of attack that allows you to do a single brute force attack against multiple accounts simultaneously. Against a single salted hash, you would not bother to generate a rainbow table; instead you would just stop once you found a match.
- dllthomas 14y ago
- deleted 14y ago[deleted]