Hmm, can you elaborate on this? How was the decryption causing the issue you were running into? Just so I know how to best help other people in the future
The idea is when you multiply two DCRTPoly, you’re doing it term by term.
For example the first element of the DCRTPoly corresponding to the Plaintext “1” is 148 (multiplicative depth = 3 and the scheme is BGV).
When you multiply this DCRT by itself the result is 21904=148^2 % modulus[0] (here modulus[0] = 2148728833). Here we expect the result to be 148 (because 1 * 1 = 1).
I precise that i’m working with packed Plaintext and I’m working on pure multiparty BGV and BFV.
So I need to use the bit Decomposition and I want to try to construct again the DCRTPoly (need this part to build the Relinearisation key).
If you want to compute BitDecomp(DCRTPoly(a)) by PowersofTwo(DCRTPoly(b)) ( expecting result = a*b), you can’t have the good result if you don’t decode it. In fact, this result is correct but you need to work a little more on it to see it clearly.
If you take a look at the decryption function (because the multCore function only does ct1[i] * ct2[j] classical multiplication), you can find how to decode your DCRTPoly. DecryptCore makes the decryption (used in Decrypt). Decrypt puts the DCRTPoly in the NativePoly (in a new Plaintext) and decode by using the scaling factor and the Decode function. So you need to keep the good scaling factor to decode it correctly.