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
commit 48fbf6a88d
Notes: sideshowbarker 2024-07-18 22:19:22 +09:00

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);