Skip to content

BIP352: require the scan key path - #2372

Open
craigraw wants to merge 1 commit into
bitcoin:masterfrom
craigraw:bip352-scan-path
Open

craigraw wants to merge 1 commit into
bitcoin:masterfrom
craigraw:bip352-scan-path

Conversation

@craigraw

Copy link
Copy Markdown
Contributor

BIP352 currently says wallets MAY use the BIP32 derivation paths it defines, and its rationale already notes that hardened derivation makes it safe to export the scan private key. This PR makes two changes so that this holds in practice:

  1. Wallet software deriving the scan key from a BIP32 master key MUST use m/352'/coin_type'/account'/1'/0.
  2. Wallet software, including signing devices, MUST NOT use any key under m/352'/coin_type'/account'/1' for any purpose other than as a silent payments scan key, including for signing.

Why

The scan private key must be exported to wherever scanning takes place, so it is the one private key a silent payments wallet is designed to give out. A scan key derived at any other path may also be used for signing, or allow other private keys to be derived, so exporting it could expose them. Requiring the defined path, which is hardened, and reserving its branch ensures that exporting the scan key exposes nothing else. A signing device can then allow exporting the scan private key at this path while refusing to export any other private key. This gives hardware signers a narrow, auditable rule for supporting silent payments receiving without a separate derivation scheme.

A single path also keeps funds recoverable from a seed alone. All silent payment addresses share one format, so unlike bc1q and bc1p, an address cannot suggest to a wallet which derivation created it. If a second scan key derivation came into use, recovery would require scanning with each candidate scan key. Scanning is the most expensive part of silent payments recovery, so this cost would fall on every user permanently. Seeds also move between hot wallets and signing devices, so any derivation used by only one kind of wallet breaks portability.

Compatibility

Neither change alters sending, receiving or scanning. Wallets that already follow the defined paths are unaffected. The requirements apply only to scan keys derived from a BIP32 master key: scan keys created in other ways remain allowed, and nothing changes for spend keys, which may still be derived differently or be, for example, a MuSig2 aggregate key. Under BIP43 the purpose 352' already belongs to this BIP, and I am not aware of any other use of the scan key branch, so the second change codifies existing practice. BIP375 and BIP376 never sign with the scan key, so neither conflicts with the reservation.

I have bumped the version to 1.2.0 as a backward-compatible change to the specification, in keeping with the BIP3 guidance that a Complete BIP may backfill omissions found during adoption.

cc @josibake @RubenSomsen @theStack

@jonatack jonatack added Proposed BIP modification PR by non-owner to update BIP content Pending acceptance This BIP modification requires sign-off by the champion of the BIP being modified labels Nov 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Pending acceptance This BIP modification requires sign-off by the champion of the BIP being modified Proposed BIP modification PR by non-owner to update BIP content

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants