Req #60813 [Opn->Csd]: Implement PBKDF2 function in hash
| From: | ircmaxell@php.net | Date: | Mon, 24 Jun 2013 00:54:06 +0000 |
| Subject: | Req #60813 [Opn->Csd]: Implement PBKDF2 function in hash | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-179732@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=60813&edit=1
ID: 60813
Updated by: ircmaxell@php.net
Reported by: ircmaxell@php.net
Summary: Implement PBKDF2 function in hash
-Status: Open
+Status: Closed
Type: Feature/Change Request
Package: hash related
Operating System: All
PHP Version: trunk-SVN-2012-01-19 (snap)
-Assigned To:
+Assigned To: ircmaxell
Block user comment: N
Private report: N
New Comment:
Implemented in 5.5.0
Previous Comments:
------------------------------------------------------------------------
[2012-06-12 17:47:25] ircmaxell@php.net
This has been submitted as a pull request. RFC to follow:
https://github.com/php/php-src/pull/105
------------------------------------------------------------------------
[2012-01-19 22:00:52] ircmaxell@php.net
Description:
------------
I propose to implment a PBKDF2 derivation function in the hash package as
hash_pbkdf2(). PBKDF2 is defined in PKCS#5 (RFC 2898). The method for password
hash derivation is currently used by Blackberry, Apple iOS, Microsoft, OpenOffice,
and more (not all for password storage, but all for password based hashing).
The patch also cleans up hash_hmac a little bit to split out some common
functionality into a few inline functions (since PBKDF2 relies heavily on hmac).
Test script:
---------------
<?php
echo hash_pbkdf2('sha1', 'password', 'salt', 1, 20) .
"\n\n";
echo hash_pbkdf2('sha256', 'password', 'salt', 10000, 64) .
"\n\n";
Expected result:
----------------
0c60c80f961f0e71f3a9
5ec02b91a4b59c6f59dd5fbe4ca649ece4fa8568cdb8ba36cf41426e8805522
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=60813&edit=1