KeySwitch key serialization

I want to send keyswitch key to any party, i try to use serialization but i have a mistake :

Exception: /usr/local/include/openfhe/pke/cryptoobject.h:116 serialized object version 1073741824 is from a later version of the library

my serialization code (I can’t find any specific serialization code for keyswitching key):

Serial::Serialize(ek, os, SerType::BINARY);
Serial::Deserialize(ek, is, SerType::BINARY);

How can i solve it?

Could you provide more information, including the code example(s) to recreate the issue and the environment you are using? Are you using a different machine for deserialization? If yes, are the same versions of OpenFHE installed on both machines?

If you run Deserialize on the same machine, I suggest running all unit tests (there are some that test serialization for evaluation keys). Do all tests pass?

I am using Linux system on WSL.
I want to implement multi party system so ı have to perform distributed protocol and my system required partialy evaluation key. to generate multiSwitchKeyGen function i need the key of the previous party, but i cant send it. I am trying on the same machine (at localhost).

I use following specific serialization function for evalmultkey and automorphismkey and they are working true. Also ı am using Reencryption key and i can send with Serialize,Deserialize functions. Since i dont see any specific function for sending keyswitching key, i tried Serialize,Deserialize` functions, but it is not working, i have above mistake.


thank you for your suggestion, i will run.

I suggest reading this thread: What's the best way to use openFHE on two sides?. It should contain answers to your questions.