commit | 0baa82d94366f1a01abf45b9a7f3979c9a4f1198 | [log] [tgz] |
---|---|---|
author | Xin Li <delphij@google.com> | Wed Nov 17 20:21:23 2021 +0000 |
committer | Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com> | Wed Nov 17 20:21:23 2021 +0000 |
tree | e5c19e6dedead598cb804e2c65a0766aefec6dbd | |
parent | e2f3b1a1fcad497f948c2932a1f93abc89991f3b [diff] | |
parent | 0eedde5ed3be161bb20e31d8ff0ddf2386f6e268 [diff] |
[automerger skipped] Merge sc-qpr1-dev-plus-aosp-without-vendor@7810918 am: 05466fae6e -s ours am: 15e365ad71 -s ours am: 0eedde5ed3 -s ours am skip reason: Merged-In I58e56ca2f93f17ae8eea14873996d380943cd07d with SHA-1 27d7ad288e is already in history Original change: https://googleplex-android-review.googlesource.com/c/platform/external/rust/crates/rand_chacha/+/16278336 Change-Id: I33154561aaaceb2deb8d617ff9a5ba8915118ed7
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.