php - How should I incorporate the salt in my password hash? -
how stronger would
return sha1($salt.sha1($passwd));
be compared just:
return sha1($salt.$passwd);
$salt
per-user string of length 12 consisting of strong random ascii.
it's twice strong, because attacker needs perform twice many sha1 calculations brute force attack.
of course, still not impressive. on other hand, doing sha1 5000 times in loop practical authorization, makes attacks take 5000 times longer - technique known key strengthening. is, however, poor man's substitute adaptible-cost hash algorithms jacco mentions.
Comments
Post a Comment