With cryptography, surveillance processes could be open and preserve privacy without undermining their investigative power.

Democracy rests on the principle that legal processes must be open and public. Laws are created through open deliberation by elected bodies; they are open for anyone to read or challenge; and in enforcing them the government must get a warrant before searching a person’s private property. For our increasingly electronic society to remain democratic, this principle of open process must follow us into cyberspace. Unfortunately it appears to have been lost in translation.

The NSA, secretly formed after World War II to spy on wartime adversaries, has clung to military-grade secrecy while turning its signals-intelligence weapons on ourselves and our allies. While nominally still a “foreign-intelligence” agency, the NSA has become a de facto law-enforcement agency by collecting bulk surveillance data within the U.S. and feeding these data to law-enforcement agencies. What walks like a duck and squawks like a duck is usually a duck, and since the NSA has been squawking like a law-enforcement agency, it should be subject to open processes like a law-enforcement agency.

We propose an openness principle—something we believe is necessary to constrain electronic surveillance in a healthy democracy. In brief, any surveillance process that collects or handles bulk data or metadata about users not specifically targeted by a warrant must be subject to public review and should use strong encryption to safeguard the privacy of innocent users. Only after law-enforcement agencies identify people whose actions justify closer investigation and demonstrate probable cause via an authorized electronic warrant can they gain access to unencrypted surveillance data or employ secret analysis processes. The details of an investigation need not be public, but the data collection process would be—what information was collected, from whom, and how it was encrypted, stored, searched, and decrypted. This is no different in principle from the way the police traditionally use an open process to obtain physical search warrants without publicly revealing the target or details of their investigation.

Technology we have developed could allow law enforcement to enact this approach without hampering their work. In fact it could even enhance it. As we have argued before and have now demonstrated, modern cryptography could enable agencies to find and surgically extract warrant-authorized data about persons of interest like needles in a haystack of encrypted data, while guarding both the secrecy of the investigation and the privacy of innocent users whose data comprise the haystack. The NSA was aware of this option but, shielded from public scrutiny, chose a more invasive path. Our design ensures that no sensitive data may be decrypted without the use of multiple keys held by independent authorities, such as the law-enforcement agency, the authorizing judge, and a legislative oversight body.

Our approach can target not just known but unknown users. In the case of bank robbers known as the High Country Bandits, the FBI intercepted cell-tower records of 150,000 people to find one criminal who had carried a cell phone to three robbery sites. Using our encrypted metadata search system, the FBI could have quickly extracted the bandit’s number without obtaining data on about 149,999 innocent bystanders. The same system could discover unknown associates of known targets. This and many other cryptographic methods could facilitate the legitimate pursuit of criminals and terrorists while protecting our privacy.

Secrecy-obsessed agencies will fret that open processes like those we propose might help terrorists evade surveillance. But it’s better to risk a few criminals being slightly better informed than to risk the privacy and trust of everyone. When intelligence leaders lie to Congress and spy on their overseers, we must ask whether the existential threat to our society is hiding in rocky caves or in Beltway offices. With the right technology, we can have both strong national security and strong privacy.

Bryan Fordis an associate professor of computer science at Yale University, where he leads the Decentralized/Distributed Systems research group.