#46834 [Opn->Asn]: Range of mcrypt functions fail on PHP 6.0

From: Date: Thu, 11 Dec 2008 11:29:18 +0000
Subject: #46834 [Opn->Asn]: Range of mcrypt functions fail on PHP 6.0
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-131910@lists.php.net to get a copy of this message
 ID:               46834
 Updated by:       derick@php.net
 Reported By:      ant@php.net
-Status:           Open
+Status:           Assigned
 Bug Type:         mcrypt related
 Operating System: Windows, Linux
 PHP Version:      6CVS-2008-12-11 (snap)
-Assigned To:      
+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/?id=46834&edit=1



Thread (3 messages)

« previous php.bugs (#131910) next »