BenWestgate / Bails

Bails is a Bitcoin solution protecting against surveillance, censorship, and confiscation. It installs Bitcoin Core on the encrypted Persistent Storage of Tails, creates and recovers Bitcoin Core wallets from Codex32 (BIP93) seed backups, and creates backup Bails USB sticks and shareable blank Bails USB sticks. Learn more in README.md.
MIT License
40 stars 7 forks source link

During initial wallet setup, highlight substitution errors, but don't correct anything. #55

Closed BenWestgate closed 11 months ago

BenWestgate commented 11 months ago

So in summary, error correction implementations:

  • During initial wallet setup, behave like bech32: you can highlight substitution errors, but don't correct anything.
  • During recovery, then do whatever you can, including grinding for insertions/deletions, to find the seed. Then show the user the set of corrections and make them re-enter the corrected string (in the hope that they'll make a new corrected backup) before using it.

Originally posted by @apoelstra in https://github.com/BlockstreamResearch/codex32/issues/54#issuecomment-1649797376

Currently implementing 1 edit correction and displaying the suggested code word in "Restore wallet" Should implement full string substitution detection and highlighting the input string red. "You have typed Errors in the following locations" Press enter to see the correct string again. Do not fix anything at all in their input field. Not even non-bech32 characters, capitalization or length.

BenWestgate commented 11 months ago

The corrections get displayed in "Restore Wallet" (I might highlight with 2 colors the visible corrections like insertions and substitutions. Using the familiar substitution color they saw during create) I can actually "correct a ton of errors if they're things like B = 8, O = 0, I = 1/l, etc, those suggestions would be in addition to the brute force edit_depth of 1. And they should be displayed by the python library, not the messy bash function

BenWestgate commented 11 months ago

Highlighting of substitution errors in "create a new seed" is completed.