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?