Non-physical true random number generator based on timing jitter.
This is a true random number generator, as opposed to pseudo-random
generators. Random numbers generated by
JitterRng can be seen as fresh
entropy. A consequence is that it is orders of magnitude slower than
and PRNGs (about 103..106 slower).
There are very few situations where using this RNG is appropriate. Only very few applications require true entropy. A normal PRNG can be statistically indistinguishable, and a cryptographic PRNG should also be as impossible to predict.
JitterRng is recommended for initializing cryptographic PRNGs when
OsRng is not available.
JitterRng can be used without the standard library, but not conveniently,
you must provide a high-precision timer and carefully have to follow the
This implementation is based on Jitterentropy version 2.1.0.
Note: There is no accurate timer available on WASM platforms, to help
prevent fingerprinting or timing side-channel attacks. Therefore
JitterRng::new() is not available on WASM. It is also unavailable
pub extern crate rand_core;
- A true random number generator based on jitter in the CPU execution time, and jitter in memory access time.
- An error that can occur when