Closed aakankshaduggal closed 2 years ago
As a part of the KR, we looked for various tools available for performing Homomorphic Encryption. Here are a few of the tools that we explored:
Pyfhel provides a Python wrapper for the Microsoft Seal library, extendable to other C++ libraries, that goes beyond merely exposing the underlying API by adding a carefully designed abstraction layer that feels at home in Python. In additon to Pyfhel, their exists a plethora of Python wrappers for FHE libraries. Most rely on automatic C++ wrapping tools like pybind11 or Boost. - Here's our notebook for Pyfhel.
Python-paillier open-source implementation in python of the Paillier scheme. - Here's the jupyter notebook for the introductory implementation for paillier
PySyft is OpenMined's open source stack that provides secure and private Data Science in Python. Syft decouples private data from model training, using techniques like Federated Learning, Differential Privacy, and Encrypted Computation. This is done with a numpy-like interface and integration with Deep Learning frameworks, so that you as a Data Scientist can maintain your current workflow while using these new privacy-enhancing techniques.
Other approaches (e.g., pyFHE) implement schemes directly in Python, at the cost of significantly slower operations.
PySEAL is no-longer maintained pybind11-based wrapper. Many require the user to compile underlying libraries themselves, using the Unix-only toolchain, like more recent SEAL-Python. Here's our introductory implementation and experimentation with SEAL-python. Since this has implementation blockers like lack of documentation, and the need to be build only inside the repo for SEAL-python because of multiple dependencies, we won't be moving forward with this approach.
TenSEAL which appeared several years after the initial release of Pyfhel shows the most promise. It is pybind11 based and features a one-click setup, but focussed mostly on high level Machine Learning and Tensor operations. TenSEAL has been the most promising and most easy to understand tool available. So we explored various encryption schemes like BFV and CKKS using jupyter notebooks and performed benchmarking to see how long it takes to perform the basic operations for each of the encryption schemes.
Top 3 tools selected so far -