open-standards/wai/http-conformance/falsify/sig-verify-lenient.patch
Transaction Science 0be54c6987 Leave wai-quantum on its own verifier; the rule goes back into wai-rs
wai-quantum belongs to another line of work that is shipping releases, and
moving it was not needed to put every signature check written in wai-rs on one
strict verifier. This undoes c37c3e9a and the quantum-ops part of 9b5854aa:
wai/wai-sig is gone, wai-rs/src/sig.rs is the rule again (under the `ed25519`
feature), and wai-quantum, its Cargo.toml and lock, every other workspace's
lock, the quantum-ops corpus and wai_quantum_ops_vectors are as main has them.
wai-quantum's lenient checks are reported to its owner instead.

The JWP, signer and packaging weak-key cases stay; they verify through
wai::sig. The two HTTP falsify patches are cut against wai-rs/src/sig.rs again,
and wai-http and wai-pack fire on claim-conformance/_ed25519.py, which their
Python verifiers read.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-07 14:33:18 -04:00

15 lines
717 B
Diff

# must fail: playlist_receipt_sig_r_small_order
# R of small order accepted (wai::sig::verify_strict checks the equation leniently)
diff --git a/wai/wai-rs/src/sig.rs b/wai/wai-rs/src/sig.rs
index 48a10219..dd32f7fc 100644
--- a/wai/wai-rs/src/sig.rs
+++ b/wai/wai-rs/src/sig.rs
@@ -77,7 +77,7 @@ pub fn verify_strict(pubkey: &[u8; 32], msg: &[u8], sig: &[u8; 64]) -> Result<()
if !below_l(s) {
return Err(SigError::BadSignature);
}
- key.verify_strict(msg, &Signature::from_bytes(sig)).map_err(|_| SigError::BadSignature)
+ ed25519_dalek::Verifier::verify(&key, msg, &Signature::from_bytes(sig)).map_err(|_| SigError::BadSignature)
}
/// The identity point, canonically encoded (y = 1).