Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/data61/python-paillier
A library for Partially Homomorphic Encryption in Python
https://github.com/data61/python-paillier
cryptography homomorphic-encryption paillier python
Last synced: about 1 month ago
JSON representation
A library for Partially Homomorphic Encryption in Python
- Host: GitHub
- URL: https://github.com/data61/python-paillier
- Owner: data61
- License: other
- Created: 2014-11-05T07:15:28.000Z (about 10 years ago)
- Default Branch: master
- Last Pushed: 2023-08-04T08:19:39.000Z (over 1 year ago)
- Last Synced: 2024-11-08T02:41:08.268Z (about 1 month ago)
- Topics: cryptography, homomorphic-encryption, paillier, python
- Language: Python
- Size: 292 KB
- Stars: 602
- Watchers: 33
- Forks: 134
- Open Issues: 20
-
Metadata Files:
- Readme: README.rst
- Changelog: CHANGELOG.rst
- License: LICENSE.txt
Awesome Lists containing this project
- awesome-fhe - python-paillier - Partially HE based on Paillier scheme. (Libraries / [Sunscreen](https://sunscreen.tech/))
- awesome-he - python-paillier - Partially HE based on Paillier scheme. (Libraries)
README
python-paillier |release|
==========================+---------------------+
| |ciTest| |
+---------------------+
| |rtdM| |
+---------------------+
| |reqM| |
+---------------------+A Python 3 library implementing the Paillier Partially Homomorphic Encryption.
The homomorphic properties of the paillier crypto system are:
- Encrypted numbers can be multiplied by a non encrypted scalar.
- Encrypted numbers can be added together.
- Encrypted numbers can be added to non encrypted scalars.Citing
======`python-paillier` is designed, developed and supported by `CSIRO's Data61 `__. 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}},
}Running unit tests
------------------::
python setup.py test
Or use nose::
nosetests
Note related to gmpy2
---------------------`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:
- 4.5s with `gmpy2` installed
- 35.7s without `gmpy2` installedHowever, `gmpy2` is a requirement to run the tests.
Code History
------------Developed at `Data61 | CSIRO `_.
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