note 56370 added to function.sha1
| From: | arachnid at notdot dot net | Date: | Wed, 31 Aug 2005 20:12:56 +0000 |
| Subject: | note 56370 added to function.sha1 | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-94547@lists.php.net to get a copy of this message | ||
WTM's post below is misinformed. The purpose of adding the random data (known as a
'salt', as multiple posters have pointed out further below) is to prevent dictionary based
attacks, allowing the attacker use a pre-prepared database of passwords and hashes against all your
stored passwords, instead of having to recalculate for each user.
Adding the salt in a more 'complicated' way is a poor security tactic - if the attacker
discovers your method, the security advantage is lost, and you have no way of changing it without
rehashing all your passwords.
----
Manual Page -- http://www.php.net/manual/en/function.sha1.php
Edit -- http://master.php.net/manage/user-notes.php?action=edit+56370
Delete: added to the manual -- http://master.php.net/manage/user-notes.php?action=delete+56370&report=yes&reason=added+to+the+manual
Delete: bad code -- http://master.php.net/manage/user-notes.php?action=delete+56370&report=yes&reason=bad+code
Delete: spam -- http://master.php.net/manage/user-notes.php?action=delete+56370&report=yes&reason=spam
Delete: useless -- http://master.php.net/manage/user-notes.php?action=delete+56370&report=yes&reason=useless
Delete: non-english -- http://master.php.net/manage/user-notes.php?action=delete+56370&report=yes&reason=non-english
Delete: other reasons -- http://master.php.net/manage/user-notes.php?action=delete+56370&report=yes
Reject -- http://master.php.net/manage/user-notes.php?action=reject+56370&report=yes
Search -- http://master.php.net/manage/user-notes.php