Expand description
Architecture-independent hardware entropy abstractions.
Centralizes hardware entropy/random number operations so that non-arch code
(particularly crypto/random.rs) does not need scattered
#[cfg(target_arch)] blocks with inline assembly.
§Functions
read_timestamp– read the hardware cycle/timer counter for entropy jitter.try_hardware_rng– attempt to read from a hardware RNG (RDRAND on x86_64).collect_timer_entropy– collect 32 bytes of timer-jitter entropy.
Functions§
- collect_
timer_ entropy - Collect 32 bytes of timer-jitter entropy.
- read_
timestamp - Read the hardware timestamp/cycle counter.
- try_
hardware_ rng - Attempt to read 32 bytes from a hardware random number generator.