-
Notifications
You must be signed in to change notification settings - Fork 13.6k
Open
Labels
C-tracking-issueCategory: An issue tracking the progress of sth. like the implementation of an RFCCategory: An issue tracking the progress of sth. like the implementation of an RFCT-libs-apiRelevant to the library API team, which will review and decide on the PR/issue.Relevant to the library API team, which will review and decide on the PR/issue.
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?
Footnotes
Noratrieb and mstoeckl
Metadata
Metadata
Assignees
Labels
C-tracking-issueCategory: An issue tracking the progress of sth. like the implementation of an RFCCategory: An issue tracking the progress of sth. like the implementation of an RFCT-libs-apiRelevant to the library API team, which will review and decide on the PR/issue.Relevant to the library API team, which will review and decide on the PR/issue.