Verify that WIF corresponds with bip32 extended public key 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, &quot;some password generated by brute force&quot;);

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?
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.