Skip to main content

Minimal pure-Python implementation of Paillier's additively homomorphic cryptosystem.

Project description

Minimal pure-Python implementation of Paillier’s additively homomorphic cryptosystem.

PyPI version and link. Read the Docs documentation status. GitHub Actions status. Coveralls test coverage summary.

Installation and Usage

This library is available as a package on PyPI:

python -m pip install pailliers

The library can be imported in the usual way:

from pailliers import *

Development

All installation and development dependencies are fully specified in pyproject.toml. The project.optional-dependencies object is used to specify optional requirements for various development tasks. This makes it possible to specify additional options (such as docs, lint, and so on) when performing installation using pip:

python -m pip install ".[docs,lint]"

Documentation

The documentation can be generated automatically from the source files using Sphinx:

python -m pip install ".[docs]"
cd docs
sphinx-apidoc -f -E --templatedir=_templates -o _source .. && make html

Testing and Conventions

All unit tests are executed and their coverage is measured when using pytest (see the pyproject.toml file for configuration details):

python -m pip install ".[test]"
python -m pytest

Alternatively, all unit tests are included in the module itself and can be executed using doctest:

python src/pailliers/pailliers.py -v

Style conventions are enforced using Pylint:

python -m pip install ".[lint]"
python -m pylint src/pailliers

Contributions

In order to contribute to the source code, open an issue or submit a pull request on the GitHub page for this library.

Versioning

The version number format for this library and the changes to the library associated with version number increments conform with Semantic Versioning 2.0.0.

Publishing

This library can be published as a package on PyPI via the GitHub Actions workflow found in .github/workflows/build-publish-sign-release.yml that follows the recommendations found in the Python Packaging User Guide.

Ensure that the correct version number appears in pyproject.toml, and that any links in this README document to the Read the Docs documentation of this package (or its dependencies) have appropriate version numbers. Also ensure that the Read the Docs project for this library has an automation rule that activates and sets as the default all tagged versions.

To publish the package, create and push a tag for the version being published (replacing ?.?.? with the version number):

git tag ?.?.?
git push origin ?.?.?

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pailliers-0.1.0.tar.gz (6.5 kB view details)

Uploaded Source

Built Distribution

pailliers-0.1.0-py3-none-any.whl (6.3 kB view details)

Uploaded Python 3

File details

Details for the file pailliers-0.1.0.tar.gz.

File metadata

  • Download URL: pailliers-0.1.0.tar.gz
  • Upload date:
  • Size: 6.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/5.1.1 CPython/3.12.7

File hashes

Hashes for pailliers-0.1.0.tar.gz
Algorithm Hash digest
SHA256 a806cf06e176638041e555365aa7fbe3e1eee638c040f2f207a0b10c2e34c914
MD5 f695fda92c8744436ff4081042f8ca3f
BLAKE2b-256 f51ec92dbf96f713e77a2e198b77189624d818333dd550f71e5764108411eaea

See more details on using hashes here.

Provenance

The following attestation bundles were made for pailliers-0.1.0.tar.gz:

Publisher: build-publish-sign-release.yml on lapets/pailliers

Attestations:

File details

Details for the file pailliers-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: pailliers-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 6.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/5.1.1 CPython/3.12.7

File hashes

Hashes for pailliers-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 eb43c8854217f27cd684c05ceb88e5bff31b78d1364df236342833b2cd36ed07
MD5 fb9a0cb9ca169d6dab54f67128fb36bf
BLAKE2b-256 5ce58d529984abc0513230c249aeb95c67206d2d8bec87da9a9fda28adf49451

See more details on using hashes here.

Provenance

The following attestation bundles were made for pailliers-0.1.0-py3-none-any.whl:

Publisher: build-publish-sign-release.yml on lapets/pailliers

Attestations:

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page