On 21 Jan 2002 [EMAIL PROTECTED] wrote:

> ID: 15140
> Updated by: sander
> Reported By: [EMAIL PROTECTED]
> Status: Assigned
> Bug Type: mcrypt related
> Operating System: Redhat 7.2
> PHP Version: 4.1.1
> Assigned To: derick
> New Comment:
>
> To be completely clear, Derick asked to file a bugreport in the
> PHP-bugs-system about mcrypt not passing some PHP-tests, not to send
> the mcrypt-folks a bugreport.

Erm, I asked him to file a bug report with the mcrypt-folks. It's most
certain a bug in mcrypt (all those segfaults), and not in PHP.

Derick

>
>
> Previous Comments:
> ------------------------------------------------------------------------
>
> [2002-01-21 07:22:12] [EMAIL PROTECTED]
>
> That was quick.
>
> I am also sending a Bug Report to mcrypt.
>
> Testing with GOST Fail in the Same Way.
> Works for the others listed below.
>
> //T($user_id, MCRYPT_TWOFISH);  // Generates Seg Fault.
> //T($user_id, MCRYPT_GOST);         // Crash The System like TWOFISH
>
> T($user_id, MCRYPT_TripleDES);  // Good
> T($user_id, MCRYPT_BLOWFISH);     // Good
> T($user_id, MCRYPT_DES);        // Good
> T($user_id, MCRYPT_RC2);              // Good
>
>
> ------------------------------------------------------------------------
>
> [2002-01-21 07:10:31] [EMAIL PROTECTED]
>
> I'll check this out, please file a bug report for mcrypt too (about not
> passing make test).
>
> Derick
>
> ------------------------------------------------------------------------
>
> [2002-01-21 07:06:15] [EMAIL PROTECTED]
>
>
> The Script as it is will work using Triple DES
>
> Uncomment the TWOFISH Line At The Bottom of the code and you will get
> the Segmentation Fault.
>
>
>
> ------------------------------------------------------------------------
>
> [2002-01-21 07:03:51] [EMAIL PROTECTED]
>
> // Problem with TWOFISH and mcrypt under PHP 4.0.6 and 4.1.1
> // Tested with libmcrypt 2.4.11 2.4.13 2.4.18 2.4.19
> // 2.4.19 is Broken as it does not pass "make check" to test
> // When Loading This Page you should see the time and a Cookie Number.
> // If you test with TWOFISH It give a Segmentation Failure in the
> Apache Error Log
> // But Will Work With 3DES and BLOWFISH.
> //
> // I do not have a gdb trace sorry :(
> //
> // Strange.
>
> Testing Script is following
> <?php
> // Problem with TWOFISH and mcrypt under PHP 4.0.6 and 4.1.1
> // Tested with libmcrypt 2.4.11 2.4.13 2.4.18 2.4.19 (Broken does not
> pass make check)
> // When Loading This Page you should see the time and a Cookie Number.
> // If you test with TWOFISH It give a Segmentation Failure in the
> Apache Error Log
> // But Will Work With 3DES.
> //
> // Strange.
> // [EMAIL PROTECTED] REMOVE NOSPAM
>
> function T ( $user_id, $Encryption ) {
>         $session_serial = $user_id.
>            '-'.time().
>            '-'.$GLOBALS['REMOTE_ADDR'].
>            '-'.$GLOBALS['HTTP_USER_AGENT'];
>
>         echo "<p>Cypher: " . $Encryption;
>
>         $sessionKey="SessionKeyYouChoose"; // Obviously not the one we
> use....:)
>
>         // Fails with TWOFISH but Works with TripleDES
>         // Code Fail to produce Code.
>         //$td = mcrypt_module_open(MCRYPT_TWOFISH, "", MCRYPT_MODE_ECB,
> "");
>         //$td = mcrypt_module_open(MCRYPT_TripleDES, "",
> MCRYPT_MODE_ECB, "");
>         $td = mcrypt_module_open($Encryption, "", MCRYPT_MODE_ECB,
> "");
>
>         $iv = mcrypt_create_iv(mcrypt_enc_get_iv_size ($td),
> MCRYPT_RAND);
>         mcrypt_generic_init($td, $sessionKey, $iv);
>         $encrypted_session_serial = mcrypt_generic($td,
> $session_serial);
>         mcrypt_generic_end($td);
>         $session_serial_hash =
> md5($encrypted_session_serial.$sessionKey);
>         $session_serial_cookie =
> base64_encode($encrypted_session_serial).'-'.$session_serial_h
> ash;
>
>         return $session_serial_cookie;
> }
>
> // If you don't see the time number increasing it is because Apache
> child seg fault
> // Check your apache/logs/error_log that is the problem.
>
>
> echo "<p>If you don't see the time number increasing it is because
> Apache child seg fault. <br>
> ";
> echo "Check your apache/logs/error_log (tail -f error_log) and you will
> see the problem every t
> ime you reload.";
> echo "<p>Time is: " . time();
> $user_id=120804;
>
> //$test  = T($user_id, MCRYPT_TWOFISH);
> $test  = T($user_id, MCRYPT_TripleDES);
>
> echo "<p>Cookie is : $test";
> echo "<p>The End";
> ?>
>
>
>
>
> ------------------------------------------------------------------------
>
>
>
> Edit this bug report at http://bugs.php.net/?id=15140&edit=1
>
>
> --
> PHP Development Mailing List <http://www.php.net/>
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>


-- 
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to