Skip to content

Add SeedQR support for BIP39 passphrase input - #398

Open
blakemountain wants to merge 4 commits into
3rdIteration:devfrom
blakemountain:feature-seedqr-passphrase
Open

Add SeedQR support for BIP39 passphrase input#398
blakemountain wants to merge 4 commits into
3rdIteration:devfrom
blakemountain:feature-seedqr-passphrase

Conversation

@blakemountain

Copy link
Copy Markdown

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:

  • Standard SeedQR passphrase decoding
  • Compact SeedQR passphrase decoding
  • Equivalent Standard/Compact representations
  • Preservation of existing plaintext passphrase behavior
  • Malformed SeedQR rejection
  • Invalid passphrase QR handling

Additional Information

Tested on a Raspberry Pi Zero W with physical SeedSigner hardware.

Using the same seed, I tested equivalent passphrases supplied as:

  • plaintext QR
  • Standard SeedQR
  • Compact SeedQR

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/dev before 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:

  • New feature
  • Bug fix
  • Code refactor
  • Documentation
  • Other

Checklist

I ran pytest locally

  • All tests passed before submitting the PR
  • I couldn't run the tests
  • N/A

Full suite result: 1026 passed, 58 skipped, 1 xfailed


I included screenshots of any new or modified screens

Should be part of the PR description above.

  • Yes
  • No
  • N/A

I added or updated tests

Any new or altered functionality should be covered in a unit test. Any new or updated sequences require FlowTests.

  • Yes
  • No, I'm a fool
  • N/A

I tested this PR hands-on on the following platform(s):


I have reviewed these notes:

  • Keep your changes limited in scope.
  • If you uncover other issues or improvements along the way, ideally submit those as a separate PR.
  • The more complicated the PR, the harder it is to review, test, and merge.
  • We appreciate your efforts, but we're a small team of volunteers so PR review can be a very slow process.
  • Please only "@" mention a contributor if their input is truly needed to enable further progress.
  • I understand

Thank you! Please join our Devs' Telegram group to get more involved.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant