WASHINGTON — The U.S. government is looking at ways to prevent anyone from spying on its own surveillance of Americans’ phone records.

As the Obama administration considers shifting the collection of those records from the National Security Agency to requiring that they be stored at phone companies or elsewhere, it’s quietly funding research to prevent phone company employees or eavesdroppers from seeing whom the U.S. is spying on.

The Office of the Director of National Intelligence has paid at least five research teams to develop a system for high-volume, encrypted searches of electronic records kept outside the government’s possession. The project is among several ideas that would allow the government to discontinue storing Americans’ phone records but still search them as needed.

Under the research, U.S. data mining would be shielded by secret coding that could conceal identifying details from outsiders and even the owners of the targeted databases, according to public documents obtained by The Associated Press and APinterviews with researchers, corporate executives and government officials.

In other developments Monday:

• The Justice Department and leading Internet companies agreed to a compromise with the government that would allow the firms to reveal how often they are ordered to turn over information about their customers in national security investigations. The deal with Google Inc., Microsoft Corp., Yahoo Inc., Facebook Inc. and LinkedIn Corp. would provide public information in general terms. Other technology companies were also expected to participate.

• When the New York Times published a censored U.S. document on the smartphone surveillance program, computer experts said they were able to extract what appeared to be the name of an NSA employee, a Middle Eastern terror group the program was targeting and details about the types of computer files the NSA found useful. Since Snowden began leaking documents in June, his supporters have maintained they have been careful not to disclose any agent’s identity or operational details that would compromise ongoing surveillance.

The employee did not return phone or e-mail messages from the AP. A DNI spokesman said the Times was asked to redact, or black out, the material. A Times spokeswoman blamed a “production error” and said the section was redacted.

• NBC News reported that British cyber spies demonstrated a pilot program to their U.S. partners in 2012 in which they were able to monitor YouTube in real time and collect addresses from the billions of videos watched daily, as well as some user information, for analysis.

At the time the documents were printed, they were also able to spy on Facebook and Twitter. The network said the monitoring program was called “Squeaky Dolphin.”

More in News

President Donald Trump’s national security adviser said Saturday there was “incontrovertible” evidence of a Russian plot to disrupt the 2016 U.S. election, a blunt statement that shows how significantly the new criminal charges leveled by an American investigator have upended the political debate over his inquiry.

The University of Colorado leadership is grappling with how to address a nationwide nosedive in the favorability of higher education — particularly, among conservatives — as CU’s own representatives and decision-makers disagree on what’s behind the downturn.