Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bip39: discourage from using localized wordlists #1047

Merged
merged 1 commit into from
Feb 3, 2021

Conversation

prusnak
Copy link
Contributor

@prusnak prusnak commented Dec 20, 2020

Add a paragraph which explains that using a non-English bip39 mnemonic is usually a bad idea.

@junderw
Copy link
Contributor

junderw commented Dec 20, 2020

NACK for inconsistency

even though I know it won't stop this from being merged.

The conversion of the mnemonic sentence to a binary seed is completely independent from generating the sentence. This results in a rather simple code; there are no constraints on sentence structure and clients are free to implement their own wordlists or even whole sentence generators, allowing for flexibility in wordlists for typo detection or other purposes.

Although using a mnemonic not generated by the algorithm described in "Generating the mnemonic" section is possible, this is not advised and software must compute a checksum for the mnemonic sentence using a wordlist and issue a warning if it is invalid.

The described method also provides plausible deniability, because every passphrase generates a valid seed (and thus a deterministic wallet) but only the correct one will make the desired wallet available.

@iancoleman
Copy link
Contributor

Conceptual ACK since it reflects the current situation with wordlists, but it seems incomplete.

This PR states discouragement but doesn't really explain it. Specifically the phrase "If you understand this" seems like it would benefit from some further info to help readers actually "understand this".

Why are non-English wordlists discouraged?

Some reasons I can think of

  • non-ascii character sets can cause difficulties (eg unicode normalization)
  • English is supported by all wallets (true or not?) but other languages have much less wallet support (true or not?)
  • Other languages may have multiple non-official wordlists which can add significant confusion (see many PRs in this repo for examples)
  • Any others?

Despite the ACK, I would personally love to see better non-English wordlist support so am not that happy with this PR. I personally look at, say, an Italian mnemonic and feel 'I would not want to use that', which I imagine is exactly how Italian-only speakers would feel about English mnemonics.

So far I only know of the wlips repo for managing non-English wordlists, but have not inspected it closely and it doesn't seem to have gained much traction so far.

@prusnak
Copy link
Contributor Author

prusnak commented Dec 21, 2020

Why are non-English wordlists discouraged?

Vast majority of BIP39 compatible wallets don't support any other language than English. I'll update the wording in the PR

@junderw
Copy link
Contributor

junderw commented Dec 22, 2020

Vast majority of BIP39 compatible wallets [don't] support any other language than English.

To be more specific:

A vast majority of wallets claiming to be BIP39 compatible are not in fact compatible, since the BIP says issue a warning and does not say prevent seed generation.

Ironically (considering the history), the only BIP39 compliant (for recovery anyways) wallet is Electrum.

If you type gibberish, Electrum says "Checksum Verified: NO" and pops up with a warning asking "Do you want to generate the wallet anyways? We couldn't verify the checksum." and if you say yes it generates the wallet.

If every wallet did it this way, then Japanese phrases could be recovered easily on any wallet.

But because the BIP is at odds with itself (it specifies a checksum, which in traditional dev work is always a "hard fail", but says "issue a warning"... and yet everyone "hard fails" and prevents recovery if unknown wordlist / phrase, technically not following spec.) we've come to a turning point where "the BIP39 everyone follows" and "the BIP39 document" are two different standards.

I suggest we fork BIP39, BIP39 can add breaking changes to say "must hard fail" and "English only" and we split the current BIP39 document (with added emphasis to the "any wordlist should be recoverable in any app, but the wordlists you know have an added benefit of being able to check a checksum" so that people know the difference) off into another BIP.

@michaelfolkson
Copy link
Contributor

michaelfolkson commented Dec 28, 2020

Vast majority of BIP39 compatible wallets support any other language than English.

I didn't know this was true. Based on this, ACK.

Presumably you are still happy to review new language wordlist PRs to this BIP even once this PR is merged @prusnak? I know it puts you in an awkward spot given that you don't speak all these languages :)

@ZenulAbidin
Copy link
Contributor

I suggest we fork BIP39, BIP39 can add breaking changes to say "must hard fail" and "English only" and we split the current BIP39 document (with added emphasis to the "any wordlist should be recoverable in any app, but the wordlists you know have an added benefit of being able to check a checksum" so that people know the difference) off into another BIP.

The problem with forking BIP39 to make this change is that a lot of wallets aren't going to be updated to enforce this new BIP. For the rest that do, it's not easy to implement the new BIP alongside the first one, otherwise they're basically offering an option to accept a seed that may be localized, and an option to accept a seed with the requirement that it's English-only. Having both of these displayed at the same time, for example at Electrum's or Mycelium's seed recovery prompt, will confuse many wallet software users, removing support for the old BIP in favor of the new one will break everyone's localized seeds and doing nothing and continuing to use the old BIP doesn't improve the situation around checksums and localized wordlists. This is why I also think the deprecation text in the PR is the best course of action.

Then at least newer wallets that are made will hopefully take English-only seeds that enforce the checksum consistently rule.

I think Electrum's seed version system has a bright future though, and I hope more wallets use it and that a system is devised around it that lets people submit arbitrary wordlists to Electrum's list of wordlists.

@DonaldTsang
Copy link

@ZenulAbidin in that case a community BIP-39 fork would be a better idea?

@luke-jr luke-jr merged commit 3b0662a into bitcoin:master Feb 3, 2021
@prusnak prusnak deleted the bip39-wordlist-warning branch February 4, 2021 08:33
@amarett0
Copy link

If you want to know what non-English speaking users feel look at the following list. Imagine that your finances depended on having correctly pointed out one of those "strange" symbols.

https://github.com/bitcoin/bips/blob/master/bip-0039/japanese.txt

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.

8 participants