• Aides and lawyers contend over terms of surveillance bill • Authors of first realistic reform seek to avoid loopholes • Lawmakers aim to protect encryption from NSA

In a secured room beneath the US Capitol last week, legislative aides working to finalize a bill intended to constrain the National Security Agency attempted to out-think a battery of lawyers working for the Obama administration and the intelligence services.

The NSA’s track record of interpreting its surveillance powers to the legal breaking point has been hanging over the ongoing debate about the surveillance reform bill known as the USA Freedom Act, the first post-9/11 effort to constrain the agency that has a realistic chance at passage.



Those behind the legislation, which is expected to head to the House floor as early as this week, have labored to craft the terms of the bill in a way that avoids loopholes for the NSA to exploit. But some wonder whether the agency will lawyer the bill’s restrictions on bulk data collection into oblivion, as recent statements by Obama administration officials have suggested it might.



The NSA, its credibility hurt by whistleblower Edward Snowden’s disclosures, is trying to reassure its overseers that it will abide by new congressional action, even as its advocates labor to shape the bill to its liking. But the agency's post-9/11 history has left the architects and advocates of the bill concerned about the ways in which it might once again reinterpret a law intended to restrain it into one allowing it more surveillance leeway than congressional architects intend.



Meetings last week between Hill aides and administration and intelligence lawyers yielded a sense of the legal reasoning likely to result if the USA Freedom Act becomes law.



Lawyers for the NSA, the Justice Department, the Federal Bureau of Investigation and the Office of the Director of National Intelligence presented a variety of hypothetical cases about surveillance, to see if the proposed bill would accommodate them. Some were described as routine or unobjectionable from a privacy standpoint, part of the standard due diligence of crafting legislation. But others raised suspicions that the NSA might be better at thinking of hypothetical cases to expand its authorities than the legislation is at anticipating and checking them.



Some staffers came away thinking that their challenge was, as one put it, “trying to take into consideration what is the most the government can do in this situation”.



NSA officials “abide by the law”, Congresswoman Zoe Lofgren, a California Democrat, told the Guardian last week, “but they also have good lawyers who will go to court and try to press the meaning of what we write to the maximum amount. And we should be mindful of that.”



After 9/11, the agency set aside two decades of law requiring it to obtain a court order to collect data inside the US. In secret, the NSA obtains in bulk the phone records of nearly all Americans; until 2011, it gathered their email records in much the same way.



When it became necessary to wrap that warrantless data dragnet in the language of existing law, the NSA’s lawyers crafted arguments for why a Patriot Act provision about collecting business records “relevant” to a terrorism investigation authorised the collection of all Americans’ records, relevant to an ongoing investigation or not, and justified email data collection using statutes about phone wiretaps. A secret court, after being presented with these programs as existing fact, accepted the agency’s arguments.



NSA officials have sometimes told Congress the agency welcomes proactive legislative debate about questions central to its surveillance function.



“What I really need you to do is to talk to your constituents and find out where the American people want that line between security and liberty to be,” then-director Michael Hayden testified in October 2002.



“In the context of NSA's mission, where do we draw the line between the government's need for counter-terrorism information about people in the United States and the privacy interests of people located in the United States?”



What Hayden left unsaid in that testimony is that his agency had, at the behest of the Bush White House, redrawn that line a year earlier, and begun collecting Americans’ phone and email data in bulk, without any such congressional action. A 2009 internal NSA draft history of that program, codenamed Stellar Wind, said it “could not determine” why early post-9/11 efforts at amending surveillance laws were “abandoned”.

According to a PBS Frontline documentary last week, even the NSA’s top attorneys found the warrantless domestic surveillance regimen a dicey legal call, although they ultimately approved it. When the Wisconsin Republican who co-sponsored the Patriot Act, Congressman James Sensenbrenner, learned that his law was being used for a far broader program of data collection than he had envisioned, he crafted the USA Freedom Act as a remedy.



James Sensenbrenner. Photograph: Chip Somodevilla/Getty Images

The NSA thinks it has not earned the public’s suspicion and has sought to assuage it since the Snowden disclosures. Its battalions of lawyers are preoccupied with restraining surveillance, veterans say, far more than they are with expanding the frontiers of the law.



“NSA has good lawyers who respect the law and who care deeply about our country’s security,” said Stewart Baker, a former top NSA attorney, who warned against legislative suspicions of the agency’s legal minds.



“They work hard to square the requirements of national security with the law. That is not a reason to turn national security law into the equivalent of the Internal Revenue Code. It would be a grave mistake to write laws that treat security agencies like adversaries. That will ensure that the application of the law won’t be able to evolve as quickly as the threats we face and the technologies we encounter.”



Still, recent congressional testimony has suggested that the agency will be reluctant to let legislation aimed at restricting surveillance have the final word.



Senator Chuck Grassley, an Iowa Republican, asked Deputy Attorney General James Cole in December if the USA Freedom Act amounted to “legislation that would have the effect of ending the Section 215 program” – the NSA’s bulk phone records collection.



“I'm going to have to give you a bit of a lawyer's answer,” Cole replied.



“It's going to depend on how the court – if the USA Freedom Act becomes law – it's going to depend on how the court interprets any number of the provisions that are in it, and any number of the additional requirements that are contained in it over what's here now.”



Statements like that are informing the way Congress views surveillance law as the USA Freedom Act prepares to clear a legislative milestone. Staffers familiar with the final discussions about the bill said they believed its expanded disclosure requirements will provide Congress with sufficient visibility into any novel legal arguments NSA might make.

But key lawmakers, mindful of the NSA’s post-9/11 record, stress that the onus is on them to craft a bill with as little legal wiggle room as possible.



“We don’t want to end up in the same situation a few years from now as we are today,” Lofgren warned during the debate, “finding out that we have failed to define terms and have allowed for the kind of unwarranted bulk collection that we are seeking to end today.”

