ADD: BIP47 (m/47') derivation path support for message signing#891
Open
MightyMercurian wants to merge 1 commit intoSeedSigner:devfrom
Open
ADD: BIP47 (m/47') derivation path support for message signing#891MightyMercurian wants to merge 1 commit intoSeedSigner:devfrom
MightyMercurian wants to merge 1 commit intoSeedSigner:devfrom
Conversation
Enable message signing with BIP47 identity keys by adding 47h to the recognized purpose bytes in parse_derivation_path(). This unlocks Auth47 challenge signing, PayNym claim proofs, and BIP47 identity message signing through the existing signmessage flow. The signing primitive (embit_utils.sign_message) already accepts any derivation path. This change updates the parser so BIP47 paths pass the policy gates in SeedSignMessageStartView and SeedSignMessageConfirmAddressView instead of redirecting to NotYetImplementedView.
|
Thanks, @MightyMercurian, for opening this PR. The concept / proposal has been iterated over a number of times with some feedback from MM and others who are familiar with the BIP47 / PayNym side. Thank you for your consideration, SeedSigner devs! Proposal link: https://gist.github.com/arkfile/7a320dbb4377c5e1b65250b2049e941d (as linked by MM above). |
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.
Summary
Adds
47h(BIP47) to the recognized purpose bytes inparse_derivation_path(), enabling message signing with BIP47 identity keys through the existingsignmessageflow.Why: BIP47 payment codes, PayNym identities, and Auth47 authentication all require signing messages with keys derived at
m/47'/0'/0'. The signing primitive (sign_message()) already accepts any derivation path — the only blocker was the policy gate in the derivation path parser rejecting unrecognized purpose bytes.What changed:
src/seedsigner/helpers/embit_utils.py: Added"47h": SettingsConstants.LEGACY_P2PKHto thescript_typeslookup inparse_derivation_path(). BIP47 v1/v2 notification addresses are P2PKH, so the address displayed on the confirmation screen is the correct notification address.tests/test_flows_seed.py: Addedtest_sign_message_bip47_flowcovering the full signing flow with a BIP47 derivation path (m/47h/0h/0h/0/0).What this enables:
signmessage m/47h/0h/0h/0/0 ascii:<challenge>, SeedSigner signs, coordinator POSTs responseWhat this does NOT change:
Context: https://gist.github.com/arkfile/7a320dbb4377c5e1b65250b2049e941d