Debian Codegraph @

debian/rust-vendor/rand_chacha/README.md

raw
1 # rand_chacha
2
3 [![Test Status](https://github.com/rust-random/rand/actions/workflows/test.yml/badge.svg?event=push)](https://github.com/rust-random/rand/actions)
4 [![Latest version](https://img.shields.io/crates/v/rand_chacha.svg)](https://crates.io/crates/rand_chacha)
5 [![Book](https://img.shields.io/badge/book-master-yellow.svg)](https://rust-random.github.io/book/)
6 [![API](https://docs.rs/rand_chacha/badge.svg)](https://docs.rs/rand_chacha)
7
8 A cryptographically secure random number generator that uses the ChaCha
9 algorithm.
10
11 This implementation of ChaCha RNGs is built over `ppv-lite86` by Kaz Wesley,
12 and was formerly the implementation behind `rand::rngs::StdRng`.
13
14 ChaCha is a stream cipher designed by Daniel J. Bernstein[^1], that we use
15 as an RNG. It is an improved variant of the Salsa20 cipher family, which was
16 selected as one of the "stream ciphers suitable for widespread adoption" by
17 eSTREAM[^2].
18
19 The RNGs provided by this crate are implemented via the fast stream ciphers of
20 the [`c2-chacha`](https://crates.io/crates/c2-chacha) crate.
21
22 Links:
23
24 - [API documentation (docs.rs)](https://docs.rs/rand_chacha)
25 - [Changelog](https://github.com/rust-random/rand/blob/master/rand_chacha/CHANGELOG.md)
26
27 [rand]: https://crates.io/crates/rand
28 [^1]: D. J. Bernstein, [*ChaCha, a variant of Salsa20*](
29 https://cr.yp.to/chacha.html)
30
31 [^2]: [eSTREAM: the ECRYPT Stream Cipher Project](
32 http://www.ecrypt.eu.org/stream/)
33
34
35 ## Crate Features
36
37 `rand_chacha` is `no_std` compatible when disabling default features; the `std`
38 feature can be explicitly required to re-enable `std` support. Using `std`
39 allows detection of CPU features and thus better optimisation.
40
41
42 # License
43
44 `rand_chacha` is distributed under the terms of both the MIT license and the
45 Apache License (Version 2.0).
46
47 See [LICENSE-APACHE](LICENSE-APACHE) and [LICENSE-MIT](LICENSE-MIT), and
48 [COPYRIGHT](COPYRIGHT) for details.