US President Barack Obama
President Obama, during an exclusive interview with Reuters, warned China against passing new counterterrorism laws. Reuters/Kevin Lamarque

President Obama criticized a new Chinese counterterrorism law that makes it necessary for all U.S. technology companies to provide the government with the keys to users' data if they want to sell their products in China. The president's complaint about surveillance access comes less than two months after he suggested that the use of strong encryption in the U.S. is an issue.

Beijing's legislation would force tech providers to hand over user passcodes, encryption keys and install security “backdoors,” making it possible for the government to wiretap devices without their owners' knowledge. The law is expected to be passed in the coming weeks, with Chinese leaders saying it's necessary to protect the people of China and U.S. companies saying it highlights their ongoing fears over Beijing's intrusiveness.

“This is something that I've raised directly with President Xi. We have made it very clear to them that this is something they are going to have to change if they are going to do business with China,” Obama told Reuters in an exclusive interview published Monday. He explained that the laws “would essentially force all foreign companies, including U.S. companies, to turn over to the Chinese government mechanisms where they can snoop and keep track of all the users of those services.”

In January Obama met with U.K. Prime Minister David Cameron, who was advocating legislation that would prohibit the use of encryption. Obama didn't endorse his counterpart's plan to forbid encryption, which the technology industry has begun to embrace, but he did say it should be possible for law enforcement to obtain information about users.

“If we find evidence of a terrorist plot … and despite having a phone number, despite having a social media address or email address, we can’t penetrate that, that’s a problem,” he said, as quoted by the Wall Street Journal.