Sheldon-Anderson / TenSEAL

A library for doing homomorphic encryption operations on tensors

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

TenSEAL

Tests Linux Package MacOS Package Windows Package Docker Image

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++.

Features

  • 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

Installation

Using pip

$ 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.

Build from Source

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: Microsoft Visual Studio (>= 10.0.40219.1, Visual Studio 2010 SP1 or later).

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

If you are on Windows, you will first need to build SEAL library using Visual Studio, you should use the solution file SEAL.sln in third_party/SEAL to build the project native\src\SEAL.vcxproj with Configuration=Release and Platform=x64. For more details check the instructions in Building Microsoft SEAL

You can then trigger the build and the installation

$ pip install .

Use Docker

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 .

Tutorials

License

Apache License 2.0

About

A library for doing homomorphic encryption operations on tensors

License:Apache License 2.0


Languages

Language:C++ 50.1%Language:Python 44.0%Language:Jupyter Notebook 5.0%Language:CMake 0.6%Language:C 0.2%Language:Dockerfile 0.1%