Compressing partial ciphertexts for serialization in BGV


I am experimenting with serializing partial ciphertexts in BGV.

    auto ciphertextPartial1 = cc->MultipartyDecryptLead({ciphertextAdd123}, kp1.secretKey);
    Serial::SerializeToFile(DATAFOLDER + "/" + "ciphertextPartial1.txt", cc->Compress(ciphertextPartial1[0]), SerType::BINARY)

However, the deserialized, compressed partial ciphertext does not produce valid results during decryption. Is Compress not supported for partial ciphertexts or am I missing something?

As far as I know, Compress has not been tested on the decryption shares. Have you tried first compressing the ciphertext and then performing the partial decryption?

As @andreea.alexandru pointed out, Compress must be called before the distributed decryption is started. Otherwise, it will produce incorrect results (and will be inefficient, too).