def get_password_for_storage_encryption(self) -> str: derivation = get_derivation_used_for_hw_device_encryption() derivation_list = bip32.convert_bip32_path_to_list_of_uint32(derivation) xpub = self.bitbox02_device.electrum_encryption_key(derivation_list) node = bip32.BIP32Node.from_xkey(xpub, net = constants.BitcoinMainnet()).subkey_at_public_derivation(()) return node.eckey.get_public_key_bytes(compressed=True).hex()
def get_password_for_storage_encryption(self) -> str: # note: using a different password based on hw device type is highly undesirable! see #5993 derivation = get_derivation_used_for_hw_device_encryption() xpub = self.get_xpub(derivation, "standard") password = Xpub.get_pubkey_from_xpub(xpub, ()).hex() return password