Re: [PHP-DEV] xoshiro** edge case (all zeros)

2022-08-04 Thread Tim Düsterhus
Hi On 8/4/22 22:32, Hans Henrik Bergan wrote: dangerous to be sure, but it's also a technically valid seed, are you sure we should disallow a valid seed? The all-zero state is not a valid state as per the reference implementation at: https://xoshiro.di.unimi.it/xoshiro256starstar.c > The st

Re: [PHP-DEV] xoshiro** edge case (all zeros)

2022-08-04 Thread Anton Smirnov
On Thu, 2022-08-04 at 22:32 +0200, Hans Henrik Bergan wrote: > dangerous to be sure, but it's also a technically valid seed, > are you sure we should disallow a valid seed? Reference implementation defines it as invalid: https://prng.di.unimi.it/xoshiro256starstar.c Some implementations choose to

Re: [PHP-DEV] xoshiro** edge case (all zeros)

2022-08-04 Thread Jordan LeDoux
On Thu, Aug 4, 2022 at 1:33 PM Hans Henrik Bergan wrote: > dangerous to be sure, but it's also a technically valid seed, > are you sure we should disallow a valid seed? > > How is it a valid seed if it creates invalid outputs?

Re: [PHP-DEV] xoshiro** edge case (all zeros)

2022-08-04 Thread Hans Henrik Bergan
dangerous to be sure, but it's also a technically valid seed, are you sure we should disallow a valid seed? On Thu, 4 Aug 2022 at 20:33, Tim Düsterhus wrote: > Hi > > On 8/4/22 10:09, Anton Smirnov wrote: > > xoshiro** has a known edge case: all-zero seed > > Indeed, good catch. I had that in mi

Re: [PHP-DEV] xoshiro** edge case (all zeros)

2022-08-04 Thread Tim Düsterhus
Hi On 8/4/22 10:09, Anton Smirnov wrote: xoshiro** has a known edge case: all-zero seed Indeed, good catch. I had that in mind, but forgot about it. generate()), PHP_EOL; // } It should be documented and/or handled It's only for a string seed, int seed is not affected I

Re: [PHP-DEV] xoshiro** edge case (all zeros)

2022-08-04 Thread Go Kudo
2022年8月4日(木) 17:10 Anton Smirnov : > Hi! > > Randomness again. Sorry if I just missed some relevant discussion > > xoshiro** has a known edge case: all-zero seed > > > $engine = new \Random\Engine\Xoshiro256StarStar(str_repeat("\0", 32)); > > while (true) { > echo hex2bin($engine->generate())

[PHP-DEV] PHP 8.1.9 Released

2022-08-04 Thread Patrick ALLAERT
-BEGIN PGP SIGNED MESSAGE- Hash: SHA512 The PHP development team announces the immediate availability of PHP 8.1.9. This is a bugfix release. All PHP 8.1 users are encouraged to upgrade to this version. For source downloads of PHP 8.1.9 please visit our downloads page. Windows binaries c

[PHP-DEV] PHP 8.2.0 Beta 2 available for testing

2022-08-04 Thread Sergey Panteleev
PHP 8.2.0beta2 has just been released and can be downloaded from: https://downloads.php.net/~sergey or https://qa.php.net/ or use the git tag: php-8.2.0beta2 Windows binaries are available at: https://windows.php.net/qa/#php-8.2 Please test it carefully, and report any bugs to https://github.

[PHP-DEV] PHP 8.0.22 Released

2022-08-04 Thread Gabriel Caruso
The PHP development team announces the immediate availability of PHP 8.0.22. This is a bugfix release. All PHP 8.0 users are encouraged to upgrade to this version. For source downloads of PHP 8.0.2 please visit our downloads page. Windows binaries can be found on the PHP for Windows site. The lis

[PHP-DEV] xoshiro** edge case (all zeros)

2022-08-04 Thread Anton Smirnov
Hi! Randomness again. Sorry if I just missed some relevant discussion xoshiro** has a known edge case: all-zero seed generate()), PHP_EOL; // } It should be documented and/or handled It's only for a string seed, int seed is not affected -- Anton -- PHP Internals - PHP Runti