Repository navigation
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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:
m/352'/coin_type'/account'/1'/0.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