How to do mod operation in bgv or bfv ? And can I change the PlaintextModulus ?
Thanks for helping me, firstly.
I would like to use the Chinese Reminder Theorem to reduce big number to several smaller numbers, like
x
is in a number lies in 0-2^12-1, sox
's PlaintextModulus should be 2^12-1 (or may be some number close), then find smaller number as modulus, and do themod operation
, like a1, a2, a3 is some coprime numbers near 2^4-1, x mod a1 = b1, x mod a2 = b2, x mod a3 = b3. After that I can get the x through Chinese Reminder Theorem from a1,a2,a3,b1,b2,b3.
I want to perform all the above operations in FHE, typically bgv or bfv scheme, with the number x
encrypted.
But I found that I can't do the mod operation
to create a1,a2,a3,b1,b2,b3,
I know that it's a modular integer arithmetic
, so I tried to create new ciphertext with PlaintextModulus = some smaller number, or to reduce the PlaintextModulus of `x. None of them works, so I came here looking for help.
Is there a way to do the mod operation
, or is there a way to convert the PlaintextModulus, or maybe some other method to create the CRT system in FHE?
Thanks again.