commit | 19880638e946bcff3984a9038273d7c4b80867ff | [log] [tgz] |
---|---|---|
author | Android Build Coastguard Worker <[email protected]> | Fri Jul 07 04:50:47 2023 +0000 |
committer | Android Build Coastguard Worker <[email protected]> | Fri Jul 07 04:50:47 2023 +0000 |
tree | 0d0d33f47335cd7317ffa4ac221ff6d6a64a725a | |
parent | 9a4a7a1c22ec27eb5b2bf496395456ec5bdd6f86 [diff] | |
parent | 44f0b010f2e47026530b79e3d6ddd829e6087e4a [diff] |
Snap for 10453563 from 44f0b010f2e47026530b79e3d6ddd829e6087e4a to mainline-conscrypt-release Change-Id: I22d929c5d080d664bc425230463b80c313642a81
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.