News for hackers. Stuff that matters.
Re:Passwords for 32M Twitter accounts may have been hacked a... by paulmd on Thursday June 09, 2016 @02:35PM (#11871370)
You store the user's salt in a database column just like the hash. Optionally, when they change their password, you update the salt.

If you accept the premise of a secure hash, then there's no predictable effect on the output when you change hash('mypass') to hash('onetimesalt' + 'mypass'). Knowing that the user's salt is 'onetimesalt' does not get the attacker any closer to figuring out which password was used with that salt. Therefore there is no harm to storing the salt unencrypted in the database.

The advantage of doing this is that an attacker can't just make a single hashing run against common passwords using a single serverwide salt - they actually have to check the password list using every single user's salt. So if you have a million users (caveat: and your attacker is just scanning them all rather than going after a specific user), you've increased the complexity of an attack by a factor of a million.

There are no comments on this comment yet.