<blockquote>
<p>This is for a multi sig 2 of 2 wallet. One of the keys is bip39 which I have the mnemonic seed for, the other is the bip38 which I do not. What do I do with this decrypted private key in order to validate that I used the correct password during decryption?</p>
</blockquote>
<p>A couple things.</p>
<p>Your encrypted bip38 private key will not decrypt with an incorrect password, so you'll know you are using the correct password if the decryption is successful.</p>
<p>Additionally, for multisig wallets it is very important that you save the redeemscript after initial creation. If you didn't you can re-create it, but you need to know the public keys that were used to create the wallet AND the order they were used in the multisig wallet.</p>
<p>If you are able to decrypt your bip38 key you can take the resulting WIF and calculate the public key and then you recreate the multisig address and it's redeemscript to see if it matches. If not trying switching the order of public keys.</p>

CC BY-SA 4.0
2021-03-05T03:54:23.530Z
2021-03-05T03:54:23.530Z
m1xolyd1an
<p>I have a bip38 encrypted private key that I lost the password to, and I have its corresponding extended public key. I want to brute force passwords as I have an idea of what it might be, but I need to check if the decrypted private key is valid. This is for a multi sig 2 of 2 wallet. One of the keys is bip39 which I have the mnemonic seed for, the other is the bip38 which I do not.</p>
<pre><code>const decryptedKey = bip38.decrypt(encryptedPrivateKey, &quot;some password generated by brute force&quot;);
</code></pre>
<p>What do I do with this decrypted private key in order to validate that I used the correct password during decryption? I know I cannot just convert it to bip32 and then check if the xpubs match, but is there a way I can validate this so I know if the password is correct?</p>

<private-key><multi-signature><bip32-hd-wallets><wallet-recovery><bip38>
Verify that WIF corresponds with bip32 extended public key
user116710
# Verify that WIF corresponds with bip32 extended public key

(Asked by: username_0 on 2021-03-05)

I have a bip38 encrypted private key that I lost the password to, and I have its corresponding extended public key. I want to brute force passwords as I have an idea of what it might be, but I need to check if the decrypted private key is valid. This is for a multi sig 2 of 2 wallet. One of the keys is bip39 which I have the mnemonic seed for, the other is the bip38 which I do not.

```
const decryptedKey = bip38.decrypt(encryptedPrivateKey, "some password generated by brute force");

```

What do I do with this decrypted private key in order to validate that I used the correct password during decryption? I know I cannot just convert it to bip32 and then check if the xpubs match, but is there a way I can validate this so I know if the password is correct?

**Tags:** private-key, multi-signature, bip32-hd-wallets, wallet-recovery, bip38


---

## 1 answers

### Answer by username_1 on 2021-03-05. Score: 1

> This is for a multi sig 2 of 2 wallet. One of the keys is bip39 which I have the mnemonic seed for, the other is the bip38 which I do not. What do I do with this decrypted private key in order to validate that I used the correct password during decryption?

A couple things.

Your encrypted bip38 private key will not decrypt with an incorrect password, so you'll know you are using the correct password if the decryption is successful.

Additionally, for multisig wallets it is very important that you save the redeemscript after initial creation. If you didn't you can re-create it, but you need to know the public keys that were used to create the wallet AND the order they were used in the multisig wallet.

If you are able to decrypt your bip38 key you can take the resulting WIF and calculate the public key and then you recreate the multisig address and it's redeemscript to see if it matches. If not trying switching the order of public keys.


---

