Minimal pure-Python implementation of Paillier's additively homomorphic cryptosystem.
Project description
Minimal pure-Python implementation of Paillier’s additively homomorphic cryptosystem.
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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
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
Algorithm | Hash digest | |
---|---|---|
SHA256 | a806cf06e176638041e555365aa7fbe3e1eee638c040f2f207a0b10c2e34c914 |
|
MD5 | f695fda92c8744436ff4081042f8ca3f |
|
BLAKE2b-256 | f51ec92dbf96f713e77a2e198b77189624d818333dd550f71e5764108411eaea |
Provenance
The following attestation bundles were made for pailliers-0.1.0.tar.gz
:
Publisher:
build-publish-sign-release.yml
on lapets/pailliers
-
Statement type:
https://in-toto.io/Statement/v1
- Predicate type:
https://docs.pypi.org/attestations/publish/v1
- Subject name:
pailliers-0.1.0.tar.gz
- Subject digest:
a806cf06e176638041e555365aa7fbe3e1eee638c040f2f207a0b10c2e34c914
- Sigstore transparency entry: 152638963
- Sigstore integration time:
- Predicate type:
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
Algorithm | Hash digest | |
---|---|---|
SHA256 | eb43c8854217f27cd684c05ceb88e5bff31b78d1364df236342833b2cd36ed07 |
|
MD5 | fb9a0cb9ca169d6dab54f67128fb36bf |
|
BLAKE2b-256 | 5ce58d529984abc0513230c249aeb95c67206d2d8bec87da9a9fda28adf49451 |
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
-
Statement type:
https://in-toto.io/Statement/v1
- Predicate type:
https://docs.pypi.org/attestations/publish/v1
- Subject name:
pailliers-0.1.0-py3-none-any.whl
- Subject digest:
eb43c8854217f27cd684c05ceb88e5bff31b78d1364df236342833b2cd36ed07
- Sigstore transparency entry: 152638964
- Sigstore integration time:
- Predicate type: