If I travel abroad and am concerned that when I land in the foreign country they may try to install a digital keylogger, does this work as a potential solution: If I sign my entire computer's hard disk using for example Keybase's code signing mechanism for directories (I know there are lots of issues here, just bear with me for a second) would this a reasonable method to know that no digital keyloggers or other malicious software are installed? Of course it would not resolve the issue that if (for example) I leave my computer in my hotel room someone may install a physical keylogger or other malicious device in the hardware itself, but I would know for example that none of the data on my computer was tampered with or altered.
Some other issues with this approach are that it would take a long time to compute the signature of literally every file on your computer, and also that in the general scheme of things actually using your computer, the size and contents of files (esp. system files) can change at any time behind the scenes.