News for hackers. Stuff that matters.
Re:Important Kickstarter Security Notice by akerl_ on Saturday February 15, 2014 @04:42PM (#7245462)
Can you clarify why older passwords were not rehashed to utilize the new scheme? Or are those just passwords of people who haven't logged in since you converted your backend to use scrypt?
Re:Important Kickstarter Security Notice by Houshalter on Saturday February 15, 2014 @04:54PM (#7245530)
Couldn't you hash the old hash with the new one even if they didn't log in? I.e. hash the password with the old SHA-1 first, then bcrypt that. I'm not sure if that would work or not.
Re:Important Kickstarter Security Notice by akerl_ on Saturday February 15, 2014 @05:00PM (#7245550)
In theory you could, but then the code has to support both login procedures forever (hashing once with scrypt or hashing with SHA1 and then scrypt). That's why, if it were me, I'd likely set it up so if someone with a SHA1-hashed password logged in, it first did the SHA1 comparison, and if that succeeded the login process dropped an scrypted version into the DB.
Re:Important Kickstarter Security Notice by cmircea on Saturday February 15, 2014 @05:28PM (#7245710)
You could just always do a hash using SHA1 then feed that to bcrypt. This way you only have one code path, for all users.
Re:Important Kickstarter Security Notice by akerl_ on Saturday February 15, 2014 @05:31PM (#7245729)
Except that for some people, you only have a SHA1 hash, and for others, you only have an scrypt hash. Since they (I hope) weren't storing the plaintext (pre-hash) passwords alongside the hashed versions, the only time they can change the initial hashing mechanism is when passwords are provided to them during a password change or user login.
Re:Important Kickstarter Security Notice by ErrantX on Saturday February 15, 2014 @05:47PM (#7245798)
Hash all the sha1 passwords with scrypt. Hash all new passwords with sha1 then scrypt.

Your new hash mechanism is sha1 then scrypt.

There is no excuse to do otherwise :)

Re:Important Kickstarter Security Notice by hga on Saturday February 15, 2014 @05:04PM (#7245576)
(ADJUSTED:) Yes, if when you said "hash the password" you meant the result of what they'd done originally and that was stored in their databe. They don't have a copy of the password until and unless the user logs in again. These are all "one way" or "trapdoor" functions, plaintext -> irreversible cyphertext.

Irreversible in that we think mathematically you can't go back.

Re:Important Kickstarter Security Notice by eropple on Saturday February 15, 2014 @05:24PM (#7245688)
Read his comment again. Hash the password to SHA-1 using the old system, then apply bcrypt to it. It's a migration pattern I've seen in practice a few times.
Re:Important Kickstarter Security Notice by hga on Saturday February 15, 2014 @05:33PM (#7245735)
Thanks! And updated to try to clarify.