Re: xoshiro** edge case (all zeros)

From: Date: Thu, 04 Aug 2022 16:14:43 +0000
Subject: Re: xoshiro** edge case (all zeros)
References: 1  Groups: php.internals 
Request: Send a blank email to internals+get-118347@lists.php.net to get a copy of this message
2022年8月4日(木) 17:10 Anton Smirnov <sandfox@sandfox.me>: > Hi! > > Randomness again. Sorry if I just missed some relevant discussion > > xoshiro** has a known edge case: all-zero seed > > <?php > > $engine = new \Random\Engine\Xoshiro256StarStar(str_repeat("\0", 32)); > > while (true) { > echo hex2bin($engine->generate()), PHP_EOL; // 0000000000000000 > } > > It should be documented and/or handled > > It's only for a string seed, int seed is not affected > > -- > Anton > > -- > PHP Internals - PHP Runtime Development Mailing List > To unsubscribe, visit: https://www.php.net/unsub.php > > Hi. Thanks for the report! This is dangerous behavior and we will attempt to fix it for 8.2beta3. Best regards Go Kudo

« previous php.internals (#118347) next »