From 9e32655a96c1f8080b94a67cb8d13205c9442c93 Mon Sep 17 00:00:00 2001 From: Wei Dai Date: Tue, 15 Mar 2022 00:06:47 -0700 Subject: [PATCH] PR #430 by zirconium-n: reduced util::try_minimal_primitive_root search iterations by half. --- native/src/seal/util/numth.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/native/src/seal/util/numth.cpp b/native/src/seal/util/numth.cpp index c5d0dd99e..62c9e8291 100644 --- a/native/src/seal/util/numth.cpp +++ b/native/src/seal/util/numth.cpp @@ -406,7 +406,7 @@ namespace seal uint64_t current_generator = root; // destination is going to always contain the smallest generator found - for (size_t i = 0; i < degree; i++) + for (size_t i = 0; i < degree; i += 2) { // If our current generator is strictly smaller than destination, // update