Class SignatureSpi

Direct Known Subclasses:
SignatureSpi.MLDSA, SignatureSpi.MLDSA44, SignatureSpi.MLDSA65, SignatureSpi.MLDSA87, SignatureSpi.MLDSACalcMu, SignatureSpi.MLDSAExtMu

public class SignatureSpi extends BaseDeterministicOrRandomSignature
JCA Signature SPI for ML-DSA (FIPS 204) and its context/pre-hash variants.

engineVerify(byte[]) returns false for a signature that is cryptographically wrong and for one that is structurally malformed per FIPS 204 Algorithm 8 (wrong length, an out-of-order or duplicate hint index, or a hint weight exceeding the parameter set's omega) - the two cases are not distinguished. This differs from some other providers (e.g. the JDK's own SUN ML-DSA implementation), which throw SignatureException for a decode failure and reserve false for a well-formed-but-wrong signature; see github #2367. Code that needs to distinguish "malformed" from "wrong" cannot rely on Signature.verify(byte[]) alone against this provider.