Deserializing error

Hi together,

I have a problem with deserializing the multiplication keys with the following code:

// Deserializing mult keys
    std::ifstream emkeys(DATAFOLDER + "/" + multKeyLocation, std::ios::in | std::ios::binary);
    cc->DeserializeEvalMultKey(emkeys, SerType::BINARY);

and it throws this error:

Screenshot 2024-12-17 at 17.51.24

DeserializeEvalSumKey and DeserializeEvalAutomorphismKey works fine btw … i have no idea why it isnt working for the mult keys.

This is not easy to resolve without examining your code, but it looks like you are trying to deserialize the EvalMultKey more than once.
Try to use EvalMult before calling cc->DeserializeEvalMultKey(emkeys, SerType::BINARY);
Maybe you have the key already deserialized.