Bug #46834 [Asn->Wfx]: Range of mcrypt functions fail on PHP 6.0
Edit report at http://bugs.php.net/bug.php?id=46834&edit=1
ID: 46834
Updated by: felipe@php.net
Reported by: ant@php.net
Summary: Range of mcrypt functions fail on PHP 6.0
-Status: Assigned
+Status: Wont fix
Type: Bug
Package: mcrypt related
Operating System: *
PHP Version: 6CVS-2008-12-11 (snap)
Assigned To: derick
Previous Comments:
------------------------------------------------------------------------
[2008-12-11 10:39:32] ant@php.net
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 this bug report at http://bugs.php.net/bug.php?id=46834&edit=1
Thread (3 messages)