Screenshot courtesy of Laura Hautala

The Wikimedia Foundation wants a judge to decide whether a major US surveillance program is constitutional. The US government says the organization has no business bringing the case to court.

That was the conflict at the heart of arguments lawyers for both sides gave in a federal appeals court Thursday in Richmond, Virginia. The program, often referred to as "upstream" surveillance, searches communications as they travel through underwater cables that pipe the internet around the world.

If allowed to continue with its case, the Wikimedia Foundation and a host of other nonprofits, non-government organizations and news publications that communicate internationally over the internet would ask a federal judge to determine whether the program violates the Fourth Amendment.

As privacy advocates see it, "This is a case about the warrantless collection of communications straight from the backbone of the internet," Andrew Crocker, a staff attorney at the Electronic Frontier Foundation, said in an email. "Cases like this are important to establish that such unbounded surveillance violates the constitution."

Unlike another well-known program -- PRISM -- upstream collection doesn't require the government to get customer emails, documents and other messages from tech companies like Google and Apple. That's because it catches the communications while they're in transit.

The case is one of several in which internet companies and privacy-oriented organizations have tried to challenge surveillance programs in court -- and all of them have hit brick walls. The obstacle in all of them is two questions: who can sue the government over unlawful surveillance, and how can they prove they're directly affected by government spying?

A district judge already ruled that the Wikimedia Foundation, a nonprofit that operates Wikipedia and international education programs, can't bring the case. The organization is appealing that decision. It's up to the nonprofit to convince the judge that it has reason to think its communications were collected by upstream program. That's where the organization failed, the judge wrote.

But that's a tall order, because the government isn't volunteering information on whether it's scooped up any of the nonprofit's one trillion annual international communications. It's a catch-22, in which the Wikimedia Foundation says it's highly likely that the surveillance program intercepts its messages, and the government responds by asking, how do you know?

There's a fair amount of detail in the public record about how upstream surveillance works, from congressional testimony to a report from the government's Privacy and Civil Liberties Oversight Board (PCLOB), a body created after former NSA contractor Edward Snowden revealed PRISM, the upstream program and a host of other surveillance programs to journalists in 2013. Still, the US government argued to three appeals court judges on Thursday that the Wikimedia Foundation is merely speculating about how the program works when it claims its communications are being intercepted illegally.

For example, the report from the PCLOB "does not give any indication as to the precise scope... of communications that may be collected, or any details as to how that is done," said Katherine Dorsey, the lawyer who argued on behalf of the National Security Agency. "Those details are all classified."

The judges pushed back on Dorsey's line of argument repeatedly. "Frankly, I'm heavily for national security," said Fourth Circuit Court of Appeals Judge Diana Gribbon Motz. But, she said, if the government is going to do a good job of finding the communications it wants to intercept, "they're going to have to look at everything."

That's an assumption, Dorsey repeatedly said in reply to this and many similar questions from Motz and the other two appeals judges hearing the case. The NSA could certainly achieve its goals by collecting every communication going through every fiber-optic cable bundled into the underwater cables that it monitors, she said, but it's not necessarily the only way.

Patrick Toomey, a staff attorney at the American Civil Liberties Union, argued on behalf of the Wikimedia Foundation and its co-plaintiffs. The judges pressed him on how he knew his clients' communications were being swept up in the upstream surveillance program.

"It's virtually unthinkable that the government could be conducting the surveillance it says it's conducting without collecting at least some of Wikimedia's communications," he said.

Audio of the arguments in the Wikimedia Foundation et al. v. NSA case can be found here.