Hello Everyone,
The below is the default OpenFHE BFV code (https://github.com/openfheorg/openfhe-development/blob/main/src/pke/examples/simple-integers.cpp) with multiplicative depth 4. After 15 multiplications I am unbale to multiply. Even changing multiplicative depth from 4 to 5 still 15 multiplication are possible.
Am I on the right track ?
parameters.SetPlaintextModulus(65537);
parameters.SetMultiplicativeDepth(4);
std::vector<int64_t> vectorOfInts1 = {1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2};
Plaintext plaintext1 = cryptoContext->MakePackedPlaintext(vectorOfInts1);
// Second plaintext vector is encoded
std::vector<int64_t> vectorOfInts2 = {2, 2, 1, 2, 1, 2, 1, 2, 2, 2, 1, 2};
Plaintext plaintext2 = cryptoContext->MakePackedPlaintext(vectorOfInts2);
\Homomorphic Multiplication
auto ciphertextMul1 = cryptoContext->EvalMult(ciphertext1, ciphertext2);
auto ciphertextMul2 = cryptoContext->EvalMult(ciphertext1, ciphertext2);
auto ciphertextMul3 = cryptoContext->EvalMult(ciphertext1, ciphertext2);
auto ciphertextMul4 = cryptoContext->EvalMult(ciphertext1, ciphertext2);
auto ciphertextMul5 = cryptoContext->EvalMult(ciphertext1, ciphertext2);
auto ciphertextMul6 = cryptoContext->EvalMult(ciphertext1, ciphertext2);
auto ciphertextMul7 = cryptoContext->EvalMult(ciphertext1, ciphertext2);
auto ciphertextMul8 = cryptoContext->EvalMult(ciphertext1, ciphertext2);
auto ciphertextMul9 = cryptoContext->EvalMult(ciphertextMul1, ciphertextMul2);
auto ciphertextMul10 = cryptoContext->EvalMult(ciphertextMul3, ciphertextMul4);
auto ciphertextMul11 = cryptoContext->EvalMult(ciphertextMul5, ciphertextMul6);
auto ciphertextMul12 = cryptoContext->EvalMult(ciphertextMul7, ciphertextMul8);
auto ciphertextMul13 = cryptoContext->EvalMult(ciphertextMul9, ciphertextMul10);
auto ciphertextMul14 = cryptoContext->EvalMult(ciphertextMul11, ciphertextMul12);
auto ciphertextMul15 = cryptoContext->EvalMult(ciphertextMul13, ciphertextMul14);
Thanks in advance.