Message signing: confirm a pubkey for any non-standard derivation path#950
Draft
newtonick wants to merge 1 commit into
Draft
Message signing: confirm a pubkey for any non-standard derivation path#950newtonick wants to merge 1 commit into
newtonick wants to merge 1 commit into
Conversation
…ndard single sig with unit tests
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.
Description
Problem or Issue being addressed
Fixes #519.
Message signing only works for conventional single sig paths (BIP44/49/84/86). Everything else is rejected, and inconsistently:
m/48h/...throws a bareException("Not implemented"),m/45h/0/0gets a "not supported" screen, andm/1017h/...dies on an uncaughtraisein the confirm view. The root cause is that the confirm screen requires an address, which requires a script type that arbitrary paths don't have.Approach and rationale discussed here: #519 (comment)
Solution
For any path that isn't a conventional single sig one, confirm the signing pubkey instead of an address: seed fingerprint, derivation path, and the compressed pubkey at that exact path (new
SeedSignMessageConfirmPubkeyView). Standard single sig paths are untouched and still confirm an address. Malformed paths from a scanned QR now route to a newInvalidDerivationPathErrorViewinstead of crashing.Additional Information
Screenshots
Review the message (unchanged):
Standard single sig path still confirms an address (unchanged; verified byte-identical):
New pubkey confirmation for any other path (shown for a BIP48 path):
New error screen for a malformed derivation path:
This pull request is categorized as a:
Checklist
I ran
pytestlocallyI included screenshots of any new or modified screens
I added or updated tests
I tested this PR hands-on on the following platform(s):
I have reviewed these notes: