This project has been archived by its maintainers, and is no longer receiving any updates.
FIPS-205 SLH-DSA bindings for botan3
The botan library
implements NIST's
FIP-205
SLH-DSA
signature and exposes botan3
python bindings.
This module wraps these bindings to help usage of SLH-DSA in python:
from slh_dsa_botan3 import slh_params
slh_dsa = slh_params.from_string('SLH-DSA-SHAKE-128s')
private_key = slh_dsa.generate_keypair()
public_key = private_key.get_public_key()
message = "hello world"
signature = private_key.sign(message)
assert public_key.verify(message, signature)
See documentation for more examples.
Quick setup
You need a working botan3 installation:
% botan --version
3.7.1
You may need to install python3-botan depending on your distribution:
% python -c 'import botan3; print(botan3.version_string())'
Botan 3.7.1 (release, dated 20250205, revision git:09cc7f97ceb828c19461b2a63f820d3226bb921b, distribution unspecified)
It is recommended to work in a virtual environment as follows:
% python3 -m venv --system-site-packages botan3 venv
% source venv/bin/activate
You can then install slh_dsa_botan3 using the following:
% pip install slh_dsa_botan3
Note that this is experimental and may include mistakes, use with care!
Tests & Validation
This module has optional dependencies required for testing and development:
% pip install -r requirements-dev.txt
You can use the following recipe to run all tests:
make tests
This will in sequence:
- run
./tests/sync-ACVP-Server.shto populate./tests/ACVP-Serverwith ACVP test vectors - run
./tests/liboqs/liboqs-python.shto build and install liboqs in./venv/share/liboqs - run all tests, including:
- basic unit tests
- few fixed test vectors
- all external ACVP test vectors (without prehash)
- basic interoperability with
liboqsSphincs3.1+ implementation
Note that this module offer no support for SLH-DSA pre-hashing nor context binding.
Metadata
Release files for slh-dsa-botan3 0.1.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| slh_dsa_botan3-0.1.3.tar.gz | 50.1 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| slh_dsa_botan3-0.1.3-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 84.6 kB
Release files / slh_dsa_botan3-0.1.3.tar.gz
| Download URL | slh_dsa_botan3-0.1.3.tar.gz |
|---|---|
| Size | 50.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
b8c9a63f057d2d73bedaf2ebb675729d7f6a4d93a2666fe7a8b7cb32973266c1
|
|
BLAKE2b-256 checksum How to use checksums |
bca7454c864f8d36e10d1ba2cb6612c5011f586fbecf9222091bd9eb677e05f9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.2
|
Release files / slh_dsa_botan3-0.1.3-py3-none-any.whl
| Download URL | slh_dsa_botan3-0.1.3-py3-none-any.whl |
|---|---|
| Size | 34.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
8e3c47f249257183935fd20636c16ef64cbb846c4fde3c80e0e767c47eb5dc39
|
|
BLAKE2b-256 checksum How to use checksums |
d5800497215dc2176ccbce0aa28600cb8003793a9610dcc6865352937efb5155
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.2
|