"...Then, before you cross the border, make sure you don’t have the SIM card that allows you—or customs officials—to receive that text message, essentially denying yourself the ability to cooperate with agents even if you wanted to. Zdziarski suggests mailing yourself the SIM card, or destroying it and then recovering the accounts with backup codes"
https://www.wired.com/2017/02/guide-getting-past-customs-dig...
Kennywinker's comment is right that technological cleverness won't help much here. Carry no devices, and you are suspicious and/or non-cooperative (unless you are over the age of sixty). Carry devices with no data, and you are suspicious and/or non-cooperative. Carry devices with carefully prepared fake profiles and datasets and you might pass muster… or be regarded as suspicious, non-cooperative, and/or actively resisting (if the border agent judging you suspects he is seeing fake data).
I wonder how they are trained to react to people without social media accounts.
Not just because they can't. Because you specifically took steps to prevent them from doing it.
... or I'm travelling with my local SIM to avoid roaming charges?
Also — you left your home country SIM at home because you don't care about the roaming charges back home getting to/returning from the airport?
Because I don't want to lose it. This is exactly how I've travelled before hearing that this 'handover your passwords' existed.
No roaming charges because it's not being used - I can live without a very functional phone between the WiFi at the airport in my home country, and home.
(Actually, right now I don't even carry the dumbphone that has my SIM it. I'm content with WiFi.)
I legitimately don't know many of my passwords, there's no legal obligation to know them, and the law generally cant compel you to do impossible things (eg, tell them something you don't know).
They can subpoena my password safe, just like any other file on my computer, and possibly require I unlock it (this is disputed), but I don't see any reason they can demand I reproduce the contents of the safe that I don't know.
[1] (b) Every alien 10/ (other than a nonimmigrant described in subparagraph (L) or (V) of section 101(a)(15), and other than a nonimmigrant described in any provision of section 101(a)(15)(H)(i) except subclause (b1) of such section) shall be presumed to be an immigrant until he establishes to the satisfaction of the consular officer, at the time of application for a visa, and the immigration officers, at the time of application for admission, that he is entitled to a nonimmigrant status under section 101(a)(15) .
When you're a foreigner attempting to enter the USA, they can simply deny you entry for failing to do what they want. US CBP has the authority to make arbitrary decisions not to admit foreigners, and CBP faces almost no scrutiny.
Most other countries give their border guards similar authority with respect to foreigners not entitled to enter by some treaty (e.g. EU).
But in the UK, you can go to jail for not disclosing your cryptographic keys. https://en.wikipedia.org/wiki/Key_disclosure_law#United_King...
Here is a story of a person who went to jail for not disclosing his keys: http://www.theregister.co.uk/2009/11/24/ripa_jfl/?page=1 He said he kept silent "because of principle", but I guess he might also have gone to jail if he told them "I don't remember" - Officers would not believe him anyway.
If you can call a lawyer and don't mind waiting several hours, you can challenge it. However most people don't have a lawyer and don't know what to do and are afraid of the officers.
Also, clever technical solutions won't help when not having any data is seen as suspicious.
Like, you cannot tell them "I don't know my passowrds. They are in a password safe, and I do not have access right now". When the law says you have to hand over your passwords, "I don't know them right now" is probably not a valid excuse anyway.