CKKS-Threshold, Setting up a client and a server

Hello, I’m trying to setup a server and clients with socket programming using select. I want to encrypt the plaintext in the clients, perform a sum in the server and return the result to the clients and decrypt it.

I understand that I have to KeyGen in the server, then pass the public key to the clients, use MultipartyKeyGen to generate a key pair for the client and then perform encryption and send back the encrypted data with the public key of the client, is that right?

I’m trying to find a way to pass the server’s public key to the client but so far I’ve seen suggestions such as serialization however I’m not sure if this the correct way to proceed.

I don’t know enough to answer your first question, but with regards to

I’m trying to find a way to pass the server’s public key to the client but so far I’ve seen suggestions such as serialization however I’m not sure if this the correct way to proceed.

Yes, serialization is the right way to pass around the keys. See the various examples here: PALISADE-serial-examples. See this relevant thread too: What's the best way to use openFHE on two sides?

1 Like

A newer version of PALISADE / PALISADE serial examples · GitLab is going to be released shortly that uses grpc. the earlier version that @iquah refers to does use a simple socket approach.