def get_pubkey_bytes(self) -> Tuple[Optional[bytes], bytes]:
        """
        returns pubkey, salt
        returns None, None if the pubkey has not been set
        """
        if sys.platform in ['windows', 'win32']:
            import winreg
            with winreg.ConnectRegistry(None, winreg.HKEY_LOCAL_MACHINE) as hkey:
                try:
                    with winreg.OpenKey(hkey, r"SOFTWARE\\Electrum") as key:
                        key_hex = winreg.QueryValue(key, "PluginsKey")
                except Exception as e:
                    self.logger.info(f'winreg error: {e}')
                    return None, None
        elif 'ANDROID_DATA' in os.environ:
            return None, None
        else:
            # treat unknown platforms as linux-like
            if not os.path.exists(self.keyfile_posix):
                return None, None
            if not self._has_root_permissions(self.keyfile_posix):
                return
            with open(self.keyfile_posix) as f:
                key_hex = f.read()
        try:
            key = bytes.fromhex(key_hex)
            version = key[0]
        except Exception:
            self.logger.exception(f'{key_hex=} invalid')
            return None, None
        if version != PLUGIN_PASSWORD_VERSION:
            self.logger.info(f'unknown plugin password version: {version}')
            return None, None
        # all good
        salt = key[1:1+32]
        pubkey = key[1+32:]
        return pubkey, salt

        returns pubkey, salt
        returns None, None if the pubkey has not been set
        
electrum/plugin.py