Skip to content

Random: Xoshiro256StarStar does not reject the invalid all-zero state #9249

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
zeriyoshi opened this issue Aug 4, 2022 · 1 comment
Closed

Comments

@zeriyoshi
Copy link
Contributor

Description

It works as intended, but as a PRNG it is a dangerous behavior and should make the seed fail.

https://externals.io/message/118343

Reporting from Anton Smirnov, Thank you!

PHP Version

PHP-master

Operating System

All

@zeriyoshi
Copy link
Contributor Author

#9250
Works fast!

@TimWolla TimWolla changed the title Random: Xoshiro256StarStar outputs always zero Random: Xoshiro256StarStar does not reject the invalid all-zero state Aug 5, 2022
TimWolla added a commit to TimWolla/php-src that referenced this issue Aug 5, 2022
- Retry if the CSPRNG generates a zero state.
- Throw ValueError if the user passes a zero state.

Fixes phpGH-9249
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants