The U.S. intelligence agency’s bulk data collection efforts and the government’s “slow” response have strained the White House’s relationship with Silicon Valley, President Barack Obama said on Friday.

Obama said his relationship with Silicon Valley and the tech community has historically been pretty good. But the revelations of the National Security Agency’s mass data collection by former contractor Edward Snowden “were really harmful in terms of the trust between government and many of these companies, in part because of the impact it had on their bottom lines.”

The president made the remarks in a wide-ranging interview with Re/code’s Kara Swisher in Silicon Valley, where he headlined a first-ever White House summit on cyber security issues and was scheduled to attend a Democratic party fundraiser.

The interview touched on everything from cyber warfare to the president’s quandary over which fitness tracker to road test.

These strained relations between the White House and Silicon Valley were placed in sharp focus Friday after the chief executives of Google, Facebook, Microsoft and Yahoo declined White House invitations to attend the summit — and a private lunch with the president.

These companies are among a number of tech giants that have pushed Washington to end the bulk collection of private data because of customer privacy concerns, but little has happened to curb the NSA’s practices.

The White House’s cyber security gathering, which took place at Stanford University, marked the first time the administration has hosted a summit with corporate, government and privacy officials to discuss issues around how to protect U.S. computer systems as well as consumers’ privacy.

The recent alleged attack by North Korea on Sony Pictures Entertainment was a major impetus for the summit because it showed how unprepared companies were to protect their networks from malicious attacks. Hackers collected more than a billion personal data records in a record 1,541 data breaches last year, according to digital security company Gemalto.

Attacks on companies like Sony aren’t acts of war, the president said, but “I would consider them acts of property damage [and] commercial theft that are serious, and whenever a criminal act like that is state-sponsored, it’s a problem.”

North Korea’s alleged attacks were more serious than data breaches caused by hackers who aren’t state-sponsored, the president said, because they caused actual damage to Sony’s tech systems. Similar attacks on the nation’s electric grid, air traffic control system or financial systems could be far more devastating.

“It’s not like North Korea is particularly good at this, but look at the damage they can do,” he said. “China and Russia are very good. Iran is good.”

Many companies simply aren’t able to protect themselves against those sorts of attacks, and there needs to be cooperation between the government and industry when they happen. “We’re hugely vulnerable,” he said. “We’ve started with critical infrastructure — that’s an area with heavy involvement with those industries, whether it’s Wall Street and the financial sector, utilities, our air traffic control system, all of that increases our [dependence] on the digital base that they’re working on.”

“One of the challenges is a lot of this is private sector; the vast bulk of it is private sector. The government has to be able to not only work with each individual company, but you’ve got to be able to pull those companies together so they’re working together more effectively,” he said.

“One of the things that makes it such a challenging problem is all you need is one weak link,” he continued. “You can have nine companies that have great protocols, authentication systems, you name it, and then you have one that’s not doing a good job and that penetrates the entire system.”

“As I mentioned in the CEO roundtable, a comment that was made by one of my national security team — this is more like basketball than football in the sense that there’s no clear line between offense and defense. Things are going back and forth all the time,” he said. “We have great capabilities here, but there are other countries that have great capabilities as well.”

Earlier in the day at the summit, Apple CEO Tim Cook spoke about the need for stronger protections for consumers who are routinely finding their data compromised by hackers. Apple and Google have both been criticized by the Obama administration and British government for new encryption technologies that have been built into mobile operating systems which would make it impossible for them to turn over customer data to law enforcement.

The president said he understood why the companies had taken those steps. While the needs of law enforcement have to be weighed against Americans’ civil liberties, he said he thinks that the needle falls on the side of helping law enforcement prevent terrorist attacks.

“I think they are properly responding to a market demand,” Obama said, adding that he thinks Americans should have strongly encrypted data like he and his family. However, he said he was “sympathetic to law enforcement because I know the kind of pressure they’re under.”

“The folks in favor of air-tight encryption also want to be protected from terrorists,” he said.

Another issue President Obama focused on Friday was the need for greater privacy protections for Americans.

It has been almost three years since the White House unveiled its idea for a privacy bill of rights, but Congress hasn’t accomplished much on the issue since then. Financial services and health care providers operate under stricter security requirements to protect consumer financial or health records, but there aren’t similar requirements for other industries.

“I think you own your data. I think I own my data,” he said. “I think this is an area where ironically, sometimes I also have tensions with Silicon Valley because folks are quite keen on talking about government intrusion and some of them are intrusive as well.”

Greater transparency could help some of those issues, he said, although there is a need for legislation to ensure that student data collected in schools isn’t shared and used to market products to kids.

Europeans have much stronger privacy standards and have been more active in investigating how companies like Google and Facebook handle data, Swisher noted.

“In defense of Google and Facebook, sometimes the European response here is more commercially driven than anything else,” the president said. “As I’ve said, there are some countries like Germany, given its history with the Stasi, that are very sensitive to these issues. Sometimes their vendors, their service providers who can’t compete with ours are essentially trying to set up some roadblocks for our companies to operate effectively.”

There were a few lighter moments in the interview, including when Swisher asked the president what sort of technologies he uses other than an iPad or his ubiquitous BlackBerry. Sensor-equipped shirts? Health devices?

“I don’t have a Fitbit yet, but I work out hard,” he said. “Word is these Apple Watches might be a good companion for my workouts. So I’m gonna see, I’m gonna test it out.”

* Kara Swisher is married to but separated from Megan Smith, chief technology officer for the Obama Administration. See her ethics statement here.