
Company News
Socket Named Top Sales Organization by RepVue
Socket won two 2026 Reppy Awards from RepVue, ranking in the top 5% of all sales orgs. AE Alexandra Lister shares what it's like to grow a sales career here.
phe
Advanced tools
+---------------------+ | |ciTest| | +---------------------+ | |rtdM| | +---------------------+ | |reqM| | +---------------------+
A Python 3 library implementing the Paillier Partially Homomorphic Encryption.
The homomorphic properties of the paillier crypto system are:
python-paillier is designed, developed and supported by CSIRO's Data61 <https://www.data61.csiro.au/>__. If
you use any part of this library in your research, please cite it using the following BibTex entry::
@misc{PythonPaillier,
author = {CSIRO's Data61},
title = {Python Paillier Library},
year = {2013},
publisher = {GitHub},
journal = {GitHub Repository},
howpublished = {\url{https://github.com/data61/python-paillier}},
}
::
python setup.py test
Or use nose::
nosetests
gmpy2 is not required to use the library, but is preferred. A pure Python implementation is available but
gmpy2 drastically improves performances. As indication on a laptop not dedicated to benchmarking, running the example
examples/federated_learning_with_encryption.py provided in the library took:
gmpy2 installedgmpy2 installedHowever, gmpy2 is a requirement to run the tests.
Developed at Data61 | CSIRO <http://data61.csiro.au>_.
Parts derived from the Apache licensed Google project: https://code.google.com/p/encrypted-bigquery-client/
.. |release| image:: https://img.shields.io/pypi/v/phe.svg :target: https://pypi.python.org/pypi/phe/ :alt: Latest released version on PyPi
.. |ciTest| image:: https://github.com/data61/python-paillier/actions/workflows/test.yml/badge.svg :target: https://github.com/data61/python-paillier/actions/workflows/test.yml :alt: CI Status
.. |reqM| image:: https://requires.io/github/data61/python-paillier/requirements.svg?branch=master :target: https://requires.io/github/data61/python-paillier/requirements/?branch=master :alt: Requirements Status of master
.. |rtdM| image:: https://readthedocs.org/projects/python-paillier/badge/?version=stable :target: http://python-paillier.readthedocs.org/en/latest/?badge=stable :alt: Documentation Status
FAQs
Partially Homomorphic Encryption library for Python
We found that phe demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 4 open source maintainers collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Company News
Socket won two 2026 Reppy Awards from RepVue, ranking in the top 5% of all sales orgs. AE Alexandra Lister shares what it's like to grow a sales career here.

Security News
NIST will stop enriching most CVEs under a new risk-based model, narrowing the NVD's scope as vulnerability submissions continue to surge.

Company News
/Security News
Socket is an initial recipient of OpenAI's Cybersecurity Grant Program, which commits $10M in API credits to defenders securing open source software.