google / fully-homomorphic-encryption

An FHE compiler for C++
Apache License 2.0
3.52k stars 256 forks source link

Some questions about GPU acceletarion #81

Closed summer-xrx closed 2 months ago

summer-xrx commented 2 months ago

Hello, I am very curious about GPU acceletarion. I have noticed that GPU acceleration has not yet been implemented in many mainstream fully homomorphic encryption libraries. Now, I have the following questions:

  1. Why can't GPU acceleration be implemented in those mainstream libraries now?
  2. What are the technical challenges of using GPU to accelerate homomorphic encryption?
  3. Compared to other mainstream FHE libraries, what are the advantages of your library? Looking forward to your reply, thank you!
enum-class commented 2 months ago

Hi @summer-xrx

I think one problem would be Data Dependency for example modular exponentiation and polynomial multiplication, DFT, etc. so it limits the parallelization which is what GPUs are good at.

About the third question,

I saw you asking the same question in other libraries. https://github.com/OpenMined/TenSEAL/issues/489 https://github.com/microsoft/SEAL/issues/702

I recommend asking this question in openfhe as well. I think that is more active.

summer-xrx commented 2 months ago

OK, thank you for your reply!

enum-class commented 2 months ago

@summer-xrx Also you can take a look at this https://github.com/zama-ai/tfhe-rs

and this GPU acceleration docs from zama https://docs.zama.ai/tfhe-rs/guides/run_on_gpu