Skip to main content

Beware!

This package was created using the assistance of AI-enabled tooling, it has been reviewed by a human, but has not yet been audited.

slh_dsa_multi

Multi-backend FIPS-205 SLH-DSA bindings.

PyPI Python License: GPL-3.0-only

While waiting for SLH-DSA in pyca/cryptography this exposes a range of SLH-DSA implementations.

The default vendored backend is slhdsa-c can be rebuild via pip install.

This an unaudited and experimental library.

Backends

Backend Source Selected as Pinned
slhdsa-c compiled at install "slhdsa-c" 174c02e4
nettle compiled at install "nettle" 66c7ef01
OpenSSL system OpenSSL3.5 or later "openssl" n/a
botan3 system botan3 bindings "botan3" n/a
liboqs system oqs (liboqs-python) "liboqs" n/a

Use the backend= API argument to select a non-default backend explicitly.

Quickstart

from slh_dsa_multi import SLHDSAPrivateKey

sk = SLHDSAPrivateKey.generate("SLH-DSA-SHAKE-128s")
pk = sk.public_key()

sig = sk.sign(b"hello world")
pk.verify(sig, b"hello world")

raw = sk.private_bytes_raw()
sk2 = SLHDSAPrivateKey.from_private_bytes(raw, "SLH-DSA-SHAKE-128s")

Domain separation using context=b"...". No pre-hash variants are supported.

Signing is pure and randomized (hedged) by default.

Deterministic signing deterministic=True should use a seed addrnd=os.urandom(16) stored next to the private key.

Security notes

Key material is held in Python bytes.

They are only wiped from memory when the interpreter exits.

Benchmarks

See how these bindings perform:

comparison

This comparison is unfair due to the way these backends have been packaged.

If you don't know which one to pick, use the default or openssl as usual.

License

See LICENSE

Vendored backends:

  • slhdsa-c (ISC or MIT or Apache-2.0)
  • nettle (LGPLv3+/GPLv2+)

These bindings targets GPL-3.0-only and can be reused.

Metadata

Release files for slh-dsa-multi 0.3.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for slh-dsa-multi 0.3.0
File Size Uploaded
slh_dsa_multi-0.3.0.tar.gz 126.9 kB Details

Built distributions (wheels)

Table of built distributions (wheels) for slh-dsa-multi 0.3.0
File Interpreter ABI Platform
slh_dsa_multi-0.3.0-cp312-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.whl CPython 3.12 abi3 Linux glibc 2.17+ x86-64 Details
slh_dsa_multi-0.3.0-cp312-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.whl CPython 3.12 abi3 Linux glibc 2.17+ ARM64 Details

Total release size: 884.4 kB

Release files / slh_dsa_multi-0.3.0.tar.gz

Download URL slh_dsa_multi-0.3.0.tar.gz
Size 126.9 kB
Tags Source
SHA-256 checksum
How to use checksums
f2257ae89e91f689359c1dff50214982ce70674d07f153017af8638d7424b399
BLAKE2b-256 checksum
How to use checksums
b4c5e54968859715a0c90e155d42bb3913ef9c4619dc9fa73d53a155e62438c7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.6

Release files / slh_dsa_multi-0.3.0-cp312-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.whl

Download URL slh_dsa_multi-0.3.0-cp312-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
Size 383.7 kB
Tags CPython 3.12 Linux glibc 2.17+ x86-64 abi3
SHA-256 checksum
How to use checksums
4c2d77fca1ae01ef1e5f9b29614dba93dab45cfde3311c63510084e25fe3a0da
BLAKE2b-256 checksum
How to use checksums
8888e134f2689db590020034ff6cce1e7a566c5f7e1d81acd308258af68e8b1c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.6

Release files / slh_dsa_multi-0.3.0-cp312-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.whl

Download URL slh_dsa_multi-0.3.0-cp312-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.whl
Size 373.8 kB
Tags CPython 3.12 Linux glibc 2.17+ ARM64 abi3
SHA-256 checksum
How to use checksums
cd736cf815c806d39cf6d47fe50a91907070f92fd844311e2468cfc447c3e033
BLAKE2b-256 checksum
How to use checksums
51c86f61cda53297f0d0e98a95f4b53281dddcaa4918c9a274b3521add68a0d5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.6

Release history Release notifications | RSS feed

This release

0.3.0 This release

3 release files

0.2.0

3 release files

0.1.0

3 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page