President Barack Obama acknowledged the difficulties of respecting privacy and pursuing security concerns in the digital world on Friday.
While addressing tech executives at a White House-sponsored summit on cybersecurity and consumer protection at Stanford University, Obama said it is "hard" to navigate competing imperatives in the digital world's "sort of Wild Wild West."
After speaking at the conference, the president signed an executive order aimed at encouraging companies to share more information about cybersecurity threats with the government and each other, a response to attacks like those on Sony Entertainment, Target, and Anthem.
Read More Uncle Sam to accept Apple Pay
Reportedly upset about the lack of reforms to federal digital information gathering practices, the heads of Google, Facebook and Yahoo did not attend the conference. But Apple CEO Tim Cook gave an address where he announced that the U.S. government would begin accepting Apple Pay for some transactions.
Re/code's Kara Swisher will sit down with Obama later Friday to discuss a wide range of tech issues. (CNBC's parent NBC Universal is an investor in Re/code's parent Revere Digital, and the companies have a content-sharing arrangement.)
—Reuters contributed to this report.