Add SeedQR support for BIP39 passphrase input - #398
Open
blakemountain wants to merge 4 commits into
Open
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.
Description
Problem or Issue being addressed
SeedSigner's passphrase QR workflow accepts plaintext UTF-8 QR codes, but does not accept Standard SeedQR or Compact SeedQR as passphrase input.
This PR adds the option to use either SeedQR format as a BIP39 passphrase while preserving the existing plaintext QR behavior.
Solution
When scanning a passphrase QR, Standard SeedQR and Compact SeedQR payloads are detected and decoded using the existing SeedQR decoding logic.
Because SeedQR represents BIP39 word indexes rather than the original text formatting, decoded SeedQR passphrases are reconstructed canonically as lowercase BIP39 words separated by single ASCII spaces.
Plain UTF-8 passphrase QR input continues to preserve the exact text provided.
Malformed SeedQR input is rejected rather than being accepted as an empty or otherwise unintended passphrase. The passphrase scan workflow displays an "Invalid QR" warning when this occurs.
Tests cover:
Additional Information
Tested on a Raspberry Pi Zero W with physical SeedSigner hardware.
Using the same seed, I tested equivalent passphrases supplied as:
All three produced the same wallet fingerprint.
Malformed SeedQR input was also tested on the physical device and correctly displayed the invalid QR warning.
The branch was rebased onto the current
3rdIteration/devbefore final testing.Screenshots
No screenshots included. The only new screen behavior is the invalid QR warning using the existing warning UI.
This pull request is categorized as:
Checklist
I ran
pytestlocallyFull suite result:
1026 passed, 58 skipped, 1 xfailedI included screenshots of any new or modified screens
Should be part of the PR description above.
I added or updated tests
Any new or altered functionality should be covered in a unit test. Any new or updated sequences require FlowTests.
I tested this PR hands-on on the following platform(s):
I have reviewed these notes:
Thank you! Please join our Devs' Telegram group to get more involved.