commit | 71384fad1324cf3fdaaa261f3033461ce45511c1 | [log] [tgz] |
---|---|---|
author | Josh Wu <joshwu@google.com> | Thu Oct 20 18:45:34 2022 +0000 |
committer | Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com> | Thu Oct 20 18:45:34 2022 +0000 |
tree | 5ab84c324ab8de2ae90cf6a8c0c58c4f0695b3ab | |
parent | 27107a2f14f4f21cded3df499a7e1a3ca5ec9a1e [diff] | |
parent | 437a0aec9eed12d15d5f0be0f33bb3159b5784de [diff] |
[automerger skipped] Make crate vendor available am: 8b51b23547 -s ours am: 437a0aec9e -s ours am skip reason: Merged-In Ia59d0d8bc9e840b47aa443acc6e830929f03e56c with SHA-1 e35d4848d1 is already in history Original change: https://googleplex-android-review.googlesource.com/c/platform/external/rust/crates/rand_chacha/+/19868058 Change-Id: I93289098ce8c2f01199fad0f7ef01cdf37acba74 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
A cryptographically secure random number generator that uses the ChaCha algorithm.
ChaCha is a stream cipher designed by Daniel J. Bernstein[^1], that we use as an RNG. It is an improved variant of the Salsa20 cipher family, which was selected as one of the “stream ciphers suitable for widespread adoption” by eSTREAM[^2].
The RNGs provided by this crate are implemented via the fast stream ciphers of the c2-chacha
crate.
Links:
[^1]: D. J. Bernstein, ChaCha, a variant of Salsa20
[^2]: eSTREAM: the ECRYPT Stream Cipher Project
rand_chacha
is no_std
compatible when disabling default features; the std
feature can be explicitly required to re-enable std
support. Using std
allows detection of CPU features and thus better optimisation.
rand_chacha
is distributed under the terms of both the MIT license and the Apache License (Version 2.0).
See LICENSE-APACHE and LICENSE-MIT, and COPYRIGHT for details.