Expand description
Random number generation.
For most purposes in Arti, we use one of two random number generators:
rand::rng()(formerly calledrand::thread_rng(), up till rand 0.9)- The
CautiousRngimplemented here.
CautiousRng should be used whenever we are generating
a medium- or long-term cryptographic key:
one that will be stored to disk, or used for more than a single communication.
It is slower than rand::rng(),
but is more robust against several kinds of failure.
Modules§
- backup 🔒
- A backup RNG, independent of other known sources.
- testing 🔒
- Functionality for testing Rng code that requires an EntropicRng.
Structs§
- Cautious
Rng - An exceptionally cautious wrapper for
rand_core::OsRng - Fake
Entropic Rng - Testing only: Pretend that an inner RNG truly implements
EntropicRng.
Traits§
- Entropic
Rng - Trait representing an Rng where every output is derived from supposedly strong entropy.