-
-
Notifications
You must be signed in to change notification settings - Fork 473
Description
Due to close correlations of PCG streams and lack of right-state propegation we should consider replacing PCG with another algorithm(s) for the next Rand version (0.8).
From the docs, the purpose of SmallRng
is:
SmallRng may be a good choice when a PRNG with small state, cheap initialization, good statistical quality and good performance are required. It is not a good choice when security against prediction or reproducibility are important. ... The algorithm is deterministic but should not be considered reproducible due to dependence on platform and possible replacement in future library versions.
Ideally (in my opinion), SmallRng
should be small but not too small; preferably 128-bit or 256-bit if we must. @vigna have you thoughts on this (given that you recommend a 256-bit variant of your generator for general usage, but in this case we already have a ChaCha-based generator for general usage)?
There are other generators besides PCG and Xo(ro)shiro, e.g. GJrand, JSF and SFC, though I've seen less analysis of these. Previous decisions on this topic have been somewhat influenced by this thread, though it only considers benchmarks and some very basic analysis.