If you're crossing the border into the US, customs officials have broad rights to search your phone, laptop and other electronic devices.
You can try to resist. But refusing to tell Customs and Border Protection your password might lead agents to detain you indefinitely, confiscate your devices or send you off to be deported.
A bipartisan group of US lawmakers, including privacy die-hards Sen. Ron Wyden of Oregon and Sen. Rand Paul of Kentucky, want to change that. On Tuesday, they introduced bills in the House and Senate that would require Customs and Border Protection to get a warrant based on a legal standard called probable cause.
The restriction would apply only to "US persons," which includes citizens, immigrants with permanent residence and others living legally in the US.
Right now, agents need no such warrant and can search devices even if they suspect nothing.
"Americans should not be asked to surrender their rights or privacy at the border, and our bill will put an end to the government's intrusive practices," Paul said in a statement.
Border searches have garnered increased attention lately. In January, a US citizen said he was required by border agents to unlock and turn over a phone that belonged to his employer, NASA's Jet Propulsion Lab.
In March, NBC News reported that phone searches at the border jumped from fewer than 5,000 in 2015 to 25,000 in 2016. In February alone, customs agents searched 5,000 phones, the report said.
Later in March, a group of First Amendment attorneys sued the US Department of Homeland Security and Immigration and Customs Enforcement to learn what processes and policies the agencies have in place to decide when to search electronics at the border.
There are also reports that border agents are asking for passwords to social media accounts like Facebook as people cross the border. The Wall Street Journal reported Tuesday that these types of requests might become part of the visa application process, meaning visitors to the US will have to hand over this kind of information long before they reach customs.
The bills would change the search process drastically. A warrant would require a judge's approval, meaning immediate or on-the-fly decisions to search someone's phone would be challenging to carry out.
That's the point, Wyden said in a statement.
"This bill makes sure that border agents are focused on criminals and terrorists," Wyden said, "instead of wasting their time thumbing through innocent Americans' personal photos and other data."
House members introduced their own version of the bill on Tuesday as well. Rep. Jared Polis, a Democrat from Colorado, Rep. Adam Smith, a Democrat from Washington and Rep. Blake Farenthold, a Republican from Texas support the bill.
A spokesman for Homeland Security declined to comment on the bill, saying the agency has a policy of not commenting on pending legislation.
A spokeswoman from Immigration and Customs Enforcement also declined to comment on the bill, citing a similar policy.
First published Apr. 4, 12:17 p.m. PT.
Update, 2:45 p.m.: Adds Rep. Adam Smith to list of lawmakers supporting the bills, notes that members of Congress also introduced a House version of the bill on Tuesday.
CNET Magazine: Check out a sampling of the stories you'll find in CNET's newsstand edition, right here.
Life, disrupted: In Europe, millions of refugees are still searching for a safe place to settle. Tech should be part of the solution. But is it? CNET investigates.