Repository navigation
Backlog
Description
TL;DR: The ECDSA migration in #5519 works, but its review found test gaps and a few small cleanups that were left out of that PR. This issue collects them so they are not lost.
User story
As a maintainer of the DPP and SDK crypto code, I want the remaining ECDSA test gaps and duplicated helpers closed, so a later change to key handling cannot silently change signatures, keys or accepted inputs.
Scenario
Base flow
#5519 moves DPP and its consumers from the raw secp256k1 crate to the typed ECDSA API while keeping signature, key and accepted-input bytes unchanged.
Actual behavior
- Two test fixtures in
packages/rs-sdk/src/platform/dashpay/invitation.rs(signed_high_key,claim_through_the_sdk::claim_keys) still use rawsecp256k1only to derive public keys, which keeps the raw dependency in the SDK tests. packages/rs-dpp/src/util/ecdsa/random_secret_key.rskeeps a local sampler (with a TODO) although the pinned Core crate offersgenerate_with; its temporary scalar buffer is not wiped, and its test does not force the rejection of invalid scalars.- The low-S rule exists both in
rs-dpp/src/util/ecdsa/mod.rsand inrs-platform-wallet/src/wallet/identity/crypto/auto_accept.rs. - CI (
.github/workflows/tests-rs-workspace.yml) does not run the compatibility tests ofsimple-signerandwasm-dpp2. - Scalar negation in
rs-dpp/src/tests/utils/mod.rsis local; the pinned Core facade has none. - Tests lack fixed vectors for:
high_s_twinborrow propagation, DIP14 derivation output and a forced invalid IL (wasm-sdk/src/wallet/dip14.rs),KeyTypebyte conversion with an invalid scalar (identity_public_key/key_type.rs), and signature-recovery header bounds and recovery IDs (rs-sdk-cxx/src/signer.rs,state_transition/mod.rs). - A high-S signature from an external signer can be rejected only later, depending on the path and protocol version (
state_transition/mod.rs,rs-sdk-cxx/src/signer.rs). - WASM entry points that take secrets (
wasm-sdk/src/encrypted_for.rs,moderation_charters.rs) do not wipe them on every path.
Expected behavior
Each item above is fixed or explicitly declined, with tests that pin today's bytes.
Detailed discussion
- Found in the review of refactor: remove DPP raw secp256k1 dependency #5519; ECDH-related items are tracked separately in feat(pkc): typed ECDH on secp256k1 keys base-sdk#137.
- Each item is small (a few lines of production code, or tests only) and can land in one or more focused PRs.
Prior work
- refactor: remove DPP raw secp256k1 dependency #5519: ECDSA migration of DPP consumers.
- feat(pkc): typed ECDH on secp256k1 keys base-sdk#137: ECDH migration.
Attribution
🤖 Co-authored by Claudius the Magnificent AI Agent
Metadata
Metadata
Assignees
Labels
No labels
Activity