CBP can detain you for refusing to allow a search but "we're talking a matter of hours, certainly not an overnight detention," Bhandari said. "There doesn’t seem to be a bright-line rule, but we're talking hours, not days."
Ultimately, if you're a legal U.S. resident, CBP shouldn't prevent you from entering the country, even if you refuse to allow the device search, Bhandari said.
Still, expect to have your device seized if you refuse to unlock it. Travelers will often have to choose, she said. "Would they rather turn over their password and have a quick search vs. refusing and having their device seized?" she added.
Finally, there's been some discussion among technologies about using a separate encryption scheme for sensitive files on laptops or smartphones. While there's no real consensus, some privacy experts suggest that having a separate encrypted section of your hard drive may raise a red flag for CBP agents. It may be safer to store those files on another device or in the cloud.
Sign up for CIO Asia eNewsletters.