test(key-wallet): pin scalar reduction paths, refusal of zero scalars and public keys off the curve - #1038
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository: dashpay/rust-dashcore/.coderabbit.yaml Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (1)
Included review availability: Your plan provides up to 1 included review per hour; 0 remain after this review. 📝 WalkthroughWalkthroughThe change centralizes repeated BLS derivation HMAC logic and adds policy tests. The tests cover scalar reduction, derivation tweaks, endian conversion, zero-scalar rejection, and off-curve public-key rejection. ChangesBLS derivation
Priority: ⬇️ Low Estimated code review effort: 2 (Simple) | ~10 minutes Change: Other Merge Risk: ⚪ Minimal · up to The current changes add test coverage and leave no actionable merge-blocking risk. 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## dev #1038 +/- ##
==========================================
+ Coverage 77.12% 77.15% +0.02%
==========================================
Files 329 329
Lines 83862 83900 +38
==========================================
+ Hits 64680 64729 +49
+ Misses 19182 19171 -11
|
|
Ready for review — needs QuantumExplorer or ZocoLini or xdustinface. |
|
/self-reviewed |
Plus, optionally: give |
|
/self-reviewed |
|
/self-reviewed |
|
Policy satisfied — this can merge. |
Motivation
Conflicting agentic advice when working on rust-dashcore#1036 resulted in flagging permitting scalar reduction as a regression (against strictly refusing
>R), then flagging later on that refusal conflicts with secp256k1's larger field and the HMAC output frequently>R.This pull request pins behaviour for the sake of posterity as both are opposite approaches and tests still passed, making them seem plausible despite breaking effects.
Additional Information
dashcore-cryptocrate, switch todash-pkcfromblsfulfork #1036PR Hygiene ·
6f3d5d4key-wallet(key-wallet/src/derivation_bls_bip32.rs) — approved by ZocoLiniWhen every box is checked the
PR Hygienecheck passes and this can merge.