commit | 05466fae6e6f79c7840d69cb41d76159bf8b4c2c | [log] [tgz] |
---|---|---|
author | Xin Li <delphij@google.com> | Wed Nov 10 08:05:38 2021 +0000 |
committer | Xin Li <delphij@google.com> | Wed Nov 10 08:05:38 2021 +0000 |
tree | e5c19e6dedead598cb804e2c65a0766aefec6dbd | |
parent | 11afc841dbfc96451619482033a7eaeb4d146f77 [diff] | |
parent | 27d7ad288e9bde3638b992338886625e7b6403a3 [diff] |
Merge sc-qpr1-dev-plus-aosp-without-vendor@7810918 Bug: 205056467 Merged-In: I58e56ca2f93f17ae8eea14873996d380943cd07d Change-Id: I0d8dd8e311a2a1a9b9f0e4bb85c298a1a4bdb4d7
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.