A Python implementation of the Extended Triple Diffie-Hellman key agreement protocol.
Project description
python-x3dh
A Python implementation of the Extended Triple Diffie-Hellman key agreement protocol.
Installation
Install the latest release using pip (pip install X3DH
) or manually from source by running pip install .
in the cloned repository.
Differences to the Specification
In the X3DH specification, the identity key is a Curve25519/Curve448 key and XEdDSA is used to create signatures with it. This library does not support Curve448, however, it supports Ed25519 in addition to Curve25519. You can choose whether the public part of the identity key in the bundle is transferred as Curve25519 or Ed25519. Refer to the documentation for details.
Testing, Type Checks and Linting
python-x3dh uses pytest as its testing framework, mypy for static type checks and both pylint and Flake8 for linting. All tests/checks can be run locally with the following commands:
$ pip install --upgrade pytest pytest-asyncio pytest-cov mypy pylint flake8 setuptools
$ mypy --strict x3dh/ setup.py tests/
$ pylint x3dh/ setup.py tests/
$ flake8 x3dh/ setup.py tests/
$ pytest --cov=x3dh --cov-report term-missing:skip-covered
Documentation
View the documentation on readthedocs.io or build it locally, which requires the Python packages listed in docs/requirements.txt
. With all dependencies installed, run make html
in the docs/
directory. You can find the generated documentation in docs/_build/html/
.
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 X3DH-1.1.0.tar.gz
.
File metadata
- Download URL: X3DH-1.1.0.tar.gz
- Upload date:
- Size: 15.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7a3f70ad5ee070ed32418fe6b7becfbfc3423b6fdf981d2cb7500fd59a500d3c |
|
MD5 | 9adaf13338f846103284e3011245eccd |
|
BLAKE2b-256 | 6f832448e8e6588e22efe937baf643ff04202853bb87cdc0e877f36c8fa93cf9 |
File details
Details for the file X3DH-1.1.0-py3-none-any.whl
.
File metadata
- Download URL: X3DH-1.1.0-py3-none-any.whl
- Upload date:
- Size: 20.7 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 | 9b108f90022356a7e86eaf251b6de53d449101cf2a48b0c225577fc6354dadbd |
|
MD5 | 7f8f5713e25abafc80a0ff7939da81d1 |
|
BLAKE2b-256 | 28a06609c8806845fd0cbe72d249fe879a490deb736a925882bf5c4bc3fc924e |