Contents · Forum Home · StreamSec Tools 4.1.5.363 documentation

StreamSec.DSI.SLHDSA

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.

Classes, interfaces and records

classeSLHError

inherits from Exception

(no public members)

recordtSLHDSAParams

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;
security parameter / hash output length (bytes)
h : Integer;
total hypertree height
d : Integer;
number of hypertree layers
hp : Integer;
height of one XMSS tree (= h div d)
a : Integer;
FORS tree height
k : Integer;
number of FORS trees
lg_w : Integer;
log2 of the Winternitz parameter w (always 4)
m : Integer;
H_msg digest length (bytes)
isSHA2: Boolean;
hash family: True = SHA2, False = SHAKE

classtSLHDSAKey

inherits from TInterfacedObject

implements iSLHDSAKey, iSignKey

(no public members)

classtSLHDSAPublicKey

inherits from tSLHDSAKey

implements iSLHDSAPublicKey, iSignPublicKey

constructor Create(aAlg: tSLHDSAAlg; const aEncodedKey: tBytes);

classtSLHDSAPrivateKey

inherits from tSLHDSAKey

implements iSLHDSAPrivateKey, iSignPrivateKey

constructor Create(aAlg: tSLHDSAAlg; const aEncodedKey, aEncodedPublicKey: tBytes);

interfaceiDSISLHInternal

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;

classtDSISLH

inherits from TInterfacedObject

implements iDSISLH, iDSISLHInternal

The SLH-DSA pool. Implements iDSISLH; obtain via GetDSISLH / MustGetDSISLH.

(no public members)

Routines