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")| Variants | Private key | Public key | Signature |
|---|---|---|---|
SLH_DSA_SHA2_128S, SLH_DSA_SHAKE_128S | 64 bytes | 32 bytes | 7856 bytes |
SLH_DSA_SHA2_128F, SLH_DSA_SHAKE_128F | 64 bytes | 32 bytes | 17088 bytes |
SLH_DSA_SHA2_192S, SLH_DSA_SHAKE_192S | 96 bytes | 48 bytes | 16224 bytes |
SLH_DSA_SHA2_192F, SLH_DSA_SHAKE_192F | 96 bytes | 48 bytes | 35664 bytes |
SLH_DSA_SHA2_256S, SLH_DSA_SHAKE_256S | 128 bytes | 64 bytes | 29792 bytes |
SLH_DSA_SHA2_256F, SLH_DSA_SHAKE_256F | 128 bytes | 64 bytes | 49856 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-dsa0.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) andSLH-DSA-sigVer-FIPS205vectors for all 12 sets.