While it's true that the legality of law enforcement forcing passwords in unclear, courts can absolutely force you to enter a password even if it's not written down by holding you in contempt indefinitely.

>courts can absolutely force you to enter a password even if it's not written down by holding you in contempt indefinitely.

This is not true outside of a narrow exception. Indeed this is the core point of the 5th Amendment, to protect you from having to be witness against yourself. It's just as binding on the judicial branch as it is on the executive. Ordinarily, a court may not compel a defendant to testify or say something that could incriminate them.

The narrow exception is the "foregone conclusion doctrine", which allows compelling testimony about specific evidence the government legally knows exists, knows the defendant controls access to, and knows is authentic. All of which has a bunch of caselaw around it. The textbook example is somebody has a device open, and an officer directly witnesses illegal material on it, but before they can seize it the person manages to turn it off and now it cannot be accessed without a password. So the government can say "we witnessed this specific illegal material, and this device is owned by the defendant and we can prove from video that they have accessed the device, and we want access to that specific material". But if you're just crossing the border with a locked device, they cannot compel the password just to search through it, or even if they're suspicious of something specific. They need actual knowledge, either through their own evidence or because the person foolishly talks and confesses something.

Otherwise they can definitely physically seize the device for a time (which could be very inconvenient/expensive depending) but that's it.

There are lot cases where it is proven that you don't have any legal protection on border crossings.

>There are lot cases where it is proven that you don't have any legal protection on border crossings.

Assuming "you" here refers to US citizens, there are actually no such cases, because it is not true that we don't have any legal protection at the border. Quite the contrary! There are certainly cases covering how certain protections are reduced, but that's a long way from nothing. Most importantly and foundational, all US citizens have an absolute right to return at a land border crossing, even without any form of ID or the like. You cannot be kept out. Without appropriate ID it may take longer to verify you and they can check. If there's probable cause for a crime, or an active warrant, then of course they can arrest you, but that process then plays out domestically same as if you'd been arrested at home. They can examine and seize physical goods with cause, but you can then challenge that and ultimately get it back. But they can't keep you out, whether you voluntarily cooperate or not, and they can't arrest you without all the same domestic legal justification and process.

I don't want to understate that the amount of trouble and financial challenge that in principle border patrol can impose/get away with can be substantial for a lot of people. Someone might be in a rush to catch some connecting leg of their journey, or have responsibilities at home/work that are time sensitive. Not everyone by a long shot can afford to be without their phone/notebook/equipment for days/weeks/months. Not everyone can afford serious legal representation and the resulting time sink. Etc etc. But even so ultimately we do have legal protections that we can all make use of and can stand upon.

[deleted]