<p>Bitcoind does not support BIP39, which encodes a seed (128, 160, 192, 224, 256 bits) in a mnemonic phrase, from which the 512b HD root seed is later generated via PBKDF2 (Password-Based Key Derivation Function 2). This 512b root seed is used to derive the (extended) master keys.</p>

<p>For wallets without BIP39, the 512b HD root seed is directly supplied as entropy, without the intermediary step involving an encoded mnemonic phrase and PBKDF2. </p>

<p>Backing up the wallet.dat file.
<a href="https://bitcoin.stackexchange.com/a/22722/90088">https://bitcoin.stackexchange.com/a/22722/90088</a> </p>

<p><strong>Amended:</strong>
Bitcoin Core wallets will deterministically derive new extended key pairs and addresses as wallet usage progresses, which is reflected and updated in the wallet.dat file. However, when restoring a wallet from an older wallet file, the wallet will (re)derive all standard child key derivation paths, whilst (re)scanning the blockchain to determine past usage of these keys in transactions, thereby recreating the last used hd wallet state. The wallet can be fully restored, even if the wallet file backup is not the most recent one because of this rescan.</p>

CC BY-SA 4.0
2019-01-20T16:23:58.060Z
So could you expand on ` the 512b HD root seed is directly supplied as entropy`? The 512b HD root seed is randomly generated.  What's used for the randomness(entropy)?
dvg
CC BY-SA 4.0
2019-01-20T16:25:16.450Z
And that means that I have to continously make backups from my keys because I don't have a seed ?
dvg
CC BY-SA 4.0
2019-01-20T17:03:25.573Z
@dvg New Bitcoin Core wallets do use BIP32 (with hardened derivation), so the keys are deterministic, and you don't need a new backup all the time. There just is no text form of the master key.
Pieter Wuille
CC BY-SA 4.0
2019-01-20T17:24:43.433Z
@PieterWuille Thanks. I have amended the answer accordingly.
James C.
CC BY-SA 4.0
2019-01-20T18:11:36.393Z
Thx @PieterWuille & JamesC.  for the helpful responses!
dvg
CC BY-SA 4.0
2019-01-20T16:06:38.123Z
2019-01-20T17:23:56.917Z
2019-01-20T17:23:56.917Z
James C.
<p>My question is how the bitcoin core client generates a (master) private key(s)?</p>

<p>I know from other wallets, that they take the mnemonic and generate a HD wallet master key. With the master key, the other keys can be generated.</p>

<p>To my question. How does the bitcoin core software do it? I've never seen a mnemonic there.</p>

<ul>
<li>Does it use a mnemonic?</li>
<li>I know about the <code>backupwallet</code> command to make a backup.<br>
Is there nothing like a mnemonic I can use? If there isn't, do I have to constantly do backups?</li>
</ul>

<bitcoin-core><bitcoind><wallet><private-key><mnemonic-seed>
How does `bitcoind` generate the private key?
dvg
# How does `bitcoind` generate the private key?

(Asked by: username_0 on 2019-01-20)

My question is how the bitcoin core client generates a (master) private key(s)?

I know from other wallets, that they take the mnemonic and generate a HD wallet master key. With the master key, the other keys can be generated.

To my question. How does the bitcoin core software do it? I've never seen a mnemonic there.

* Does it use a mnemonic?
* I know about the `backupwallet` command to make a backup.  
  Is there nothing like a mnemonic I can use? If there isn't, do I have to constantly do backups?

**Tags:** bitcoin-core, bitcoind, wallet, private-key, mnemonic-seed


---

## 1 answers

### Answer by username_1 on 2019-01-20. Score: 2 | Accepted answer

Bitcoind does not support BIP39, which encodes a seed (128, 160, 192, 224, 256 bits) in a mnemonic phrase, from which the 512b HD root seed is later generated via PBKDF2 (Password-Based Key Derivation Function 2). This 512b root seed is used to derive the (extended) master keys.

For wallets without BIP39, the 512b HD root seed is directly supplied as entropy, without the intermediary step involving an encoded mnemonic phrase and PBKDF2.

Backing up the wallet.dat file.
<https://bitcoin.stackexchange.com/a/22722/90088>

**Amended:**
Bitcoin Core wallets will deterministically derive new extended key pairs and addresses as wallet usage progresses, which is reflected and updated in the wallet.dat file. However, when restoring a wallet from an older wallet file, the wallet will (re)derive all standard child key derivation paths, whilst (re)scanning the blockchain to determine past usage of these keys in transactions, thereby recreating the last used hd wallet state. The wallet can be fully restored, even if the wallet file backup is not the most recent one because of this rescan.

> **Comments:**
> **username_0**: So could you expand on ` the 512b HD root seed is directly supplied as entropy`? The 512b HD root seed is randomly generated.  What's used for the randomness(entropy)?  
> **username_0**: And that means that I have to continously make backups from my keys because I don't have a seed ?  
> **username_2**: @username_0 New Bitcoin Core wallets do use BIP32 (with hardened derivation), so the keys are deterministic, and you don't need a new backup all the time. There just is no text form of the master key.  
> **username_1**: @username_2 Thanks. I have amended the answer accordingly.  
> **username_0**: Thx @username_2 & JamesC.  for the helpful responses!  

---

