From:             [EMAIL PROTECTED]
Operating system: Windows, Linux
PHP version:      6CVS-2008-12-11 (snap)
PHP Bug Type:     mcrypt related
Bug description:  Range of mcrypt functions fail on PHP 6.0

Description:
------------
A range of PHPTs fail on PHP 6 where they pass on PHP 5.2/5.3. In 
many cases it looks like the function returns different output from 
encryption/decryption calls. The following failing tests are all 
checked into PHP 6 and marked with an XFAIL section:

mcrypt_cbc_3des_encrypt.phpt
mcrypt_cbc_3des_decrypt.phpt
mcrypt_cbc_variation4.phpt
mcrypt_cbc_variation5.phpt
mcrypt_rijndael128_128BitKey.phpt
mcrypt_rijndael128_256BitKey.phpt
mcrypt_decrypt_3des_cbc.phpt
mcrypt_decrypt_variation5.phpt
mcrypt_encrypt_3des_cbc.phpt
mcrypt_encrypt_variation5.phpt
mcrypt_ecb_variation4.phpt

The problem may be common to all the failing tests and looks like 
something has changed with different length initialisation vectors.

Reproduce code:
---------------
(See the tests checked into CVS)

Expected result:
----------------
For example, the mcrypt_cbc_3des_decrypt.phpt test expects:

--- testing different iv lengths

iv length=4

Warning: mcrypt_cbc(): The IV parameter must be as long as the 
blocksize in %s on line %d
unicode(32) "736563726574206d6573736167650000"

iv length=8
unicode(32) "736563726574206d6573736167650000"

iv length=9

Warning: mcrypt_cbc(): The IV parameter must be as long as the 
blocksize in %s on line %d
unicode(32) "736563726574206d6573736167650000"




Actual result:
--------------
iv length=4

Warning: mcrypt_cbc(): The IV parameter must be as long as the 
blocksize in D:\Testing\php-6.0\mcrypt_cbc_3des_decrypt.php on line 
52
unicode(32) "425750466574206d6573736167650000"

iv length=8
unicode(32) "736563726574206d6573736167650000"

iv length=9

Warning: mcrypt_cbc(): The IV parameter must be as long as the 
blocksize in D:\Testing\php-6.0\mcrypt_cbc_3des_decrypt.php on line 
52
unicode(32) "42575046504217556573736167650000"

-- 
Edit bug report at http://bugs.php.net/?id=46834&edit=1
-- 
Try a CVS snapshot (PHP 5.2):        
http://bugs.php.net/fix.php?id=46834&r=trysnapshot52
Try a CVS snapshot (PHP 5.3):        
http://bugs.php.net/fix.php?id=46834&r=trysnapshot53
Try a CVS snapshot (PHP 6.0):        
http://bugs.php.net/fix.php?id=46834&r=trysnapshot60
Fixed in CVS:                        
http://bugs.php.net/fix.php?id=46834&r=fixedcvs
Fixed in CVS and need be documented: 
http://bugs.php.net/fix.php?id=46834&r=needdocs
Fixed in release:                    
http://bugs.php.net/fix.php?id=46834&r=alreadyfixed
Need backtrace:                      
http://bugs.php.net/fix.php?id=46834&r=needtrace
Need Reproduce Script:               
http://bugs.php.net/fix.php?id=46834&r=needscript
Try newer version:                   
http://bugs.php.net/fix.php?id=46834&r=oldversion
Not developer issue:                 
http://bugs.php.net/fix.php?id=46834&r=support
Expected behavior:                   
http://bugs.php.net/fix.php?id=46834&r=notwrong
Not enough info:                     
http://bugs.php.net/fix.php?id=46834&r=notenoughinfo
Submitted twice:                     
http://bugs.php.net/fix.php?id=46834&r=submittedtwice
register_globals:                    
http://bugs.php.net/fix.php?id=46834&r=globals
PHP 4 support discontinued:          http://bugs.php.net/fix.php?id=46834&r=php4
Daylight Savings:                    http://bugs.php.net/fix.php?id=46834&r=dst
IIS Stability:                       
http://bugs.php.net/fix.php?id=46834&r=isapi
Install GNU Sed:                     
http://bugs.php.net/fix.php?id=46834&r=gnused
Floating point limitations:          
http://bugs.php.net/fix.php?id=46834&r=float
No Zend Extensions:                  
http://bugs.php.net/fix.php?id=46834&r=nozend
MySQL Configuration Error:           
http://bugs.php.net/fix.php?id=46834&r=mysqlcfg

Reply via email to