Open
Description
Feature gate: #![feature(deterministic_random_chacha8)]
This is a tracking issue for DeterministicRandomSource
, a deterministic random number generation that will always generate the same values for a given seed.
Public API
// core::random;
pub struct DeterministicRandomSource { .. }
impl DeterministicRandomSource {
pub const fn from_seed(seed: [u8; 32]) -> DeterministicRandomSource;
pub const fn seed(&self) -> &[u8; 32];
}
impl RandomSource for DeterministicRandomSource { .. }
impl Random for DeterministicRandomSource { .. }
Steps / History
- ACP: Simple seedable insecure random number generation, stable across Rust versions libs-team#394
- Implementation: #...
- Final comment period (FCP)1
- Stabilization PR
Unresolved Questions
- Is ChaCha8 the right random number generator to use? Given that this RNG should not be used for cryptographic purposes, ChaCha8 might be a bit overkill.
- Does the
seed
function make sense?