Skip to Content
oxcrypto

SLH-DSA

Sign with the 12 SLH-DSA parameter sets (FIPS 205).

from oxcrypto.signature.slh_dsa import SLH_DSA

key = SLH_DSA.SLH_DSA_SHA2_128S.generate()
signature = key.sign(b"hello", context=b"app v1")
assert key.public_key().verify(signature, b"hello", context=b"app v1")
VariantsPrivate keyPublic keySignature
SLH_DSA_SHA2_128S, SLH_DSA_SHAKE_128S64 bytes32 bytes7856 bytes
SLH_DSA_SHA2_128F, SLH_DSA_SHAKE_128F64 bytes32 bytes17088 bytes
SLH_DSA_SHA2_192S, SLH_DSA_SHAKE_192S96 bytes48 bytes16224 bytes
SLH_DSA_SHA2_192F, SLH_DSA_SHAKE_192F96 bytes48 bytes35664 bytes
SLH_DSA_SHA2_256S, SLH_DSA_SHAKE_256S128 bytes64 bytes29792 bytes
SLH_DSA_SHA2_256F, SLH_DSA_SHAKE_256F128 bytes64 bytes49856 bytes

This is pure SLH-DSA from FIPS 205 with a context string of up to 255 bytes. The S sets have smaller, slower signatures and the F sets larger, faster ones. sign is hedged by default; deterministic=True uses PK.seed as the randomizer, as FIPS 205 specifies. Pre-hashed HashSLH-DSA is not offered.

  • Crate: slh-dsa 0.2.0-rc.5 from RustCrypto, a release candidate with no published audit. It builds with Rust 1.88.
  • Tests: NIST ACVP-Server SLH-DSA-keyGen-FIPS205, SLH-DSA-sigGen-FIPS205 (deterministic) and SLH-DSA-sigVer-FIPS205 vectors for all 12 sets.