President Barack Obama called on the tech community to build a safe encryption key to assist in law enforcement investigations, saying that if it failed, it could one day face a more draconian solution passed by a Congress that is less sympathetic to its worldview. The president said he could not comment on the FBI's current fight with Apple over its demand that the company build software to unlock data on an iPhone used by one of the alleged San Bernardino shooters. But he spoke broadly about the need to balance privacy and security, and warned that absolutist views on both sides are dangerous.

If the tech community does not find a way to help law enforcement in a narrow range of cases, he said, a future incident could spark a backlash that leads to less encryption overall. "What will happen is, if everybody goes to their respective corners, and the tech community says ‘either we have strong perfect encryption or else it's Big Brother and an Orwellian world', what you'll find is that after something really bad happens, the politics of this will swing and it will become sloppy and rushed and it will go through Congress in ways that are dangerous and not thought through," the president said.

Obama said discussions of encryption had become more difficult since the revelations of Edward Snowden about the National Security Agency's data collection practices. "I understand that that raised suspicions," he said. "We're concerned about privacy. We don't want [law enforcement] to be poking through people's phones willy-nilly."

"It's fetishizing our phones above every other value."

But the president complained that tech companies were taking an "absolutist" view of encryption, saying that unlocking a single iPhone would make true privacy or security impossible for anyone who owns one. "My conclusion so far is you cannot take an absolutist view own this," Obama said. "If your argument is strong encryption no matter what, and we can and should in fact create black boxes, that I think does not strike the kind of balance we have lived with for 200, 300 years. And it's fetishizing our phones above every other value. That can't be the right answer. I suspect the answer is going to come down to how do we create a system where the encryption is as strong as possible, the key is as secure as possible, it is accessible by the smallest number of people possible, on a subset of issues we deem is important."

The president's comments come during a week when Apple's fight with the FBI became openly hostile. In a conference call with reporters this week, Apple's general counsel said the FBI had unfairly vilified the company for arguing for strong encryption. "Everyone should beware, because it seems like disagreeing with the Department of Justice means you must be evil and anti-American," Bruce Sewell said.

Obama made his remarks during an interview with Evan Smith, editor of the Texas Tribune, in front of about 2,000 people at the Long Center for the Performing Arts in Austin. His talk marked the first time a sitting president has attended SXSW, the annual festival of tech, film, music, and brands.