diff options
author | Ben Wiederhake <BenWiederhake.GitHub@gmx.de> | 2020-07-25 17:25:28 +0200 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2020-07-28 19:10:10 +0200 |
commit | 708164b0b9ce46b411620c4e6d8fa7b931a3dc4b (patch) | |
tree | 6d18b4a3632e2f417833304acd8d0a5738b58a98 | |
parent | 801058e5140f31d093d8f3ac24a2597a7fa28287 (diff) | |
download | serenity-708164b0b9ce46b411620c4e6d8fa7b931a3dc4b.zip |
LibCrypto: Already using strong crypto
ModularFunctions::random_number calls into AK::fill_with_random calls (on
Serenity) into arc4random_buf calls into Process::sys calls into
get_good_random_bytes, which is cryptographically secure.
-rw-r--r-- | Libraries/LibCrypto/NumberTheory/ModularFunctions.h | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/Libraries/LibCrypto/NumberTheory/ModularFunctions.h b/Libraries/LibCrypto/NumberTheory/ModularFunctions.h index 7d31f666ac..afd97a107c 100644 --- a/Libraries/LibCrypto/NumberTheory/ModularFunctions.h +++ b/Libraries/LibCrypto/NumberTheory/ModularFunctions.h @@ -311,7 +311,6 @@ static UnsignedBigInteger random_number(const UnsignedBigInteger& min, const Uns ASSERT(min < max); auto range = max.minus(min); UnsignedBigInteger base; - // FIXME: Need a cryptographically secure rng auto size = range.trimmed_length() * sizeof(u32); u8 buf[size]; AK::fill_with_random(buf, size); |