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 support for ECDSA #43

Open
jasny opened this issue May 2, 2022 · 0 comments
Open

BIP39 support for ECDSA #43

jasny opened this issue May 2, 2022 · 0 comments

Comments

@jasny
Copy link
Member

jasny commented May 2, 2022

Support BIP39 for generating private keys. For ECDSA, BIP39 should be the only method available for seeding.

https://levelup.gitconnected.com/blockchain-series-how-metamask-creates-accounts-a8971b21a74b

The current keyPairFromSeed method should be removed. Create a new class Bip39ECDSA, specifically for seeding.

To test if the implementation is correct

  • Generate a new account using MetaMask (or another Ethereum wallet that uses BEP39)
  • Get the 12 (or 24) word seed
  • Use the seed to generate an ECDSA keypair using Seasalt
  • Convert the public key into an ethereum address. See docs.

    You get a public address for your account by taking the last 20 bytes of the Keccak-256 hash of the public key and adding 0x to the beginning.

  • The address should be the same address as shown in MetaMask
@jasny jasny mentioned this issue May 2, 2022
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

No branches or pull requests

1 participant