Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions shell_encryption/ntt_parameters.h
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,6 @@ rlwe::StatusOr<ModularInt> 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.
Expand All @@ -60,7 +59,7 @@ rlwe::StatusOr<ModularInt> 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;
}
}
Expand Down
Loading