• Home
Name Date Size #Lines LOC

..--

src/06-Sep-2024-941711

.cargo_vcs_info.jsonD06-Sep-202474 65

Android.bpD06-Sep-20242.6 KiB9085

CHANGELOG.mdD06-Sep-20241.3 KiB3627

COPYRIGHTD06-Sep-2024569 139

Cargo.tomlD06-Sep-20241.3 KiB4641

Cargo.toml.origD06-Sep-2024882 3127

LICENSED06-Sep-202410.6 KiB202169

LICENSE-APACHED06-Sep-202410.6 KiB202169

LICENSE-MITD06-Sep-20241.1 KiB2723

METADATAD06-Sep-2024382 2019

MODULE_LICENSE_APACHE2D06-Sep-20240

OWNERSD06-Sep-202440 21

README.mdD06-Sep-20242 KiB4933

TEST_MAPPINGD06-Sep-20241.9 KiB9493

cargo_embargo.jsonD06-Sep-2024125 98

README.md

1# rand_chacha
2
3[![Test Status](https://github.com/rust-random/rand/workflows/Tests/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://img.shields.io/badge/api-master-yellow.svg)](https://rust-random.github.io/rand/rand_chacha)
7[![API](https://docs.rs/rand_chacha/badge.svg)](https://docs.rs/rand_chacha)
8[![Minimum rustc version](https://img.shields.io/badge/rustc-1.36+-lightgray.svg)](https://github.com/rust-random/rand#rust-version-requirements)
9
10A cryptographically secure random number generator that uses the ChaCha
11algorithm.
12
13ChaCha is a stream cipher designed by Daniel J. Bernstein[^1], that we use
14as an RNG. It is an improved variant of the Salsa20 cipher family, which was
15selected as one of the "stream ciphers suitable for widespread adoption" by
16eSTREAM[^2].
17
18The RNGs provided by this crate are implemented via the fast stream ciphers of
19the [`c2-chacha`](https://crates.io/crates/c2-chacha) crate.
20
21Links:
22
23-   [API documentation (master)](https://rust-random.github.io/rand/rand_chacha)
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`
38feature can be explicitly required to re-enable `std` support. Using `std`
39allows 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
45Apache License (Version 2.0).
46
47See [LICENSE-APACHE](LICENSE-APACHE) and [LICENSE-MIT](LICENSE-MIT), and
48[COPYRIGHT](COPYRIGHT) for details.
49