From:             ircmaxell
Operating system: All
PHP version:      trunk-SVN-2012-01-19 (snap)
Package:          hash related
Bug Type:         Feature/Change Request
Bug description:Implement PBKDF2 function in hash

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 bug report at https://bugs.php.net/bug.php?id=60813&edit=1
-- 
Try a snapshot (PHP 5.4):            
https://bugs.php.net/fix.php?id=60813&r=trysnapshot54
Try a snapshot (PHP 5.3):            
https://bugs.php.net/fix.php?id=60813&r=trysnapshot53
Try a snapshot (trunk):              
https://bugs.php.net/fix.php?id=60813&r=trysnapshottrunk
Fixed in SVN:                        
https://bugs.php.net/fix.php?id=60813&r=fixed
Fixed in SVN and need be documented: 
https://bugs.php.net/fix.php?id=60813&r=needdocs
Fixed in release:                    
https://bugs.php.net/fix.php?id=60813&r=alreadyfixed
Need backtrace:                      
https://bugs.php.net/fix.php?id=60813&r=needtrace
Need Reproduce Script:               
https://bugs.php.net/fix.php?id=60813&r=needscript
Try newer version:                   
https://bugs.php.net/fix.php?id=60813&r=oldversion
Not developer issue:                 
https://bugs.php.net/fix.php?id=60813&r=support
Expected behavior:                   
https://bugs.php.net/fix.php?id=60813&r=notwrong
Not enough info:                     
https://bugs.php.net/fix.php?id=60813&r=notenoughinfo
Submitted twice:                     
https://bugs.php.net/fix.php?id=60813&r=submittedtwice
register_globals:                    
https://bugs.php.net/fix.php?id=60813&r=globals
PHP 4 support discontinued:          
https://bugs.php.net/fix.php?id=60813&r=php4
Daylight Savings:                    https://bugs.php.net/fix.php?id=60813&r=dst
IIS Stability:                       
https://bugs.php.net/fix.php?id=60813&r=isapi
Install GNU Sed:                     
https://bugs.php.net/fix.php?id=60813&r=gnused
Floating point limitations:          
https://bugs.php.net/fix.php?id=60813&r=float
No Zend Extensions:                  
https://bugs.php.net/fix.php?id=60813&r=nozend
MySQL Configuration Error:           
https://bugs.php.net/fix.php?id=60813&r=mysqlcfg

Reply via email to