flower icon indicating copy to clipboard operation
flower copied to clipboard

Support for Homomorphic Encryption

Open kinshukdua opened this issue 2 years ago • 4 comments

Homomorphic Encryption is one of the most popular way to guarantee privacy-preservation when using FL. I looked through the examples, the documentation and this repo but I could not find any mention of Flower being used along side with homomorphic encryption. Does Flower support homomorphic encryption?

kinshukdua avatar Nov 24 '21 08:11 kinshukdua

Is this proposal somehow related to https://github.com/tf-encrypted/tf-encrypted project? It that is the case we could clone our examples/quickstart_tensorflow into examples/quickstart_tensorflow_encrypted to use the syntax shown in the https://github.com/tf-encrypted/tf-encrypted/tree/master/examples/mnist example project.

sisco0 avatar Dec 20 '21 01:12 sisco0

Hi @kinshukdua Homomorphic encryption is a general cryptography technique, and there are multiple ways of how it can be used for federated learning.

In the MNIST example provided by @sisco0, the homomorphic encryption is performed by three compute servers, and there is a distinction between model owners and prediction clients.

Alternatively, in https://developer.nvidia.com/blog/federated-learning-with-homomorphic-encryption/, the homomorphic encryption described is performed by a single server, and there is no distinction between all clients.

It would be ideal if you could provide us with more context of how you would want to use Homomorphic encryption for your experiments. Is there any particular protocol you would want to deploy?

Also in general, homomorphic encryption is computationally expensive. Perhaps there are other alternative cryptographic primitives that could achieve the security goals you are aiming for with a lower computation cost?

hei411 avatar Jan 20 '22 21:01 hei411

Is the Semi-Homomorphic Encryption already support in Flower?

raywang1021 avatar Mar 26 '24 05:03 raywang1021

TL;DR: Yes, Flower supports arbitrary Homomorphic Encryption and Semi Homomorphic Encryption protocols.

Long answer: Flower Next introduces a new low-level messaging API that can be used to implement arbitrary (S)HE protocols. In addition to this, two new abstractions (Workflows on the server-side and Mods on the client-side) allow building those protocols in a modular ways. This enables users to (a) use built-in methods and (b) implement/customize their own approaches.

We introduced those capabilities at Flower AI Summit 2024 in London (https://flower.ai/conf/flower-ai-summit-2024/, video recordings available on YouTube) and will add documentation over the coming weeks.

danieljanes avatar Mar 27 '24 21:03 danieljanes