Bug #51636 [Fbk]: openssl_random_pseudo_bytes() painfully slow

2011-06-14 Thread seld
Edit report at http://bugs.php.net/bug.php?id=51636edit=1

 ID: 51636
 Updated by: s...@php.net
 Reported by:kaisellgren at gmail dot com
 Summary:openssl_random_pseudo_bytes() painfully slow
 Status: Feedback
 Type:   Bug
 Package:OpenSSL related
 Operating System:   Windows
 PHP Version:5.3.2
 Assigned To:pajoye
 Block user comment: N
 Private report: N

 New Comment:

The changelog says this has been fixed in 5.3.4, but the function still takes 
1second to return on my machine (5.3.6). Note that the amount of bytes doesn't 
matter, and it's always around 1second.



$t = microtime(true);

openssl_random_pseudo_bytes(1, $strong);

var_dump(microtime(true) - $t, $strong);



Outputs:

float 1.0317049026489

boolean true


Previous Comments:

[2010-04-23 10:47:16] paj...@php.net

Under CLI or inside a web server?



Can you try under CLI please?


[2010-04-23 10:47:13] paj...@php.net

Under CLI or inside a web server?



Can you try under CLI please?


[2010-04-22 17:38:44] kaisellgren at gmail dot com

Description:

Whenever I execute the following command:



openssl_random_pseudo_bytes(1); // or any other number



PHP will process the function call for like a minute.



I am using Windows 7, and it is affected by both x86 and x64 systems. I do not 
see a problem on Linux, though.

Test script:
---
$random = openssl_random_pseudo_bytes(1, $strong);

Expected result:

The random generation should happen within a blink of an eye.







-- 
Edit this bug report at http://bugs.php.net/bug.php?id=51636edit=1


Bug #51636 [Fbk]: openssl_random_pseudo_bytes() painfully slow

2011-06-14 Thread pajoye
Edit report at http://bugs.php.net/bug.php?id=51636edit=1

 ID: 51636
 Updated by: paj...@php.net
 Reported by:kaisellgren at gmail dot com
 Summary:openssl_random_pseudo_bytes() painfully slow
 Status: Feedback
 Type:   Bug
 Package:OpenSSL related
 Operating System:   Windows
 PHP Version:5.3.2
 Assigned To:pajoye
 Block user comment: N
 Private report: N

 New Comment:

Windows version?


Previous Comments:

[2011-06-14 10:22:18] s...@php.net

The changelog says this has been fixed in 5.3.4, but the function still takes 
1second to return on my machine (5.3.6). Note that the amount of bytes doesn't 
matter, and it's always around 1second.



$t = microtime(true);

openssl_random_pseudo_bytes(1, $strong);

var_dump(microtime(true) - $t, $strong);



Outputs:

float 1.0317049026489

boolean true


[2010-04-23 10:47:16] paj...@php.net

Under CLI or inside a web server?



Can you try under CLI please?


[2010-04-23 10:47:13] paj...@php.net

Under CLI or inside a web server?



Can you try under CLI please?


[2010-04-22 17:38:44] kaisellgren at gmail dot com

Description:

Whenever I execute the following command:



openssl_random_pseudo_bytes(1); // or any other number



PHP will process the function call for like a minute.



I am using Windows 7, and it is affected by both x86 and x64 systems. I do not 
see a problem on Linux, though.

Test script:
---
$random = openssl_random_pseudo_bytes(1, $strong);

Expected result:

The random generation should happen within a blink of an eye.







-- 
Edit this bug report at http://bugs.php.net/bug.php?id=51636edit=1


Bug #51636 [Fbk]: openssl_random_pseudo_bytes() painfully slow

2011-06-14 Thread seld
Edit report at http://bugs.php.net/bug.php?id=51636edit=1

 ID: 51636
 Updated by: s...@php.net
 Reported by:kaisellgren at gmail dot com
 Summary:openssl_random_pseudo_bytes() painfully slow
 Status: Feedback
 Type:   Bug
 Package:OpenSSL related
 Operating System:   Windows
 PHP Version:5.3.2
 Assigned To:pajoye
 Block user comment: N
 Private report: N

 New Comment:

On 5.3.6, Win7 x64, and it seems on other windows versions as well, the call to 
openssl_random_pseudo_bytes() still takes one second. Since apparently doing 
non-crypto-safe output is not possible on windows, it would be great to at 
least work on the delay for crypto-safe output.


Previous Comments:

[2011-06-14 11:18:05] paj...@php.net

