diff --git a/rand_isaac/src/isaac.rs b/rand_isaac/src/isaac.rs index 5ed0a967..c14b141c 100644 --- a/rand_isaac/src/isaac.rs +++ b/rand_isaac/src/isaac.rs @@ -174,7 +174,7 @@ impl BlockRngCore for IsaacCore { type Item = u32; type Results = IsaacArray; - /// Refills the output buffer, `results`. See also the pseudocode desciption + /// Refills the output buffer, `results`. See also the pseudocode description /// of the algorithm in the `IsaacRng` documentation. /// /// Optimisations used (similar to the reference implementation): diff --git a/rand_isaac/src/isaac64.rs b/rand_isaac/src/isaac64.rs index 3cb59e4c..c3f8dd8b 100644 --- a/rand_isaac/src/isaac64.rs +++ b/rand_isaac/src/isaac64.rs @@ -165,7 +165,7 @@ impl BlockRngCore for Isaac64Core { type Item = u64; type Results = IsaacArray; - /// Refills the output buffer, `results`. See also the pseudocode desciption + /// Refills the output buffer, `results`. See also the pseudocode description /// of the algorithm in the `Isaac64Rng` documentation. /// /// Optimisations used (similar to the reference implementation): diff --git a/rand_jitter/README.md b/rand_jitter/README.md index a2b901f0..a05adff5 100644 --- a/rand_jitter/README.md +++ b/rand_jitter/README.md @@ -33,10 +33,10 @@ without `std` support a timer must be supplied via `JitterRng::new_with_timer`. ## Quality testing -`JitterRng::new()` has build-in, but limited, quality testing, however +`JitterRng::new()` has built-in, but limited, quality testing, however before using `JitterRng` on untested hardware, or after changes that could -effect how the code is optimized (such as a new LLVM version), it is -recommend to run the much more stringent +affect how the code is optimized (such as a new LLVM version), it is +recommended to run the much more stringent [NIST SP 800-90B Entropy Estimation Suite](https://github.com/usnistgov/SP800-90B_EntropyAssessment). Use the following code using `timer_stats` to collect the data: @@ -94,7 +94,7 @@ validate the estimation. restart.py -v jitter_rng_var.bin 8 ``` 2. Estimate the expected amount of entropy that is available in the last 4 - bits of the timer delta after running noice sources. Note that a value of + bits of the timer delta after running noise sources. Note that a value of `3.70` is the minimum estimated entropy for true randomness. ```sh python noniid_main.py -v -u 4 jitter_rng_var.bin 4 diff --git a/rand_jitter/src/error.rs b/rand_jitter/src/error.rs index 883cc648..6c6b2c24 100644 --- a/rand_jitter/src/error.rs +++ b/rand_jitter/src/error.rs @@ -30,7 +30,7 @@ pub enum TimerError { /// Timer is not monotonically increasing. NotMonotonic = ERROR_BASE + 3, /// Variations of deltas of time too small. - TinyVariantions = ERROR_BASE + 4, + TinyVariations = ERROR_BASE + 4, /// Too many stuck results (indicating no added entropy). TooManyStuck = ERROR_BASE + 5, #[doc(hidden)] @@ -43,7 +43,7 @@ impl TimerError { TimerError::NoTimer => "no timer available", TimerError::CoarseTimer => "coarse timer", TimerError::NotMonotonic => "timer not monotonic", - TimerError::TinyVariantions => "time delta variations too small", + TimerError::TinyVariations => "time delta variations too small", TimerError::TooManyStuck => "too many stuck results", TimerError::__Nonexhaustive => unreachable!(), } diff --git a/rand_jitter/src/lib.rs b/rand_jitter/src/lib.rs index 21ce9e9e..77343ba6 100644 --- a/rand_jitter/src/lib.rs +++ b/rand_jitter/src/lib.rs @@ -522,7 +522,7 @@ where fn gen_entropy(&mut self) -> u64 { trace!("JitterRng: collecting entropy"); - // Prime `ec.prev_time`, and run the noice sources to make sure the + // Prime `ec.prev_time`, and run the noise sources to make sure the // first loop round collects the expected entropy. let mut ec = EcState { prev_time: (self.timer)(), @@ -650,7 +650,7 @@ where // `assert!(delta_sum / TESTLOOPCOUNT >= 1)` // `assert!(delta_sum >= TESTLOOPCOUNT)` if delta_sum < TESTLOOPCOUNT { - return Err(TimerError::TinyVariantions); + return Err(TimerError::TinyVariations); } // Ensure that we have variations in the time stamp below 100 for at @@ -673,7 +673,7 @@ where // available bits of entropy per round here for two reasons: // 1. Simple estimates of the available bits (like Shannon entropy) are // too optimistic. - // 2. Unless we want to waste a lot of time during intialization, there + // 2. Unless we want to waste a lot of time during initialization, there // only a small number of samples are available. // // Therefore we use a very simple and conservative estimate: @@ -703,10 +703,10 @@ where /// `JitterRng` entropy collector. /// /// Setting `var_rounds` to `true` will execute the memory access and the - /// CPU jitter noice sources a variable amount of times (just like a real + /// CPU jitter noise sources a variable amount of times (just like a real /// `JitterRng` round). /// - /// Setting `var_rounds` to `false` will execute the noice sources the + /// Setting `var_rounds` to `false` will execute the noise sources the /// minimal number of times. This can be used to measure the minimum amount /// of entropy one round of the entropy collector can collect in the worst /// case. diff --git a/rand_jitter/tests/mod.rs b/rand_jitter/tests/mod.rs index 58ff8dac..827150b6 100644 --- a/rand_jitter/tests/mod.rs +++ b/rand_jitter/tests/mod.rs @@ -5,7 +5,7 @@ use rand_jitter::JitterRng; fn test_jitter_init() { use rand_core::RngCore; - // Because this is a debug build, measurements here are not representive + // Because this is a debug build, measurements here are not representative // of the final release build. // Don't fail this test if initializing `JitterRng` fails because of a // bad timer (the timer from the standard library may not have enough diff --git a/rand_xoshiro/src/lib.rs b/rand_xoshiro/src/lib.rs index 1ab04528..60260536 100644 --- a/rand_xoshiro/src/lib.rs +++ b/rand_xoshiro/src/lib.rs @@ -44,7 +44,7 @@ //! (which are discarded when generating floats), making it fail linearity //! tests. This is unlikely to have any impact in practise. //! - [`SplitMix64`]: Recommended for initializing generators of the xoshiro -//! familiy from a 64-bit seed. Used for implementing `seed_from_u64`. +//! family from a 64-bit seed. Used for implementing `seed_from_u64`. //! //! # 32-bit generators //! - [`Xoshiro128StarStar`]: Recommended for all purposes. Excellent speed.