What's the best way to handle this?

7 replies 383 views
0xDiamondMember
Posts: 15 · Reputation: 209
#1Jun 2, 2022, 11:20 PM
It's pretty standard to use mnemonic phrases, or seed phrases, to create private keys when setting up a wallet. But I've been curious about generating a private key myself directly from the seed phrase without relying on the wallet software. I attempted to use the seed from an HD wallet that follows the BIP-32 standard, but I can't seem to figure out the right algorithm to generate the master key and chain code. Any advice on how to tackle this?
8 Reply Quote Share
HumbleApeFull Member
Posts: 40 · Reputation: 330
#2Jun 2, 2022, 11:34 PM
For the generation of the master keys and child keys: Use https://iancoleman.io/bip39/ offline, not online. You can use it to generate the keys and addresses from seed phrase. For offline usage: Use the html on a word editor: https://github.com/iancoleman/bip39/releases/latest/ For security reasons, use it offline on a word editor.
1 Reply Quote Share
0xFarmMember
Posts: 23 · Reputation: 160
#3Jun 3, 2022, 02:10 AM
Here is a little guide by blue Snow on how to generate your master  private key from seed phrase. Make sure you are doing it offline. Although I don’t know why you wish to generate the master private key from the seed phrase but in case of back up there is no point of backing up the master private key even though it will recover the same address as the seed phrase will do but seed phrase back is more convenient than the key.
3 Reply Quote Share
0xDiamondMember
Posts: 15 · Reputation: 209
#4Jun 3, 2022, 05:58 AM
Thanks alot Charles Tim and Zaguru12 Is there a similar script I can run on phyton?
4 Reply Quote Share
HumbleApeFull Member
Posts: 40 · Reputation: 330
#5Jun 5, 2022, 03:24 PM
I do not know much about this. You can wait for other reputed members and see what they will reply. Let me quote nc50lc so that he can see this thread. I believe he will have something good to reply.
1 Reply Quote Share
DarkAtlasMember
Posts: 9 · Reputation: 156
#6Jun 5, 2022, 05:58 PM
It is possible to run this on python aswell. You have to use mnemonic library for the BIP39 functionalities and the bip32utils library for the BIP32 key derivation. Create a new mnemonic phrase with the mnemonic library. The individual passphrase is optional. Now use the bip32utils library to derrive the masterkey and the child keys: I have used "m/44'/0'/0'/0/0" as derivation path since this path is widely used by many wallets and allows a structured way to generate multiple addresses.
3 Reply Quote Share
0xDiamondMember
Posts: 15 · Reputation: 209
#7Jun 5, 2022, 08:36 PM
Thanks a lot seek3r although I was able to use Charles-Tim help which was very very easy to use I would definitely use this phyton script also .
3 Reply Quote Share
alex.gw31Member
Posts: 33 · Reputation: 218
#8Jun 5, 2022, 10:14 PM
I do not recommend directly using private keys which are derived from the seed phrase for holding bitcoins because there is a change that you might mess up the generation process which leads to the coins becoming inaccessible. This should be done only for learning purposes. (As you hopefully already know).
2 Reply Quote Share

Related topics