Windows version?


[2011-06-14 10:22:18] s...@php.net

The changelog says this has been fixed in 5.3.4, but the function still takes 
1second to return on my machine (5.3.6). Note that the amount of bytes doesn't 
matter, and it's always around 1second.



$t = microtime(true);

openssl_random_pseudo_bytes(1, $strong);

var_dump(microtime(true) - $t, $strong);



Outputs:

float 1.0317049026489

boolean true


[2010-04-23 10:47:16] paj...@php.net

Under CLI or inside a web server?



Can you try under CLI please?


[2010-04-23 10:47:13] paj...@php.net

Under CLI or inside a web server?



Can you try under CLI please?


[2010-04-22 17:38:44] kaisellgren at gmail dot com

Description:

Whenever I execute the following command:



openssl_random_pseudo_bytes(1); // or any other number



PHP will process the function call for like a minute.



I am using Windows 7, and it is affected by both x86 and x64 systems. I do not 
see a problem on Linux, though.

Test script:
---
$random = openssl_random_pseudo_bytes(1, $strong);

Expected result:

The random generation should happen within a blink of an eye.







-- 
Edit this bug report at http://bugs.php.net/bug.php?id=51636edit=1


Bug #51636 [Fbk]: openssl_random_pseudo_bytes() painfully slow

2011-06-14 Thread scottmac
Edit report at http://bugs.php.net/bug.php?id=51636edit=1

 ID: 51636
 Updated by: scott...@php.net
 Reported by:kaisellgren at gmail dot com
 Summary:openssl_random_pseudo_bytes() painfully slow
 Status: Feedback
 Type:   Bug
 Package:OpenSSL related
 Operating System:   Windows
 PHP Version:5.3.2
 Assigned To:pajoye
 Block user comment: N
 Private report: N

 New Comment:

It's a by reference parameter, not an option parameter.



I don't see the delay here on Win7 x64 with 5.3-dev


Previous Comments:

[2011-06-14 17:40:49] s...@php.net

On 5.3.6, Win7 x64, and it seems on other windows versions as well, the call to 
openssl_random_pseudo_bytes() still takes one second. Since apparently doing 
non-crypto-safe output is not possible on windows, it would be great to at 
least work on the delay for crypto-safe output.


[2011-06-14 11:18:05] paj...@php.net

Windows version?


[2011-06-14 10:22:18] s...@php.net

The changelog says this has been fixed in 5.3.4, but the function still takes 
1second to return on my machine (5.3.6). Note that the amount of bytes doesn't 
matter, and it's always around 1second.



$t = microtime(true);

openssl_random_pseudo_bytes(1, $strong);

var_dump(microtime(true) - $t, $strong);



Outputs:

float 1.0317049026489

boolean true


[2010-04-23 10:47:16] paj...@php.net

Under CLI or inside a web server?



Can you try under CLI please?


[2010-04-23 10:47:13] paj...@php.net

Under CLI or inside a web server?



Can you try under CLI please?




The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at

http://bugs.php.net/bug.php?id=51636


-- 
Edit this bug report at http://bugs.php.net/bug.php?id=51636edit=1


Bug #51636 [Fbk]: openssl_random_pseudo_bytes() painfully slow

2010-04-23 Thread pajoye
Edit report at http://bugs.php.net/bug.php?id=51636edit=1

 ID:   51636
 Updated by:   paj...@php.net
 Reported by:  kaisellgren at gmail dot com
 Summary:  openssl_random_pseudo_bytes() painfully slow
 Status:   Feedback
 Type: Bug
 Package:  OpenSSL related
 Operating System: Windows
 PHP Version:  5.3.2
-Assigned To:  pajo
+Assigned To:  pajoye

 New Comment:

Under CLI or inside a web server?



Can you try under CLI please?


Previous Comments:

[2010-04-23 10:47:13] paj...@php.net

Under CLI or inside a web server?



Can you try under CLI please?


[2010-04-22 17:38:44] kaisellgren at gmail dot com

Description:

Whenever I execute the following command:



openssl_random_pseudo_bytes(1); // or any other number



PHP will process the function call for like a minute.



I am using Windows 7, and it is affected by both x86 and x64 systems. I
do not see a problem on Linux, though.

Test script:
---
$random = openssl_random_pseudo_bytes(1, $strong);

Expected result:

The random generation should happen within a blink of an eye.







-- 
Edit this bug report at http://bugs.php.net/bug.php?id=51636edit=1