note 113643 deleted from faq.passwords by sobak
| From: | sobak@php.net | Date: | Tue, 22 Nov 2016 08:22:42 +0000 |
| Subject: | note 113643 deleted from faq.passwords by sobak | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-207477@lists.php.net to get a copy of this message | ||
Note Submitter: loveun1x at yahooc dot om
----
The section "Why are common hashing functions such as md5() and sha1() unsuitable for
passwords?" is completely wrong. No one says MD5 and SHA-1 aren't suitable for password
hashing due to their speed. (MD5 is broken for digital signatures but not yet for password hashing,
but not because it is fast.) A single round of them is unsuitable, but that is not a problem with
the underlying algorithms themselves.
Always use a salt, preferably a big (e.g. at least 16 characters) salt. Always run through multiple
rounds of of the hashing. Most implementations today use several tens of thousands or hundreds of
thousands of rounds, for example 7-zip's encrypted format uses 262,144 rounds of SHA-256.