Repository navigation
fix(dashcore): reject high-S signatures in verify_data_signature - #1379
Conversation
Since the Base SDK bump in #1214, `EcdsaPublicKey::verify` normalizes S before verifying, so `verify_data_signature` accepted high-S signatures it refused before. A high-S signature is a malleable twin of the low-S one. `verify_data_signature` now checks `is_low_s` before verifying and returns an error for a high-S signature, as it did before the bump.
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 52 minutes. View limit details
No actionable comments were generated in the recent review. Walkthrough
Merge Risk:
|
|
Waiting for bot review — coderabbitai not yet. Wait for the missing reviews, or a writer can post |
|
Bots are done — your move: address manki-review[bot] requested changes, then post |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## dev #1379 +/- ##
==========================================
+ Coverage 85.60% 85.67% +0.06%
==========================================
Files 268 268
Lines 69915 70321 +406
==========================================
+ Hits 59853 60248 +395
- Misses 10062 10073 +11
|
|
✅ Review complete in 2m 6s Planner (5s) Review (security · pair): 2 findings Judge: 1 kept · 1 dropped (49s) Review metadataConfig:
Account limits:
Judge decisions:
Timing:
|
There was a problem hiding this comment.
🔴 Changes requested: 1 blocker.
Caution
Claude subscription has used 82% of its weekly limit, past the 80% mark. It resets 2026-11-17 05:00 UTC.
Once a limit is used up, reviews on that account stop until it resets.
What blocks: verify_data_signature now refuses signatures it used to accept, but no test passes it a high-S signature. Nothing shows the new check fires.
About this review
- Reviewed
352f99c, round 1 - 6 changed lines read in 2m 6s
- Found by
claude-sonnet-5-5andclaude-opus-5-5, judged byclaude-opus-5-5 - Tokens: 393k in (303k from cache) · 9k out · about $0.59 at API prices
- How Manki reviews
|
Waiting for bot review — coderabbitai not yet. Wait for the missing reviews, or a writer can post |
|
✅ Review complete in 1m 47s Planner (4s) Review (security · pair): 0 findings Judge: 0 kept · 0 dropped (38s) Review metadataConfig:
Account limits:
Timing:
Last reviewed
|
There was a problem hiding this comment.
✅ Approved.
What this does: Signature checking accepted a modified copy of a valid signature (the "high-S" form). Both forms are valid for the same data, so a signature could be altered without the key.
What to test
The review model wrote these steps. Check what a step runs before you follow it.
- Sign data with
signand check it withverify_data_signatureusing the compressed public key. ExpectOk(()). - Replace S in that signature with
n - S, the curve order minus S. Pass it toverify_data_signature. Expect an error containingthe signature has a high S value. - Check a normal low-S signature against an uncompressed public key. Expect
Ok(()). - Check a valid low-S signature against different data. Expect
signature verification failed, not the high-S error. - Pass a 64-byte signature with no recovery byte. Expect
length not 65 bytes.
About this review
- Reviewed
9b1df99, round 2 - 20 changed lines read in 1m 47s
- Found by
claude-sonnet-5-5andclaude-opus-5-5, judged byclaude-opus-5-5 - Tokens: 289k in (184k from cache) · 9k out · about $0.63 at API prices
- How Manki reviews
|
Bots are done — your move: post |
…run 43241394831)
Since the Base SDK bump in #1214,
EcdsaPublicKey::verifynormalizes S before verifying, soverify_data_signaturesilently started accepting high-S ECDSA signatures. A high-S signature is a malleable twin of the low-S one, and callers relying on the previous strict behavior lost it without notice.verify_data_signaturenow checksis_low_sbefore verifying and rejects high-S signatures, restoring the behavior from before the bump.Closes #1249.
PR Hygiene ·
9b1df99/self-revieweddash/src/signer.rs) — QuantumExplorer or xdustinfaceWhen every merge requirement is met, the
PR Hygienecheck passes. Reviewer limits do not block merging; other required GitHub checks and protections still apply.Summary by CodeRabbit