From e81ce950f875ad183b92fff5d35efa35fb9cd9aa Mon Sep 17 00:00:00 2001 From: Baiyu Li Date: Mon, 3 Aug 2026 14:32:02 -0700 Subject: [PATCH] No public description PiperOrigin-RevId: 958581210 --- shell_encryption/ntt_parameters.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/shell_encryption/ntt_parameters.h b/shell_encryption/ntt_parameters.h index 7cafc2c..49e80c3 100644 --- a/shell_encryption/ntt_parameters.h +++ b/shell_encryption/ntt_parameters.h @@ -51,7 +51,6 @@ rlwe::StatusOr PrimitiveNthRootOfUnity( // Test each number t to see whether t^k is a primitive n-th root // of unity - that t^{nk} is a root of unity but t^{(n/2)k} is not. - ModularInt one = ModularInt::ImportOne(params); for (typename ModularInt::Int t = params->Two(); t < params->modulus; t = t + params->One()) { // Produce a candidate root of unity. @@ -60,7 +59,7 @@ rlwe::StatusOr PrimitiveNthRootOfUnity( // Check whether candidate^half_n = 1. If not, it is a primitive root of // unity. - if (candidate.ModExp(half_n, params) != one) { + if (candidate.ModExp(half_n, params).ExportInt(params) != 1) { return candidate; } }