Homomorphic operations in in CUDA kernel

Hello Everyone,

OpenFHE is a very nice FHE implementation library and I really appreaciate the researchers who contribute to biuld this amazing FHE library.
My openfhe runs pretty fine on my system, but a problem occurs when I try to pass plaintext and ciphertext into the GPU so that GPU acceleration based on parallel computing can be enabled.
So here comes my question:
Can plaintext and ciphertext type variables be directly operated in the cuda kernel (i.e. global function), such as directly passing Plaintext and Ciphertext type variables to the cuda kernel, and calling EvalAdd() and EvalMult etc. to perform the homomorphic operation?
To be more specific, does such code can be compiled and run on GPU ? (I have read the openfhe’s paper and in section 3 it says that openfhe is designed to support GPU )

#include <cuda_runtime.h>
#include “openfhe.h”
using namespace lbcrypto;

global void computeCiphertext(CryptoContext cc, Ciphertext ciphertext_1, Plaintext plaintext_1) {

ciphertext_1 = cc-> EvalAdd(ciphertext_1, plaintext_1);

}

I really look forward to hearing from you and wish you all have a nice day!

Best regards

That code won’t work. The GPU backend is currently not available for OpenFHE. However, OpenFHE does incorporate a Hardware Abstraction Layer, enabling the integration of various hardware execution backends with OpenFHE through a standardized interface. Before utilizing these hardware backends, they must first be developed and integrated into OpenFHE.

1 Like