commit | a3ca9c32f9a15e34c3b426c9b9c6ff8a98af2ea4 | [log] [tgz] |
---|---|---|
author | Jeff Vander Stoep <jeffv@google.com> | Tue Oct 19 13:41:01 2021 +0200 |
committer | Jeff Vander Stoep <jeffv@google.com> | Tue Oct 19 13:41:01 2021 +0200 |
tree | 83e907ff4ee1eb2be99e78fef911d9f5f7e71b79 | |
parent | 6364415f39e4931729956b9ada9b0bfd604cf65b [diff] |
Enable tests Test: atest ------- x86_64 rand_chacha_host_test_src_lib: Passed: 11, Failed: 0, Ignored: 0, Assumption Failed: 0, x86 rand_chacha_device_test_src_lib: Passed: 11, Failed: 0, Ignored: 0, Assumption Failed: 0, Change-Id: Ia392e26e02bd36fa89de642e41ada0f25929716b
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.