Web Application - Storing a Password
Have I missed anything? Are there any additional steps storing passwords to the DB? Storing the Password: After as much research on the subject as possible I've come to the conclusion that the best way to store user passwords in a web application DB (in my case MySQL+PHP) is as follows: Assign a sitewide static salt. (16 rand chars incl 0-9,a-z,A-Z,[]/*-') Assign a per user random salt (stored in the DB). Store the result hash_function($userPassword + $sitewideSalt + $randomSalt) Store the $randomSalt alongside the resulting hash. Use bcrypt adjustable workload hashing Attack #1: Attacker