mirror of
https://github.com/luxfi/crypto.git
synced 2026-07-27 01:54:50 +00:00
Adds Provenance() on slhdsa/mldsa packages so reviewers can ask the running binary "which dispatch tier is live right now?" instead of trusting a static claim. Honest by construction: a release build without the SLH-DSA / ML-DSA backend plugin reports TierAccelCPUFallback or TierGoroutineParallelCPU, never TierGPUSubstrate. The strong-symbol observation is recorded by batchVerifyGPU / batchSignGPU after a successful C ABI dispatch; subsequent GetProvenance() calls report TierGPUSubstrate. The cache only goes 0 -> 1 so transient tensor allocation failures cannot regress provenance to "no plugin". mldsa/batch.go: 3-tier dispatch (GPU -> goroutine-parallel CPU -> serial CPU), mirroring slhdsa. concurrentBatchThreshold=8 tuned for the FIPS 204 verify cost. ML-DSA-44 and ML-DSA-87 batch tests pin KAT replay + CPU/GPU equivalence + tamper rejection across the dispatch tiers. Previously only ML-DSA-65 had this coverage. Removed dead pq/slhdsa/gpu/gpu.go (replaced by the live dispatcher in slhdsa/gpu.go).