Bug #49311 [Com]: WAKE, enigma and arcfour ciphers fail to initialize

From: Date: Fri, 15 May 2015 20:38:35 +0000
Subject: Bug #49311 [Com]: WAKE, enigma and arcfour ciphers fail to initialize
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-192687@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=49311&edit=1 ID: 49311 Comment by: dewi at dewimorgan dot com Reported by: c58999 at tyldd dot com Summary: WAKE, enigma and arcfour ciphers fail to initialize Status: No Feedback Type: Bug Package: mcrypt related Operating System: Windows PHP Version: 5.3.0 Block user comment: N Private report: N New Comment: Still extant in: PHP 5.6.9 (cli) (built: May 13 2015 19:28:50) Downloaded as latest stable from windows.php.net as: VC11 x86 Thread Safe (2015-May-14 18:29:57) The link above to snaps.php.net is unable to connect, so I cannot test it. The version at http://windows.php.net/snapshots/ also shows this behavior. I am testing using the following code: <?php foreach(mcrypt_list_algorithms() as $alg) { printf("\n%15s: ", $alg); foreach(mcrypt_list_modes() as $mode) { $mc = @mcrypt_module_open($alg, null, $mode, null); if(is_resource($mc)) echo "Y:$mode "; else echo "N:$mode "; } } echo "\n"; I run it as: php crypttest.php | sort The output is: N:cbc N:cfb N:ctr N:ecb N:ncfb N:nofb N:ofb Y:stream arcfour N:cbc N:cfb N:ctr N:ecb N:ncfb N:nofb N:ofb Y:stream enigma N:cbc N:cfb N:ctr N:ecb N:ncfb N:nofb N:ofb Y:stream wake Y:cbc Y:cfb Y:ctr Y:ecb Y:ncfb Y:nofb Y:ofb N:stream blowfish Y:cbc Y:cfb Y:ctr Y:ecb Y:ncfb Y:nofb Y:ofb N:stream blowfish-compat Y:cbc Y:cfb Y:ctr Y:ecb Y:ncfb Y:nofb Y:ofb N:stream cast-128 Y:cbc Y:cfb Y:ctr Y:ecb Y:ncfb Y:nofb Y:ofb N:stream cast-256 Y:cbc Y:cfb Y:ctr Y:ecb Y:ncfb Y:nofb Y:ofb N:stream des Y:cbc Y:cfb Y:ctr Y:ecb Y:ncfb Y:nofb Y:ofb N:stream gost Y:cbc Y:cfb Y:ctr Y:ecb Y:ncfb Y:nofb Y:ofb N:stream loki97 Y:cbc Y:cfb Y:ctr Y:ecb Y:ncfb Y:nofb Y:ofb N:stream rc2 Y:cbc Y:cfb Y:ctr Y:ecb Y:ncfb Y:nofb Y:ofb N:stream rijndael-128 Y:cbc Y:cfb Y:ctr Y:ecb Y:ncfb Y:nofb Y:ofb N:stream rijndael-192 Y:cbc Y:cfb Y:ctr Y:ecb Y:ncfb Y:nofb Y:ofb N:stream rijndael-256 Y:cbc Y:cfb Y:ctr Y:ecb Y:ncfb Y:nofb Y:ofb N:stream saferplus Y:cbc Y:cfb Y:ctr Y:ecb Y:ncfb Y:nofb Y:ofb N:stream serpent Y:cbc Y:cfb Y:ctr Y:ecb Y:ncfb Y:nofb Y:ofb N:stream tripledes Y:cbc Y:cfb Y:ctr Y:ecb Y:ncfb Y:nofb Y:ofb N:stream twofish Y:cbc Y:cfb Y:ctr Y:ecb Y:ncfb Y:nofb Y:ofb N:stream xtea This may mean that it's working as expected: that the first three (arcfour, enigma, and wake) are stream-only cyphers, and that all the other cyphers work only in non-stream modes? If so, this is possibly a documentation issue rather than a real issue. Previous Comments: ------------------------------------------------------------------------ [2015-05-15 19:46:58] dewi at dewimorgan dot com Still extant in 5.4.16 ------------------------------------------------------------------------ [2011-11-07 19:20:36] vseticka dot martin at gmail dot com http://stackoverflow.com/questions/8040901/how-to-encrypt-with-mcrypt-arcfour-in-wamp/8041271 - this question shows that the bug seems to be still present. ------------------------------------------------------------------------ [2009-09-27 01:00:02] php-bugs at lists dot php dot net No feedback was provided for this bug for over a week, so it is being suspended automatically. If you are able to provide the information that was originally requested, please do so and change the status of the bug back to "Open". ------------------------------------------------------------------------ [2009-09-19 14:48:25] jani@php.net Please try using this snapshot: http://snaps.php.net/php5.3-latest.tar.gz For Windows: http://windows.php.net/snapshots/ ------------------------------------------------------------------------ [2009-08-20 15:06:57] c58999 at tyldd dot com Description: ------------ The arcfour algoritm fails to initialize on PHP 5.3.0 win32. This also appears to happen with the wake and enigma ciphers. I could also reproduce this behaviour on PHP 5.2.6-2ubuntu4.2. Reproduce code: --------------- $algs = mcrypt_list_algorithms(); foreach($algs as $alg){ echo "$alg\n"; $td = mcrypt_module_open($alg, '', 'ecb', ''); echo "\n"; } Expected result: ---------------- I would expect this code to execute without any errors. Actual result: -------------- C:\php>php mcrypt.php cast-128 gost rijndael-128 twofish cast-256 loki97 rijndael-192 saferplus wake PHP Warning: mcrypt_module_open(): Could not open encryption module in C:\php\mcrypt.php on line 6 blowfish-compat des rijndael-256 serpent xtea blowfish enigma PHP Warning: mcrypt_module_open(): Could not open encryption module in C:\php\mcrypt.php on line 6 rc2 tripledes arcfour PHP Warning: mcrypt_module_open(): Could not open encryption module in C:\php\mcrypt.php on line 6 ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=49311&edit=1

« previous php.bugs (#192687) next »