The homomorphic encryption library implemented on GPU. Troy includes BFV, BGV, and CKKS schemes. Its implementation referred to the Microsoft SEAL library.
For reference, this library inherently includes a CPU version of the schemes, but you can just use the GPU part by using namespace troyn
.
The interfaces (classes, methods, etc.) are basicly the same as in SEAL, but you need to initialize the CUDA kernels (troyn::KernelProvider::initialize()
) before using any of the GPU related classes. You can just call this at the beginning of your programs.
See test/timetest.cu
for example.
src
includes the implementation of the library. Just include troy_cuda.cuh
and you are ready to go.test
includes the tests.extern
includes third-party libraries: googletest and pybind11.binder
includes the pybind11 code to encapsulate the C/C++/CUDA interfaces for python.app
includes a high-level implementation for computing matrix multiplication and 2d-convolution in HE.mkdir build
cd build
cmake .. -DTROY_TEST=ON # or OFF(default), if you don't want to run tests
make
cd ..
cd build
ctest
./test/timetest
cd ..
bash makepackage.sh
sudo
privilige to install the binary library file.
bash install_seal.sh
TROY_COMPARE_SEAL
and TROY_TEST
on.
cd build
cmake .. -DTROY_TEST=ON -DTROY_COMPARE_SEAL=ON
make
cd ..
cd build
./test/timetest
./test/timetest_seal
Feel free to fork / pull request. Please cite this repository if you use it in your work.
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。