Skip to content

Add BIP39 word-number mnemonic entry#312

Open
oroderico wants to merge 3 commits into
Blockstream:masterfrom
oroderico:feature/restore-word-numbers-clean-393e8ba4
Open

Add BIP39 word-number mnemonic entry#312
oroderico wants to merge 3 commits into
Blockstream:masterfrom
oroderico:feature/restore-word-numbers-clean-393e8ba4

Conversation

@oroderico

Copy link
Copy Markdown
Contributor

Summary

  • add an optional BIP39 word-number entry method for 12- and 24-word mnemonic recovery
  • resolve numbers from 1 to 2048 to their English BIP39 words and require confirmation before continuing
  • keep the standard Begin Setup flow unchanged, exposing the Entry Method screen only in Advanced Setup and Temporary Signer
  • preserve the existing mnemonic validation and advanced final-word behavior

This implements the flow agreed in #311, including the Entry Method title and the Word / Index Number options. Thanks to @jgriffiths for routing the proposal to the product team, and to @bitcoinhelp for the product feedback and confirmation of the updated flow.

Closes #311.

Implementation

  • extend digit entry with bounded, variable-length numeric input while preserving existing PIN and index-entry behavior
  • share the existing word-selection and final-word logic between word and index-number recovery
  • securely clear replaced GUI text and temporary mnemonic-entry state

Testing

  • validated 12-word and 24-word recovery by index number
  • validated standard Begin Setup, Advanced Setup, and Temporary Signer routing
  • validated word confirmation, backtracking, invalid numbers, and invalid mnemonic handling
  • validated existing and calculated advanced final-word paths
  • built, flashed, and tested on a TTGO T-Display
  • passed clang-format --dry-run --Werror and git diff --check

roderico added 3 commits July 18, 2026 14:42
Text nodes can display sensitive wallet data. Use wally_free_string() when replacing their contents so the old allocation is cleared before release, matching the text-node destructor.
Allow digit-entry callers to select a shorter field width and an optional maximum value while preserving the existing six-digit PIN and index defaults. Skip unavailable candidate digits during navigation and keep short-number entry semantics unchanged.
Allow advanced 12- and 24-word recovery to use one-based BIP39 word numbers. Resolve and confirm every word, retain the existing final-word calculation flow, and validate the complete recovery phrase before deriving keys. Clear sensitive entry state and displayed words when the flow exits.
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.

[Feature Request] Enter mnemonic using BIP39 word numbers

1 participant