How to protect your own data from physical access, but especially if you are in a country where you have to disclose your passwords.
First of all, we need to distinguish between two situations:
-
if it would be illegal to force a person to give out their password, except at the border, airports, train stations (locations where the police sometimes have extra powers and are also locations to enter a country). This is currently the case in countries like the USA or New Zealand (but not limited to those two).
-
if you can always be forced to disclose all known passwords.
In the first case, it is sufficient to enter the country without electronic devices and then buy the necessary devices locally or send them to yourself by post before departure.
However, it is important to note that if you are not in one of the places mentioned above, such as an airport or border crossing where you can be forced to hand over your password, it is still possible for the authorities to use software from companies such as Cellebrite to exploit 0 day exploits to gain access to your devices.
The best defense against this would be for smartphones GrapheneOS with a strong passphrase, for Linux LUKS (LUKS2) also with a strong passphrase. VeraCrypt would be best for Windows. But remember, the encryption is only as strong as your password.
In the second case, this is much more difficult, as it can always happen that the authorities demand the disclosure of all known passwords and, depending on which country you are in, this does not require a court order.
In this case, it would be best to store sensitive information on a device with VeraCrypt, as this can be used to create a hidden volume.
So if you are forced to reveal the password, it is possible to decrypt only a part of the volume and thus hide the true content, as this requires a different password. However, it would not be possible to prove that another encrypted part exists in the same volume. This is deniability through encryption.
For mobile devices I see hardly any way to protect yourself, there is the possibility to wipe all data on it, but then you will be prosecuted for destroying evidence and obstructing the police.
You can perhaps store everything important in a cloud and access it through the mobile browser, which is set to delete all data after closing the app.