We want to introduce one precompile, VERIFY_SLHDSA_SHA2_128S, that verifies SLH-DSA-SHA2-128s signatures as specified in FIPS 205. The input is pubkey ++ signature ++ message with no length fields: a 32-byte public key, a 7,856-byte signature, and a message of any length. The precompile verifies in pure mode with the empty context string and returns a 32-byte word: one for a valid signature, zero otherwise.
The precompile targets high-assurance keys such as account recovery and rotation keys, for example ones held in Hardware Security Modules (HSMs) that implement FIPS 205.
Motivation
Monad accounts and contracts authenticate with secp256k1 and, through the EIP-7951 precompile, secp256r1. Both rest on the elliptic-curve discrete logarithm problem, which a large enough quantum computer solves. Contracts have no protocol-level way to verify a post-quantum signature today.
SLH-DSA (FIPS 205) is the most conservative of the finalized post-quantum signature schemes: its security depends only on properties of the underlying hash function. It complements a lattice-based scheme and does not replace one. An account that signs routine transactions with a lattice key can register an SLH-DSA key for recovery and key rotation, so that a break of the lattice assumption does not cost it control of the account.
That role fits the scheme’s cost profile. A public key is 32 bytes, one storage slot, while a signature is 7,856 bytes. The key is cheap to keep onchain and the signature is expensive to publish, which suits a key that signs relatively fewer times in the life of an account.
(PR link will be updated with a permalink once merged in)