SLH-DSA (FIPS 205): the stateless hash-based signature scheme (SPHINCS+). Twelve parameter sets over two hash families (SHA2 / SHAKE), three security categories (128/192/256) and a small (s) / fast (f) trade-off. STATUS: all 12 parameter sets are implemented - ADRS, the tweakable hashes (SHAKE sec.11.1: F/H/T_l/PRF/PRF_msg/H_msg over SHAKE256; SHA2 sec.11.2: SHA-256 for F/PRF, SHA-256 (cat 1) or SHA-512 (cat 3/5) for H/T_l, HMAC for PRF_msg, MGF1 for H_msg, all over the 22-byte compressed ADRS), WOTS+, XMSS, hypertree, FORS and slh_keygen/sign/verify, plus the external context wrapper and the iDSISLHInternal test hook. Serialization (FIPS 205 sec.9.1): PK = PK.seed||PK.root (2n bytes); SK = SK.seed||SK.prf||PK.seed||PK.root (4n bytes), i.e. the trailing 2n bytes of the private key are the public key. The SHAKE tweakable hashes use the full 32-byte ADRS (FIPS 205 sec.11.1). The treehash (XmssNode/ForsNode) is the naive recursive form from the spec; correctness first, no leaf caching (fine for the f-variants, slower for s). The pool (iDSISLH, obtain via GetDSISLH) is registered in the initialization section via RegisterDSIArith, mirroring StreamSec.DSI.MLC / .CompositeSig.
inherits from Exception
(no public members)
Per-parameter-set constants (FIPS 205, Table 2). lg_w is 4 for every set (Winternitz parameter w = 16). m is the H_msg output length in bytes.
n : Integer;
h : Integer;
d : Integer;
hp : Integer;
a : Integer;
k : Integer;
lg_w : Integer;
m : Integer;
isSHA2: Boolean;
inherits from TInterfacedObject
implements iSLHDSAKey, iSignKey
(no public members)
inherits from tSLHDSAKey
implements iSLHDSAPublicKey, iSignPublicKey
constructor Create(aAlg: tSLHDSAAlg; const aEncodedKey: tBytes);
inherits from tSLHDSAKey
implements iSLHDSAPrivateKey, iSignPrivateKey
constructor Create(aAlg: tSLHDSAAlg; const aEncodedKey, aEncodedPublicKey: tBytes);
Internal interface for KATs / testing - explicit seeds and addrnd make the deterministic FIPS 205 / ACVP vectors reproducible. Use iDSISLH for application code. Mirrors iDSIMLDSAInternal in StreamSec.DSI.MLC.
procedure KeyGenInternal(aAlg: tSLHDSAAlg; const aSKseed, aSKprf, aPKseed: tBytes; var aPublicKey : iSLHDSAPublicKey; var aPrivateKey: iSLHDSAPrivateKey);
function SignInternal(const aPrivateKey: iSLHDSAPrivateKey; const aMsg : tBytes; const aAddRnd : tBytes) : tBytes;
function VerifyInternal(const aPublicKey: iSLHDSAPublicKey; const aMsg : tBytes; const aSignature: tBytes) : Boolean;
inherits from TInterfacedObject
implements iDSISLH, iDSISLHInternal
The SLH-DSA pool. Implements iDSISLH; obtain via GetDSISLH / MustGetDSISLH.
(no public members)