Skip to content
Permalink
Browse files Browse the repository at this point in the history
LibCrypto: Don't copy the prime test candidates
This was copying a bunch of bigints for no reason.
  • Loading branch information
alimpfard authored and awesomekling committed Feb 14, 2021
1 parent 3fe7ac0 commit 48fbf6a
Showing 1 changed file with 1 addition and 1 deletion.
Expand Up @@ -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);
Expand Down

0 comments on commit 48fbf6a

Please sign in to comment.