Re: trivial random ports for deterministic seeding
Peter McGoron 01 Jun 2026 11:53 UTC
I don't think `trivial` should be required to reject known possibly bad
seeds. The responsibility should be on the user of the library to
understand that some seeds will cause bad behavior across all possible
PRNG implementations. There also might be some esoteric reason to have
an infinite source of zero bytes.
For an example of how other PRNG libraries handle this issue, Rust's
xorshiro256++ implementation[1] will map an all-zero seed to some
arbitrary fixed seed.
[1]:
https://docs.rs/rand/0.10.1/rand/rngs/struct.Xoshiro256PlusPlus.html#method.from_seed
-- Peter McGoron