This repository is actively maintained.
Activity is low at times because this project is already feature-complete, documented and tested.
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 .[test,lint]
$ mypy x3dh/ tests/
$ pylint x3dh/ tests/
$ flake8 x3dh/ tests/
$ pytest
Documentation
View the documentation on readthedocs.io or build it locally. Additional requirements to build the docs can be installed using pip install .[docs]. With all dependencies installed, run make html in the docs/ directory. You can find the generated documentation in docs/_build/html/.
Release files for X3DH 1.3.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| x3dh-1.3.0.tar.gz | 21.0 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| x3dh-1.3.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 40.8 kB
Release files / x3dh-1.3.0.tar.gz
| Download URL | x3dh-1.3.0.tar.gz |
|---|---|
| Size | 21.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
3bb822024b80d1388fa05764a5fdcbb4e804b15f04c7b398cee9114af9013236
|
|
BLAKE2b-256 checksum How to use checksums |
793307464282c2664cb43e1f1e3d928a47ad91d195066a78a1bcc4d2db28e50a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jan 29, 2026.
Transparency logRelease files / x3dh-1.3.0-py3-none-any.whl
| Download URL | x3dh-1.3.0-py3-none-any.whl |
|---|---|
| Size | 19.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
92548974e0cd9eccf19315f59014e5796ee4c5440b6fe753a9168fb92dd6c914
|
|
BLAKE2b-256 checksum How to use checksums |
bbf5c18d9e408a3cf4eb4c7c568b1ef0507cf3a5938325aed8c1684084a3313a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jan 29, 2026.
Transparency log