Package zeroecho.core.alg.slhdsa
This package provides a ZeroEcho binding for SLH-DSA, the NIST-standardized profile of the stateless hash-based signature scheme SPHINCS+. While SLH-DSA is derived from SPHINCS+, it is exposed here as a distinct algorithm identity with a restricted, standards-compliant parameter space.
Algorithm identity
- JCA algorithm name:
"SLH-DSA" - ZeroEcho algorithm id:
"SLHDSA" - Provider: Bouncy Castle core provider (
"BC")
Supported parameter space
The supported parameters correspond exactly to the SLH-DSA profiles defined by FIPS 205:
- Hash families: SHA2 and SHAKE
- Security levels: 128, 192, 256 bits (NIST levels L1, L3, L5)
- Variants:
FAST(larger, faster signatures) andSMALL(smaller, slower signatures) - Optional pre-hash variants as defined by the standard and exposed by the provider
Non-standard SPHINCS+ variants (e.g. Haraka, simple/robust modes) are intentionally excluded from this package.
Key management
- Key generation is configured via
SlhDsaKeyGenSpecand performed bySlhDsaKeyGenBuilder. - Encoded public and private keys are represented by
SlhDsaPublicKeySpecandSlhDsaPrivateKeySpec. - All key specifications use defensive copies; private-key specifications are destroyable.
Streaming signature model
Signatures are processed through the ZeroEcho streaming signature infrastructure:
- In
KeyUsage.SIGNmode, the signature is appended as a fixed-length trailer to the output stream. - In
KeyUsage.VERIFYmode, the wrapped stream emits only the message body; verification is performed at end-of-stream against a caller-supplied expected signature.
The canonical signature length is derived from the public key parameters by
SlhDsaSignatureContext and matches the
standard SLH-DSA signature sizes defined by FIPS 205.
Security considerations
- No sensitive material (private keys, signatures, message contents) is logged or exposed by this package.
- All byte arrays returned to callers are defensive copies.
- Verification failures are surfaced exclusively via the configured verification strategy.
Relationship to SPHINCS+
The slhdsa package represents the standardized SLH-DSA profile only.
A separate sphincsplus package may expose the full SPHINCS+ design
space and experimental variants. No API-level equivalence between the two
packages is assumed.
- Since:
- 1.0
-
ClassDescriptionSLH-DSA (FIPS 205) signature algorithm binding for the ZeroEcho framework.Key pair builder for SLH-DSA (FIPS 205) using the Bouncy Castle PQC provider.Specification for generating SLH-DSA key pairs (FIPS 205).SLH-DSA hash families (FIPS 205).Optional pre-hash variant selection.Security levels as defined by NIST PQC (L1, L3, L5).Variant trading performance against signature size.Builder for importing SLH-DSA private keys from encoded specifications.Encoded representation of an SLH-DSA private key.Builder for importing SLH-DSA public keys from encoded specifications.Encoded representation of an SLH-DSA public key.Streaming signature context for SLH-DSA (FIPS 205).