It's taken seven years of legal wrangling, but one group of pro-privacy activists are hoping an appeals court will finally declare a critical part of the National Security Agency's spying apparatus unconstitutional.
The Electronic Frontier Foundation (EFF) has been challenging the NSA's bulk data collection program in court since 2008, largely running on whisteblower testimony from Mark Klein, a former AT&T technician who alleges the NSA inserted technology into the internet company's infrastructure that allowed it to collect and analyze the data.
Klein's allegations were later bolstered by Edward Snowden, who has published a raft of material detailing how the process — referred to as 'upstream collection' — works.
The lawsuit, Jewel v. NSA, was filed by a collection of AT&T customers who say their communications were unlawfully collected and analyzed. The latest step in the case came Tuesday, when the EFF filed its brief to a 9th Circuit Court of Appeals judge in California.
One of those NSA documents leaked to the media explains that the agency used the "collection of communications on fiber cables and infrastructure as data flows past."
Tapping those cables means tapping into virtually every kilobyte of data sent from American computers. The cables are often referred to as the internet's "backbone."
"The result is a digital dragnet," the lawsuit alleges. "A technological mass surveillance system that subjects millions of ordinary Americans to the seizure and searching of their online correspondence, conversations, searches, reading and other activities."
That, they say, is a clear violation of Americans' Fourth Amendment rights.
But the lawsuit has been largely frustrated by the American government's legal roadblocks. An earlier lawsuit against AT&T, started in 2006, was quashed when Congress introduced retroactive immunity for telecommunications companies that participate in mass data collection.
Related: The NSA's Authority to Bulk Collect Americans' Phone Records Has Just Expired
This current iteration of the case, filed against the NSA itself, was thrown out by a lower court twice. The most recent rejection came earlier this year, when a California judge ruled that, in order to prove the case, the EFF would have to rely on classified material that cannot be made public, and therefore couldn't be used in the case.
The EFF, however, says that because the NSA has essentially admitted much of what the case alleges, there's no need to dip into those classified records.
"The biggest change is that the government has admitted a lot of things that it was previously saying were secret, and it's a direct result of the Snowden documents," Andrew Crocker, staff attorney at the EFF, told VICE News.
"They have admitted they are accessing files from the fiber optic cables."
Still, the NSA disagrees that its surveillance constitutes an illegal search of Americans' communications.
VICE News reached out to the NSA to ask about their legal basis for the upstream collection, but has yet to receive a response.
Given that this is the first case of its kind, attacking the NSA for not just collecting phone calls or metadata at will, but of collecting every single communication passed through company systems.
Crocker says it is almost exactly the sort of thing the Fourth Amendment was written to prevent. By the time the amendment was written, individual states had spent decades fighting against the use of general search warrants, which would allow officers to search any home at will.
The EFF lawyer says those warrants are virtually identical to the ones the NSA relies upon to do its mass data collection.
"They get broad, programmatic approval from the FISA court," says Crocker, referring to the Foreign Intelligence Surveillance Act courts, which authorize much of the NSA's surveillance activities.
Assuming the NSA only runs surveillance on foreign parties — which has long been their contention — the EFF's case would be moot. Their application to the appeals court, however, alleges that Americans are regularly swept up in the dragnet.
A 2014 report, published by the NSA's oversight board that reports on the agency's privacy protections, reads that the data scooped up by the NSA "are first filtered to eliminate potential domestic transactions" and "to help ensure that at least one end of an acquired Internet transaction is located outside the United States."
It's on this point that the court may finally pass a decision as to whether this practice is unconstitutional, or a legal practice.
The NSA has contended in the lower courts, and will likely argue in this case, that because they have automated the filtering process to weed out domestic communications — which they technically are forbidden from searching — they are not actually searching Americans' private data.
The EFF admits that wholly domestic communications are largely filtered out under the NSA's program. However, they contend that the initial capture of the data — the moment at which the information is copied, or split, from the cables — constitutes an illegal seizure.
They also argue in their application that the filtering process is simultaneously a search unto itself, and an imperfect manner to weed out purely domestic conversations that frequently ensnares Americans' emails with their loved ones.
"It doesn't matter that it is being done by a computer," Crocker says. "That computer was programmed by a human being."
Filtering communications based on IP address, which is the primary way the NSA says it avoids scanning Americans' emails and browsing activities, also fails to take into account that communications are frequently routed through foreign countries — a practise referred to as 'boomerang routing' — meaning that a conversation between a man in Boston and a Woman in Dallas may, in fact, ping between Dresden and Tokyo before returning to Texas, making the communication look foreign. Crocker calls that process a pretty "rough guide" to determining where the communications originate from, or are directed to.
Related: New Mass Surveillance Laws Comes to Canada, France and the United Kingdom, as the NSA May Have Its Wings Clipped
Once the NSA screens the communications to determine whether they appear American or foreign, they are screened again based on keywords and indicators that narrow down the communications of interest to the agency.
At that point, the communications are retained and can be used in investigations or as the basis for increased monitoring. The NSA contends that if a communication between two Americans makes it to this point, it is deleted as soon as it is discovered.
Crocker says, legally, the nuances of the NSA's practises don't matter. "The Fourth Amendment does not allow them to do this," he says.
The next big hurdles will come shortly, as the American government tries to get the case thrown out on the same basis as before. The EFF expects that, considering the amount of NSA and whisteblower documentation about the upstream collection program, there will be no need to declassify any records.
Assuming the judge agrees, the NSA will be filing its statement of defence in the next month, with oral arguments beginning shortly thereafter. If the case continues at its current pace, a decision is expected by next year.
Follow Justin Ling on Twitter: @justin_ling