Skip to main content

FIPS-205 SLH-DSA bindings for botan3

This project has been archived.

The maintainers of this project have marked this project as archived. No new releases are expected.

Project description

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.sh to populate ./tests/ACVP-Server with ACVP test vectors
  • run ./tests/liboqs/liboqs-python.sh to 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 liboqs Sphincs3.1+ implementation

Note that this module offer no support for SLH-DSA pre-hashing nor context binding.

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_botan3-0.1.3.tar.gz (50.1 kB view details)

Uploaded Source

Built Distribution

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

slh_dsa_botan3-0.1.3-py3-none-any.whl (34.5 kB view details)

Uploaded Python 3

File details

Details for the file slh_dsa_botan3-0.1.3.tar.gz.

File metadata

  • Download URL: slh_dsa_botan3-0.1.3.tar.gz
  • Upload date:
  • Size: 50.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.2

File hashes

Hashes for slh_dsa_botan3-0.1.3.tar.gz
Algorithm Hash digest
SHA256 b8c9a63f057d2d73bedaf2ebb675729d7f6a4d93a2666fe7a8b7cb32973266c1
MD5 71646db484e5686342b05b69a6208500
BLAKE2b-256 bca7454c864f8d36e10d1ba2cb6612c5011f586fbecf9222091bd9eb677e05f9

See more details on using hashes here.

File details

Details for the file slh_dsa_botan3-0.1.3-py3-none-any.whl.

File metadata

  • Download URL: slh_dsa_botan3-0.1.3-py3-none-any.whl
  • Upload date:
  • Size: 34.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.2

File hashes

Hashes for slh_dsa_botan3-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 8e3c47f249257183935fd20636c16ef64cbb846c4fde3c80e0e767c47eb5dc39
MD5 0584c1c6d485ca751dda1a73869fd9b5
BLAKE2b-256 d5800497215dc2176ccbce0aa28600cb8003793a9610dcc6865352937efb5155

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