JPL employee Sidd Bikkannavar did not want to do that. The rocket science company rules demand that he protects the information on the device, which given the nature of the organisation is totally understandable.
The US Customs and Border Patrol insisted though, and Bikkannavar had to cave after being detained for hours.
JPL is apparently not happy about the data breach (again, understandably so) and is analysing the smartphone to see what was accessed on it - Bikkannavar is a scientist at JPL, and it's a safe bet that his device contained confidential information.
Smartphones hold the key to so many aspects of our lives, from personal affairs to our political views, finances and work. It's not just about you, but everyone you're connected to, and whose details are in the smartphone. Handing over a device loaded with all that to a stranger in a foreign country must be an awful feeling.
No, you shouldn't trust government agents here - this is why we have warrants and other legal processes to stop abuse.
There's no way out of this either if you want to travel. Arriving with no devices, and closing down social media accounts beforehand is a red flag that shows you really do have something to hide.
Showing up with clean devices and anodyne social media postings is likely to arouse suspicion because that's not how people behave online.
In fact, it could be seen as lying to border authorities on arrival, which you should never do, ever.
The only realistic fix is not to travel, or to minimise overseas trips. Security researchers, and yes they are more paranoid than most, already avoid US airports for that reason.
Making people choose between protecting their personal and professional lives and travelling is arguably not the intention of any country's security policy, but that is what will happen. It cuts both ways too, affecting people who go overseas and who return to their home countries.
It could also be costly. Trump's "Muslim Ban" executive order hit airlines hard with an estimated NZ$250 million worth of flight bookings vanishing in the aftermath.
New Zealand has had to have that discussion already and adjust the balance towards privacy. When the new Customs Bill passes, Customs will have to have "reasonable suspicion or belief" that something criminal is taking place at the border before making you hand over personal electronics and the passwords for them.
Unfortunately, the Trump administration didn't think that far, and an executive order was issued to specifically Strip away privacy protections for foreigners.
The Privacy Commissioner's Office pointed out though that if Customs has a reasonable cause to believe there's evidence on your smartphone, the bill proposes an obligation to assist by handing over pass codes - failure to do so would be punished by a maximum fine of $5,000.
In comparison, Trump administration on the other decided that even some protection was too much and issued an executive order to specifically strip away privacy rights for foreigners.
We'll see how far that executive order will be implemented, but if going to the US means having your privacy violated, you're going to think twice before booking that air fare.