President Obama hosted British Prime Minister David Cameron at the White House on Friday.

MELISSA BLOCK, HOST:

We begin the hour with British Prime Minister David Cameron's warning about seemingly unbreakable codes. Cameron says that by offering customers high-tech encryption technology, companies like Facebook and Google are making it easier for would-be terrorists to avoid detection. As NPR's Scott Horsley reports, that's one of the issues Cameron raised today during a White House meeting with President Obama.

SCOTT HORSLEY, BYLINE: Obama and Cameron wrapped up their meeting with a promise to cooperate on cybersecurity. The agreement includes a friendly competition between MIT computer whizzes in Cambridge, Massachusetts, and their counterparts in Cambridge, England. Cameron is not so friendly when it comes to U.S. technology companies offering encryption that allows users to evade the prying eyes of government. The prime minister argues digital messages should be no different than phone calls that the government can tap with proper legal authority.

(SOUNDBITE OF ARCHIVED RECORDING)

PRIME MINISTER DAVID CAMERON: We're not asking for back doors. We have - we believe in very clear front doors through legal processes that should help to keep our country safe. And my only argument is that as technology develops, as the world moves on, we should try to avoid the safe havens that could otherwise be created for terrorists to talk to each other.

HORSLEY: The threat of terrorism was a dominant topic for the two leaders, meeting in the shadow of last week's deadly attacks in Paris. Obama says those attacks don't justify the wholesale dismissal of privacy concerns. But he adds he's confident the government can do a better job of balancing privacy and security.

(SOUNDBITE OF ARCHIVED RECORDING)

PRESIDENT BARACK OBAMA: I think the companies want to see that as well. They're patriots. They have families that they want to see protected.

HORSLEY: Obama says the biggest advantage the United States has in preventing Paris-style attacks is not its intelligence or law enforcement agencies, though he says both are very good. Instead, the U.S. benefits from a homegrown Muslim population that feels itself to be American.

(SOUNDBITE OF ARCHIVED RECORDING)

OBAMA: There is, you know, this incredible process of immigration and assimilation that is part of our tradition that is probably our greatest strength. Now, it doesn't mean we aren't subject to the kinds of tragedies that we saw at the Boston Marathon. But that, I think, has been helpful. There are parts of Europe in which that's not the case.

HORSLEY: Obama has long been concerned about Westerners training for terrorist attacks in places like Syria. And he says the continued chaos in that country adds to the problem. But the president rejected the idea that a U.S. invasion of Syria would've made terror attacks less likely.

He and Cameron also discussed efforts to keep economic pressure on Russia in response to its actions in Ukraine and the ongoing nuclear talks with Iran. Some members of Congress want to see tougher U.S. sanctions against Iran, but Obama told Democratic senators at a retreat this week he'll veto any such proposal.

(SOUNDBITE OF ARCHIVED RECORDING)

OBAMA: My main message to Congress at this point is just hold your fire.

HORSLEY: Obama says even the threat of more U.S. sanctions now could jeopardize negotiations and fracture the international coalition that's been assembled against Iran. Cameron agrees; he's been calling U.S. lawmakers and urging them to give diplomacy more time.

(SOUNDBITE OF ARCHIVED RECORDING)

CAMERON: A deal that takes Iran away from a nuclear weapon is better than either Iran having a nuclear weapon or military action to prevent it.

HORSLEY: Obama says if the talks with Iran fail - and he puts the odds around 50-50, there will still be time for more sanctions, as well as other, possibly military, options. Scott Horsley, NPR News, the White House.

NPR transcripts are created on a rush deadline by Verb8tm, Inc., an NPR contractor, and produced using a proprietary transcription process developed with NPR. This text may not be in its final form and may be updated or revised in the future. Accuracy and availability may vary. The authoritative record of NPR’s programming is the audio record.