Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

"How would I be able to change the cost factor overtime?"

One system I built stores the workfactor used to bcrypt the current password un the user table, and allows me to increase the "system workfactor". Every time someone successfully logs in with a lower-than-current-workfactor password hash, it recomputes a new bcrypted hash using the currently known successful login password and updates the users credentials. It means if my user table is ever exposed, all frequently used accounts have up-to-date workfactors for their password hashes, and the "relatively weaker" hashes are for infrequently used (or, in this particualar case, expired subscriptions).



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: