Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chacha20: remove
Clone
impls on RNGs (#220)
Removes `derive(Clone)` on `ChaCha*Rng*`. They date back to the original PR which added RNG support (#63). Allowing `Clone` on an RNG is problematic because the cloned RNG will have the same internal state, duplicating outputs which can be catastrophic in a cryptographic context. Instead, the `SeedableRng::from_rng` method can be used to "fork" one RNG from another, seeing a new RNG with an output from another: https://docs.rs/rand_core/0.6.2/rand_core/trait.SeedableRng.html#method.from_rng
- Loading branch information