Skip to main content

Multi-backend FIPS-205 SLH-DSA bindings

Project description

Beware: This package have been generated and has not 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 vendored, compiled at install "slhdsa-c" 2b111e07
nettle vendored, compiled at install "nettle" 66c7ef01
go-slh-dsa prebuilt wheels only "go" 15ed0951
botan3 system botan3 bindings "botan3" n/a
liboqs system oqs (liboqs-python) "liboqs" n/a
OpenSSL system OpenSSL3.5 or later "openssl" n/a

Use the backend= API argument or SLH_DSA_BACKEND environment variable to select.

Quickstart

from slh_dsa_multi import SLHDSAPrivateKey

sk = SLHDSAPrivateKey.generate("SLH-DSA-SHA2-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-SHA2-128s")

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

Signing is randomized (hedged) by default for practical security.

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

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+)
  • go-slh-dsa (BSD-3-Clause)

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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

slh_dsa_multi-0.1.0.tar.gz (131.2 kB view details)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

slh_dsa_multi-0.1.0-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.whl (1.3 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.17+ x86-64

slh_dsa_multi-0.1.0-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.whl (1.2 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.17+ ARM64

File details

Details for the file slh_dsa_multi-0.1.0.tar.gz.

File metadata

  • Download URL: slh_dsa_multi-0.1.0.tar.gz
  • Upload date:
  • Size: 131.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.4.1 CPython/3.14.5 Linux/7.0.10-arch1-1

File hashes

Hashes for slh_dsa_multi-0.1.0.tar.gz
Algorithm Hash digest
SHA256 08ebd7acee73f9b4fc0f3aae58bdb0501615ae511c874b479a3fcb76b22277cb
MD5 d3543e6dbc3aee7f91d48b68352ad030
BLAKE2b-256 783fbd3002fdd04a6de3be8dae78b6b7b18944f2b28e5f8a92017fd4e5de48b6

See more details on using hashes here.

File details

Details for the file slh_dsa_multi-0.1.0-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.whl.

File metadata

File hashes

Hashes for slh_dsa_multi-0.1.0-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
Algorithm Hash digest
SHA256 0545f88b01f141f14e0d6f31b498e16596da02731c621d5c236df7c5aeb3546f
MD5 1931a044086b18043044a117c1cb0752
BLAKE2b-256 1134fb4c4f182a22af6464ffd16c61472f639498ab8ff67a3d4a3c6936ebc17f

See more details on using hashes here.

File details

Details for the file slh_dsa_multi-0.1.0-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.whl.

File metadata

File hashes

Hashes for slh_dsa_multi-0.1.0-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.whl
Algorithm Hash digest
SHA256 be0821c65a974cab812e957114fa99160bcdecfb061674207d262eaeade48e42
MD5 68f92628cc92d853e5e3b1db21a047ee
BLAKE2b-256 58072e465e194b3587ef93a3b05bf5f0e63c11d7466dd0159303dcc33f064834

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page