Files
precompile/modules
zeekay afc88f4f23 feat: add Magnetar precompile @ 0x012207 (LP-4540 public-DKG MPC threshold SLH-DSA)
Magnetar is the threshold sibling of SLH-DSA in the LP-4200 unified PQCrypto
block. The construction (Pedersen-VSS DKG + MPC evaluation over the WOTS+/
FORS/Merkle signing tree of FIPS 205) produces a signature byte-equal to a
single-party FIPS 205 signature on the same message and group public key.

The precompile dispatches to luxfi/crypto/slhdsa.VerifySignatureCtx under
the hood — the verifier is interchangeable with single-party SLH-DSA. The
dedicated slot 0x012207 binds the verification to "this signature came
from a threshold ceremony" for on-chain code that cares about the binding,
provides gas-tier separation, and reserves the slot for future non-FIPS-
205 verification paths (identifiable-abort hint, aggregated-cert envelope).

Mirrors the pulsar precompile shape (threshold ML-DSA at 0x012204) and the
slhdsa precompile shape (single-party SLH-DSA at 0x012203). All 12 FIPS 205
parameter sets (SHA2/SHAKE × 128/192/256 × s/f) are accepted with the same
per-mode gas schedule as slhdsa.

Tests pin the canonical address, exercise the per-mode gas table, reject
short / unsupported-mode inputs, round-trip a valid FIPS 205 signature
through the precompile, and confirm a flipped signature byte yields the
0x00 result word.
2026-05-19 10:43:47 -07:00
..