1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 20:07:35 +00:00

LibCrypto: Don't copy the prime test candidates

This was copying a bunch of bigints for no reason.
This commit is contained in:
AnotherTest 2021-02-14 14:52:18 +03:30 committed by Andreas Kling
parent 3fe7ac0924
commit 48fbf6a88d

View file

@ -258,7 +258,7 @@ static bool MR_primality_test(UnsignedBigInteger n, const Vector<UnsignedBigInte
return n == 2;
}
for (auto a : tests) {
for (auto& a : tests) {
// Technically: ASSERT(2 <= a && a <= n - 2)
ASSERT(a < n);
auto x = ModularPower(a, d, n);