Bug #70625 [NEW]: mcrypt_encrypt() : won't return data when no IV was specified under RC4.

From: Date: Fri, 02 Oct 2015 19:14:06 +0000
Subject: Bug #70625 [NEW]: mcrypt_encrypt() : won't return data when no IV was specified under RC4.
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-196353@lists.php.net to get a copy of this message
From: jparedes at gmail dot com Operating system: Linux PHP version: 7.0.0RC4 Package: mcrypt related Bug Type: Bug Bug description:mcrypt_encrypt() : won't return data when no IV was specified under RC4. Description: ------------ Ommiting $iv in mcrypt_encrypt() under MCRYPT_ARCFOUR cipher returns false. But when "null" parameter is specified it work as expected. Test script: --------------- <?php //This works php<7.0 only $enc_value = mcrypt_encrypt(MCRYPT_ARCFOUR,'secretkey','payload',MCRYPT_MODE_STREAM); var_dump($enc_value); //This work tested under 7.0RC4 $enc_value = mcrypt_encrypt(MCRYPT_ARCFOUR,'secretkey','payload',MCRYPT_MODE_STREAM,null); var_dump($enc_value); Expected result: ---------------- The result of $enc_value should be the result of the encryption. Actual result: -------------- Function returns false. -- Edit bug report at https://bugs.php.net/bug.php?id=70625&edit=1 -- Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=70625&r=trysnapshot54 Try a snapshot (PHP 5.5): https://bugs.php.net/fix.php?id=70625&r=trysnapshot55 Try a snapshot (trunk): https://bugs.php.net/fix.php?id=70625&r=trysnapshottrunk Fixed in SVN: https://bugs.php.net/fix.php?id=70625&r=fixed Fixed in release: https://bugs.php.net/fix.php?id=70625&r=alreadyfixed Need backtrace: https://bugs.php.net/fix.php?id=70625&r=needtrace Need Reproduce Script: https://bugs.php.net/fix.php?id=70625&r=needscript Try newer version: https://bugs.php.net/fix.php?id=70625&r=oldversion Not developer issue: https://bugs.php.net/fix.php?id=70625&r=support Expected behavior: https://bugs.php.net/fix.php?id=70625&r=notwrong Not enough info: https://bugs.php.net/fix.php?id=70625&r=notenoughinfo Submitted twice: https://bugs.php.net/fix.php?id=70625&r=submittedtwice register_globals: https://bugs.php.net/fix.php?id=70625&r=globals PHP 4 support discontinued: https://bugs.php.net/fix.php?id=70625&r=php4 Daylight Savings: https://bugs.php.net/fix.php?id=70625&r=dst IIS Stability: https://bugs.php.net/fix.php?id=70625&r=isapi Install GNU Sed: https://bugs.php.net/fix.php?id=70625&r=gnused Floating point limitations: https://bugs.php.net/fix.php?id=70625&r=float No Zend Extensions: https://bugs.php.net/fix.php?id=70625&r=nozend MySQL Configuration Error: https://bugs.php.net/fix.php?id=70625&r=mysqlcfg

« previous php.bugs (#196353) next »