Files
arcanum/tests
mnovak 2329eb0719 fix: refuse an ML-DSA-65 public key with t1 = 0 (QA S-05)
With t1 = 0 (Wycheproof's ZeroPublicKey), ML-DSA verification only checks
c~ = H(mu || w1(A·z)), which anyone can satisfy with s1 = s2 = t0 = 0: such
a composite key is silently no stronger than its Ed25519 half.
VerifyingKey::from_bytes now refuses it as InvalidVerifyingKey, like a
small-order Ed25519 half. Invisible to honest keys (t1 = 0 has negligible
probability); rho may be anything.

sig_malformed::an_ml_dsa_key_with_zero_t1_is_refused, from QA's qa_s07
inverted: the key is refused, one non-zero t1 byte anywhere makes it parse,
and with the component crate alone a secret-free expanded key signs for it.
Removing the check makes the test fail.
2026-11-26 03:44:02 +01:00
..