Thanks to visit codestin.com
Credit goes to github.com

Skip to content

raghavst/FIDESlib

 
 

Repository files navigation

FIDESlib

A server-side CKKS GPU library fully interoperable with OpenFHE.

Features

  • Full CKKS implementation: Add, AddPt, AddScalar, Mult, MultPt, MultScalar, Square, Rotate, RotateHoisted, Bootstrap.
  • OpenFHE interoperability for FIXEDMANUAL, FIXEDAUTO, FLEXIBLEAUTO and FLEXIBLEAUTOEXT.
  • Hardware acceleration with Nvidia CUDA.
  • High-performance NTT/INTT implementation.
  • Hybrid Key-Switching.

Citation

If you use FIDESlib on your research, please cite our ISPASS paper.

@inproceedings{FIDESlib,
	title        = {{FIDESlib: A Fully-Fledged Open-Source FHE Library for Efficient CKKS on GPUs}},
	author       = {Carlos Agulló-Domingo and Óscar Vera-López and Seyda Guzelhan and Lohit Daksha and Aymane El Jerari and Kaustubh Shivdikar and Rashmi Agrawal and David Kaeli and Ajay Joshi and José L. Abellán},
	year         = 2025,
	booktitle    = {2025 IEEE International Symposium on Performance Analysis of Systems and Software (ISPASS)},
	publisher    = {IEEE},
	address      = {Ghent, Belgium},
	doi          = {https://doi.org/10.1109/ISPASS64960.2025.00045},
	url          = {https://github.com/CAPS-UMU/FIDESlib},
	note         = {Poster paper}
}

Compilation

Important

Requirements:

  • Nvidia CUDA version 12 or greater.
  • GNU GCC Compiler version 10 or greater.
  • CMake version 3.25.2 or greater.
  • (Optional) Intel Thread Building Blocks for faster context creation.

Note

Some dependencies will be automatically downloaded if needed:

  • GoogleTest: used by our test suite.
  • GoogleBenchmark: used by our benchmark suite.

In order to be able to compile the project, one must follow these steps:

  • Clone this repository.
  • Generate the makefiles with CMake.
cmake -B $PATH_TO_BUILD_DIR -S $PATH_TO_THIS_REPO --fresh 
-DCMAKE_BUILD_TYPE="Release" -DFIDESLIB_INSTALL_OPENFHE=ON
  • Build the project.
cmake --build $PATH_TO_BUILD_DIR -j

FIDESlib needs a patched version of OpenFHE in order to be able to access some internals needed for interoperability. This patched version can be automatically installed by defining FIDESLIB_INSTALL_OPENFHE=ON CMake variable. By default this variable is set OFF.

Warning

Currently custom installation paths for patched OpenFHE are not supported. OpenFHE will be installed on the default path specified in their build files and you will probably need to run the build files generation command with administrator privileges.

The build process produces the following artifacts:

  • fideslib.a: The FIDESlib library to be statically linked to any client application.
  • fideslib-test: The test suite executable.
  • fideslib-bench: The benchmark suite executable.
  • gpu-test: A dummy executable to search for the CUDA capable devices on the machine.
  • dummy: Another dummy executable.

Warning

Compiling FIDESlib sometimes produces TLS-related errors. This issue can be addressed by re-compiling OpenFHE in debug mode. In this case, you should:

  • Manually clone OpenFHE and, with git, apply openfhe-hook.patch and openfhe-base.patch.
  • Generate the build files with CMake using Debug as build type.
  • Compile and install OpenFHE on the machine.

Installation

Installing the library is as easy as running the following command:

cmake --build $PATH_TO_BUILD_DIR --target install -j

FIDESlib is currently ready to be consumed as a CMake library. The template project on the examples directory shows how to build and run a FIDESlib client application and contains examples of usage of most of the functionality provided by FIDESlib. Currently client applications consuming FIDESlib should use the CUDA compiler every time they include a FIDESlib header.

Note

As the default installation prefix is /usr/local. All installed headers should be located under /usr/local/include/FIDESlib, the CMake package files under /usr/local/share/FIDESlib and the compiled library under /usr/local/lib.

Warning

FIDESlib currently does not support custom installation paths. One should run the installation command with administrator priviledges.

Usage

Check examples for projects that use FIDESlib.

Credits

Thanks to all main contributors:

  • Carlos Agulló Domingo.
  • Óscar Vera López.
  • Seyda Guzelhan.
  • Lohit Daksha.
  • Aymane El Jerari.

Grants

This project was possible thanks to the following grants:

  • Grant CNS2023-144241 funded by "MICIU/AEI/10.13039/501100011033" and the "European Union NextGenerationEU/PRTR".
  • Grants NSF CNS 2312275 and 2312276, and supported in part from the NSF IUCRC Center for Hardware and Embedded Systems Security and Trust (CHEST).

Inquiries and comments

If you have any question, comment, or suggestion, please contact:

Or feel free to open an issue or a general discussion on this repository.

About

A server-side CKKS GPU library fully interoperable with OpenFHE.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Cuda 68.2%
  • C 16.6%
  • C++ 12.7%
  • CMake 1.4%
  • CSS 1.1%