<p>BIP 32 only uses one round of HMAC-SHA512 to go from the seed to the master private key.</p>

<p>Neither of the two sources you listed are going from a seed (or passphrase) to the master private key. They are going from a mnemonic or passphrase to the seed.</p>

<p>What Mastering Bitcoin is describing is the <a href="https://github.com/bitcoin/bips/blob/master/bip-0039.mediawiki#from-mnemonic-to-seed" rel="nofollow noreferrer">BIP 39 conversion</a> from mnemonic to BIP 32 seed. From there, that seed will be put though HMAC-SHA512 one more time to get the final master private key.</p>

<p>bip32.org is using HMAC-SHA256 (which is not HMAC-SHA512) 50,000 times in order to convert the passphrase you enter into a BIP 32 seed. Again, the resulting value will be hashed one more time using HMAC-SHA512 to get the master private key.</p>

CC BY-SA 4.0
2019-01-20T00:28:16.647Z
it that means the seed (pri and pub) will be different if the procedure is a little bit different if we use a different wallet?
Carpemer
CC BY-SA 4.0
2019-01-20T02:24:56.013Z
The seed is just an integer, it is not a private-public keypair. Given two different wallets, it is possible that they go from mnemonic or passphrase to seed differently, which means that the resulting seed is different. However, if the seeds are the same, then the master private key will be the same. Also BIP 39 specifies a standard way to get the seed from a mnemonic, so wallets that use that will get the same seed and thus master private key from the same mnemonic.
Ava Chow
CC BY-SA 4.0
2019-01-20T02:43:01.527Z
Thanks for the clarification, but just feel bad if we still can not align the procedure to recover the right address from mnemonic in the cryptocurrency industry.
Carpemer
CC BY-SA 4.0
2019-01-20T06:02:51.970Z
There is no one correct way to do it. There are an infinite number of ways to go from mnemonic to seed. All people can do is to specify and standardize one way to do it. That's what BIP 39 does, and AFAIK, most wallets that people actually use that have mnemonics, do it that way.
Ava Chow
CC BY-SA 4.0
2019-01-19T17:18:48.983Z
2019-01-19T17:18:48.983Z
Ava Chow
<p>In the BIP32, it does not define the round of HMAC-SHA256. </p>

<p><img src="https://i.sstatic.net/WPu2C.png" alt="enter image description here"></p>

<p><p><p></p>

<p>In <a href="http://bip32.org/" rel="nofollow noreferrer">http://bip32.org/</a>, it use 50,000 rounds. </p>

<p>In "mastering Bitcoin", it use 2048 rounds.</p>

<p>Is there any explicit standard, or what we suppose to follow?</p>

<p>Book "Mastering Bitcoin":
<img src="https://i.sstatic.net/CZAhY.png" alt="Mastering Bitcoin"></p>

<p><a href="http://bip32.org" rel="nofollow noreferrer">http://bip32.org</a>
<img src="https://i.sstatic.net/Nv0ou.png" alt="/bip32.org"></p>

<wallet><address-generation><bip32-hd-wallets>
How many rounds of HMAC-SHA256 needed to generate the master key in BIP32
Carpemer
# How many rounds of HMAC-SHA256 needed to generate the master key in BIP32

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

In the BIP32, it does not define the round of HMAC-SHA256.

![enter image description here](https://i.sstatic.net/WPu2C.png)

In <http://bip32.org/>, it use 50,000 rounds.

In "mastering Bitcoin", it use 2048 rounds.

Is there any explicit standard, or what we suppose to follow?

Book "Mastering Bitcoin":
![Mastering Bitcoin](https://i.sstatic.net/CZAhY.png)

<http://bip32.org>
![/bip32.org](https://i.sstatic.net/Nv0ou.png)

**Tags:** wallet, address-generation, bip32-hd-wallets


---

## 1 answers

### Answer by username_1 on 2019-01-19. Score: 3 | Accepted answer

BIP 32 only uses one round of HMAC-SHA512 to go from the seed to the master private key.

Neither of the two sources you listed are going from a seed (or passphrase) to the master private key. They are going from a mnemonic or passphrase to the seed.

What Mastering Bitcoin is describing is the [BIP 39 conversion](https://github.com/bitcoin/bips/blob/master/bip-0039.mediawiki#from-mnemonic-to-seed) from mnemonic to BIP 32 seed. From there, that seed will be put though HMAC-SHA512 one more time to get the final master private key.

bip32.org is using HMAC-SHA256 (which is not HMAC-SHA512) 50,000 times in order to convert the passphrase you enter into a BIP 32 seed. Again, the resulting value will be hashed one more time using HMAC-SHA512 to get the master private key.

> **Comments:**
> **username_0**: it that means the seed (pri and pub) will be different if the procedure is a little bit different if we use a different wallet?  
> **username_1**: The seed is just an integer, it is not a private-public keypair. Given two different wallets, it is possible that they go from mnemonic or passphrase to seed differently, which means that the resulting seed is different. However, if the seeds are the same, then the master private key will be the same. Also BIP 39 specifies a standard way to get the seed from a mnemonic, so wallets that use that will get the same seed and thus master private key from the same mnemonic.  
> **username_0**: Thanks for the clarification, but just feel bad if we still can not align the procedure to recover the right address from mnemonic in the cryptocurrency industry.  
> **username_1**: There is no one correct way to do it. There are an infinite number of ways to go from mnemonic to seed. All people can do is to specify and standardize one way to do it. That's what BIP 39 does, and AFAIK, most wallets that people actually use that have mnemonics, do it that way.  

---

