
Originally Posted by
felgall
If you are hashing the password/passphrase when storing it then you don't have to place any limits on length in what you allow people to use. Whether they use a one character password or a million character password the value stored will be the same length in the database.
Provided you hash the entire value (plus a salt) in one go the longer the value that is used the longer it would take a brute force attack to break it - assuming that you don't have security in place to prevent infinite guesses at high speed. Simply calling it a passphrase rather than password would help encourage people to enter longer values. One site I saw some time ago (can't remember where) suggested using four words strung together without spaces.
Currently, I require Passwords to have....
Code:
At least 1 Upper-Case Letter
- At least 1 Lower-Case Letter
- At least 1 Number
- At least 1 Special Character
- Between 8-15 Characters
And when a user registers or re-sets a Password, I use this code...
PHP Code:
// Create Salt.
$salt = substr(sha1(uniqid(mt_rand(), true)), 0, 10);
// Create Hash.
$hash = hash_hmac('sha512', $pass . $salt, VINEGAR);
Unfortunately, I have not had the time or resources to add code that locks things out after multiple or rapid attempts, although I could do this down the road.
So how does what I just described fit into what you are saying, plus my OP about "What makes a good Pass-Phrase"??
Sincerely,
Debbie
Bookmarks