commit | caa15dd5055a8cbdd6e612345f443f146317921e | [log] [tgz] |
---|---|---|
author | Android Build Coastguard Worker <android-build-coastguard-worker@google.com> | Fri Oct 01 16:00:28 2021 +0000 |
committer | Android Build Coastguard Worker <android-build-coastguard-worker@google.com> | Fri Oct 01 16:00:28 2021 +0000 |
tree | c3baebb4bfac52622d1d8bbbd0f05a323253624c | |
parent | a955fb2929bda69b0f4e1da346856bc5ea1e0327 [diff] | |
parent | 16ccc2d3ebd4c51c0745362048f4f75942d71da2 [diff] |
Snap for 7785160 from 16ccc2d3ebd4c51c0745362048f4f75942d71da2 to t-keystone-qcom-release Change-Id: I5b927c31c0373364195f6a0c794977b1f0e8faf7
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.