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

Support 12-word (128 bit) BIP39 mnemonic strings #27

Open
lemois-1337 opened this issue Jan 10, 2024 · 0 comments
Open

Support 12-word (128 bit) BIP39 mnemonic strings #27

lemois-1337 opened this issue Jan 10, 2024 · 0 comments
Labels
enhancement New feature or request good first issue Good for newcomers
Milestone

Comments

@lemois-1337
Copy link
Collaborator

What it is?
Currently we support in karlsenwallet only 256 bit BIP39 mnemonics. The bit size is configured at:

const bip39BitSize = 256

Why it is needed?
It would be very beneficial for the user to specify the entropy (bit size) during wallet creation and/or import to make it portable and allow using it in paper wallet, mobile wallet, web wallet and Node.js CLI wallet. At the end we will support 12- and 24-word mnemonics in all wallet implementations to get full interoperability.

How it should be implemented?
We need to add a new CLI parameter --entropy to the create command for the following operations.

  1. Creation of the wallet:
    karlsenwallet create --entropy 128 will create wallet with 12-word seed phrase
    karlsenwallet create --entropy 256 will create wallet with 24-word seed phrase

  2. Import of the wallet
    karlsenwallet create --import --entropy 128 will import wallet with 12-word seed phrase
    karlsenwallet create --import --entropy 256 will import wallet with 24-word seed phrase

  3. Dump of the mnemonic
    karlsenwallet dump-unencrypted-data will dump the mnemonic either in 12- or 24-word.

The create -h command must be extended as well to explain entropy difference

Additional Information
https://github.com/tyler-smith/go-bip39

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

1 participant