<p>You could and it's probably not a direct security issue, but it's a senseless waste of time trying to find it again. Keep in mind that doing this destroys the PBKDF2 key stretching used in the seed needlessly. Electrum stores a checksum with their 12 word seed (making it a 13 word seed) if you really desire that functionality, though it's clear if you have it right when the money in that wallet is restored. </p>

CC BY-SA 3.0
2015-06-09T04:57:57.520Z
Careful! Electrum 2.x **is not BIP39**. Closer to BIP39 than Electrum 1.x, but no cigar
Wizard Of Ozzie
CC BY-SA 3.0
2015-06-08T06:25:10.170Z
2015-06-08T06:25:10.170Z
Claris
<p>It is probably not a serious risk, assuming your passphrase really does have as much entropy as you say, though it doesn't seem to offer many real benefits either.  If you want to be able to check if you remember the passphrase, why not just keep the hash somewhere that only you can access?  Making it public can only increase your risks (though probably not significantly).</p>

<p>The main difference is this.  Suppose your passphrase has N bits of entropy, and someone is trying to brute-force it.</p>

<ul>
<li><p>If they have access to the hash, then for each phrase they try, they only have to perform two SHA256 computations.  Such operations can be done relatively fast, e.g. by some variant of a mining ASIC.</p></li>
<li><p>If they don't have the hash, then for each phrase they try, they have to compute a seed from the phrase, generate a sufficiently large number of private keys from the seed, compute their corresponding public keys and addresses, and look them up in a blockchain index to see if any of those addresses contain coins.  This is going to be many orders of magnitude slower than just computing 2 x SHA256.</p></li>
</ul>

<p>So publishing the hash significantly reduces the amount of work a brute-force attacker would have to do.</p>

<p>Now, if your passphrase really does have N=128 bits of entropy, then the distinction is not really meaningful, since computing 2^N iterations of SHA256 is still effectively impossible.  But if there is some possibility that N could be much smaller (e.g. your RNG is buggy or compromised), then in principle, publishing the hash could be the difference between a brute-force attack being cost effective or not.</p>

CC BY-SA 3.0
2015-07-08T07:09:32.200Z
2015-07-08T07:09:32.200Z
Nate Eldredge
<p>According to <a href="https://github.com/bitcoin/bips/blob/master/bip-0039.mediawiki" rel="nofollow">https://github.com/bitcoin/bips/blob/master/bip-0039.mediawiki</a> a 12 word BIP39 passphrase has entropy of 128 bits.</p>

<p>My reason for doing so is that when I want check if I memorized my passphrase correctly, I could just check it against the hash instead of having to generate the HD wallet addresses and checking its balance.</p>

<p>So is it safe to store a double sha256 hash of my BIP39 seed on the blockchain?</p>

<mnemonic-seed>
Is it safe to store a sha256 hash of my BIP39 seed on the blockchain?
User134
# Is it safe to store a sha256 hash of my BIP39 seed on the blockchain?

(Asked by: username_0 on 2015-06-08)

According to <https://github.com/bitcoin/bips/blob/master/bip-0039.mediawiki> a 12 word BIP39 passphrase has entropy of 128 bits.

My reason for doing so is that when I want check if I memorized my passphrase correctly, I could just check it against the hash instead of having to generate the HD wallet addresses and checking its balance.

So is it safe to store a double sha256 hash of my BIP39 seed on the blockchain?

**Tags:** mnemonic-seed


---

## 2 answers

### Answer by username_1 on 2015-06-08. Score: 3

You could and it's probably not a direct security issue, but it's a senseless waste of time trying to find it again. Keep in mind that doing this destroys the PBKDF2 key stretching used in the seed needlessly. Electrum stores a checksum with their 12 word seed (making it a 13 word seed) if you really desire that functionality, though it's clear if you have it right when the money in that wallet is restored.

> **Comments:**
> **username_2**: Careful! Electrum 2.x **is not BIP39**. Closer to BIP39 than Electrum 1.x, but no cigar  

---

### Answer by username_3 on 2015-07-08. Score: 1

It is probably not a serious risk, assuming your passphrase really does have as much entropy as you say, though it doesn't seem to offer many real benefits either. If you want to be able to check if you remember the passphrase, why not just keep the hash somewhere that only you can access? Making it public can only increase your risks (though probably not significantly).

The main difference is this. Suppose your passphrase has N bits of entropy, and someone is trying to brute-force it.

* If they have access to the hash, then for each phrase they try, they only have to perform two SHA256 computations. Such operations can be done relatively fast, e.g. by some variant of a mining ASIC.
* If they don't have the hash, then for each phrase they try, they have to compute a seed from the phrase, generate a sufficiently large number of private keys from the seed, compute their corresponding public keys and addresses, and look them up in a blockchain index to see if any of those addresses contain coins. This is going to be many orders of magnitude slower than just computing 2 x SHA256.

So publishing the hash significantly reduces the amount of work a brute-force attacker would have to do.

Now, if your passphrase really does have N=128 bits of entropy, then the distinction is not really meaningful, since computing 2^N iterations of SHA256 is still effectively impossible. But if there is some possibility that N could be much smaller (e.g. your RNG is buggy or compromised), then in principle, publishing the hash could be the difference between a brute-force attack being cost effective or not.


---

