Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

Pyfhel [v2]

  • Description: PYthon For Homomorphic Encryption Libraries . Allows ADDITION, SUBSTRACTION, MULTIPLICATION, SCALAR PRODUCT and binary operations (AND, OR, NOT, XOR) over encrypted vectors|scalars of integers|binaries. This library acts as a common Python API for the most advanced C++ HE libraries.

  • Language: Python (3.4+) & Cython on top of C++17. (NOTE: Python must have been compiled with C++17: g++>=6 | clang++>=5.0, Visual Studio 2017).

  • Dependencies: There are three possible backends, all of them HE libraries in C++:

    1. SEAL (no external dependencies). This version is currently only supporting SEAL.
    2. HElib (depends on GMP & NTL)
    3. PALISADE (no external dependencies)
  • License: GNU GPL v3

Summary

PYthon For Hmomorphic Encryption Libraries, Pyfhel implements some basic functionalities of HElib as a Homomorphic Encryption library such as sum, mult, or scalar product in Python. Pyfhel uses a syntax similar to normal arithmetics (+,-,*). This library is useful both for simple Homomorphic Encryption Demos as well as for complex problems such as Machine Learning algorithms.

Pyfhel is built on top of Afhel, an Abstraction Hmomorphic Encryption Libraries in C++. Afhel serves as common API for all three backends. Additionally, this project contains a large series of Demos & Tests for HElib|SEAL, Afhel & Pyfhel.

Last but not least, we include Makefiles to compile and install HElib, SEAL and Afhel as shared libraries in Ubuntu, which can then be linked to other C++ programs using the tags -lhelib, -lseal and -lafhel.

Install & Unistall

This project has been uploaded to PyPI. In order to install it from source (WARNING! it takes several minutes to compile, be patient!), run:

   > pip install Pyfhel

Locally, you can clone this repository and install it by running:

   > pip install .

To uninstall, just run:

   > pip uninstall Pyfhel

Alternatively, and only for Ubuntu OS, after cloning you can install and compile all libraries as shared (.so) using the Makefiles on this project. To do so, run inside the Pyfhel directory:

   > ./configure		# Just puts all makefiles in their correct directories
   > make
   > sudo make install

You can also install just SEAL and Afhel. Just run make SEAL|Afhel in the Pyfhel directory and make install inside Pyfhel/Afhel or Pyfhel/SEAL directory respectively. Makefiles also have clean and uninstall commands, as well as make sourceFileName_x command to compile and link a source file with them.

Project contents

  • Pyfhel/ contains the source code for Pyfhel, Afhel, SEAL, PALISADE & HElib.

  • docs/ outdated documentation of the project:

    • Doc.md: Outdated Essential documentation of the project.
    • Doc_API.md: Outdated comprehensive list of all classes & methods available in Pyfhel.
    • Helib/: Up to date docs and images explaining this otherwise undocumented library.
  • Pyfhel/Demos_Tests, a collection of Demos and Tests.

  • Pyfhel/.Makefiles/Makefile_HElib, a makefile to compile and install HElib as a dynamic library (-lhelib).

  • Pyfhel/.Makefiles/Makefile_SEAL, a makefile to compile and install SEAL as a dynamic library (-lseal).

Authors & Acknowledgements

  • Authors: Alberto Ibarrondo @ibarrond with Laurent Gomez (SAP) in collaboration with EURECOM (Melek Onen).
  • Latest release: 03/08/2018

This library was created originally for the project "Privacy for Big Data Analytics" in EURECOM. The SW is based on HElib by Shai Halevi, with touches from HEIDE by Grant Frame, and performance improvements thanks to analysis of addition by Matheus S.H. Cruz. In compliance with their respective Licenses, I name all of them in this section. This project could not be possible without them. For any legal disclaimer, please contact the owner of this repository. Also, the same type of license (GNU GPLv3) applies to Afhel & Pyfhel, as mandated.

Pyfhel can be used, modified, copied in any way you see fit. This project is Open Source under the GNU GPLv3 License (LICENSE file), therefore developers that use Pyfhel MUST comply with the following:

  1. Acknowledge and mention the original authors of Pyfhel in any derived development, that is, Ibarrondo, Laurent (SAP) and Onen (EURECOM).

  2. Offer the exact same License, allowing legal permission to copy, distribute and/or modify any SW using Pyfhel. Hence, any software using Pyfhel must remain Open Source.

Metadata

Release files for Pyfhel 2.0.0a2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for Pyfhel 2.0.0a2
File Size Uploaded Provenance Actions
Pyfhel-2.0.0a2.tar.gz 666.8 kB Without provenance Details for Pyfhel-2.0.0a2.tar.gz

Release files / Pyfhel-2.0.0a2.tar.gz

Download URL Pyfhel-2.0.0a2.tar.gz
Size 666.8 kB
Tags Source
SHA-256 checksum
How to use checksums
59687537e10420fe95842c84bcb7678f35f0ec337124b5a58f6f3b8b3ecf1cff
BLAKE2b-256 checksum
How to use checksums
37b40239377834ca5915505a14fa80e96028667963523277e03fb6c2d25d0366
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.11.0 pkginfo/1.4.2 requests/2.19.1 setuptools/40.0.0 requests-toolbelt/0.8.0 tqdm/4.24.0 CPython/3.6.6

Security for Pyfhel 2.0.0a2

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release
Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page