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

Whitespace in input mnemonic produces different seed #58

Closed
lrettig opened this issue Jul 11, 2023 · 1 comment · Fixed by #59
Closed

Whitespace in input mnemonic produces different seed #58

lrettig opened this issue Jul 11, 2023 · 1 comment · Fixed by #59

Comments

@lrettig
Copy link
Member

lrettig commented Jul 11, 2023

The BIP39 spec doesn't say anything about how to handle whitespace. The library we're using, https://github.com/tyler-smith/go-bip39, does different things with whitespace depending on how you use it. We should probably ignore all whitespace and split the mnemonic into a list of words before turning it into a seed. We currently trim whitespace at the beginning and end of the mnemonic but not intermediate whitespace.

@lrettig
Copy link
Member Author

lrettig commented Jul 11, 2023

Fixed in #59. We're not the first to get bitten by this, see:

iov-one/weave#923
iov-one/weave@fd82cc9#diff-6569bb577f21a71b8e731cb7dc0f2b24R96
tyler-smith/go-bip39#29

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 a pull request may close this issue.

1 participant