TenSEAL is a library for doing homomorphic encryption operations on tensors, built on top of Microsoft SEAL. It provides ease of use through a Python API, while preserving efficiency by implementing most of its operations using C .
- Encryption/Decryption of vectors of integers using BFV
- Encryption/Decryption of vectors of real numbers using CKKS
- Element-wise addition, substraction and multiplication of encrypted-encrypted vectors and encrypted-plain vectors
- Complete SEAL API under
tenseal.sealapi
$ pip install tenseal
This installs the last packaged version on pypi. If your platform doesn't have a ready package, please open an issue to let us know.
Supported platforms and their requirements are listed below: (this are only required for building TenSEAL from source)
- Linux: A modern version of GNU G (>= 6.0) or Clang (>= 5.0).
- macOS: Xcode toolchain (>= 9.3)
- Windows: Not supported yet, please use our Docker image.
If you want to install tenseal from the repository, you should first make sure to have the requirements for your platform (listed above) and CMake (3.12 or higher) installed, then get the third party libraries (if you didn't already) by running the following command from the root directory of the project
$ git submodule init
$ git submodule update
You can then trigger the build and the installation
$ pip install .
You can use our Docker image for a ready to use environment with TenSEAL installed
$ docker container run --interactive --tty openmined/tenseal
You can also build your custom image, this might be handy for developers working on the project
$ docker image build --tag tenseal .