AI-generated analysisPublished automatically and not human-verified. Validated context appears in community notes below.
← Watch feed
Low 28 Bitcoin

wallet/hsmd: fix signmessagewithkey for BIP86 wallets

Public commit record

What the developer wrote

Authored by Sangbida Chaudhuri

85/100 · Strong
wallet/hsmd: fix signmessagewithkey for BIP86 wallets

The signmessagewithkey RPC was failing for BIP86 (mnemonic-based)
wallets because:

1. The wallet RPC was iterating through BIP32-derived addresses only,
so it couldn't find BIP86-derived addresses.

2. The HSM's handle_bip137_sign_message always used bitcoin_key()
(BIP32 derivation) regardless of wallet type.
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Explains rationale or failure mode
The short version

What changed, and why it matters

This commit fixes a bug where the `signmessagewithkey` RPC command did not work for newer BIP86-style wallets. Previously, the wallet RPC only searched through older BIP32-derived addresses, and the HSM signing code always used BIP32 key derivation. The fix makes both the wallet lookup and the HSM signing aware of BIP86 derivation, so users can sign messages with keys from BIP86 wallets. This is a functionality bug, not a clear security vulnerability, but it could have caused user confusion or application failures.

Recommended action

Review and merge the patch. After deployment, verify that `signmessagewithkey` works for both BIP32 and BIP86 wallets and produces valid BIP137 signatures. No urgent security response is indicated, but regression tests for both wallet types should be added if not already present.

Security signals we found

01

Functional bug in key derivation path selection

02

BIP86 wallet support added to message signing RPC

03

HSM now derives signing key according to wallet type

04

No explicit security impact described by vendor

Risk score

Why this scored 28/100

Our methodology →
Potential impact 6/30
Exploitability 3/25
Stealth signal 2/15
Affected reach 5/15
Confidence 8/10
Evidence quality 4/5
Human-validated context

Community notes

Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.

No validated notes yet.

The AI analysis stands alone for now. Submit a note if you can add evidence or important context.