You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In mpc/cheetah/rlwe/lwe_ct.cc, void PhantomLWECt::CastAsRLWE(const seal::SEALContext &context, uint64_t multiplier, RLWECt *out) const confuses me. The following code
if (multiplier == num_coeff) {
fixed_mul = ntt_tables[l].inv_degree_modulo();
} else {
// compute multiplier^{-1} mod p
uint64_t inv_multiplier;
SPU_ENFORCE(
try_invert_uint_mod(multiplier, modulus[l], inv_multiplier),
fmt::format("inverse mod for multiplier={} failed", multiplier));
fixed_mul.set(negate_uint_mod(inv_multiplier, modulus[l]), modulus[l]);
}
negates inv_multiplier in the second branch but not in the first branch. After a careful consideration, I think fixed_mul.set(negate_uint_mod(inv_multiplier, modulus[l]), modulus[l]); should be deleted, because the following code really need fixed_mul = multiplier^{-1} mod p without an extra minus sign.
Issue Type
Usability
Modules Involved
MPC protocol
Have you reproduced the bug with SPU HEAD?
No
Have you searched existing issues?
Yes
SPU Version
commit 34d7f30 (HEAD -> main, origin/main, origin/HEAD)
OS Platform and Distribution
Ubuntu 20.04
Python Version
3.10
Compiler Version
gcc 13
Current Behavior?
In mpc/cheetah/rlwe/lwe_ct.cc,
void PhantomLWECt::CastAsRLWE(const seal::SEALContext &context, uint64_t multiplier, RLWECt *out) const
confuses me. The following codenegates
inv_multiplier
in the second branch but not in the first branch. After a careful consideration, I thinkfixed_mul.set(negate_uint_mod(inv_multiplier, modulus[l]), modulus[l]);
should be deleted, because the following code really needfixed_mul = multiplier^{-1} mod p
without an extra minus sign.Standalone code to reproduce the issue
Relevant log output
No response
The text was updated successfully, but these errors were encountered: