A federal appeals court in New York will hear oral argument on Tuesday in our lawsuit fighting for the public’s right to know the legal justifications for government spying.

The Freedom of Information Act suit seeks the release of secret memos written by government lawyers that provided the foundation for the warrantless surveillance of Americans’ international communications. In essence, these memos serve as the law that governs the executive branch. By withholding them, the government is flouting a core principle of democratic society: The law must be public.

The memos cover the government’s legal interpretations of Executive Order 12333, which was issued by President Ronald Reagan in 1981. It’s the primary authority under which the NSA conducts surveillance, and it encompasses an array of warrantless, high-tech spying programs. While much of this spying occurs outside the United States and is ostensibly directed at foreigners, it nonetheless vacuums up vast quantities of Americans’ communications. That’s because in today’s interconnected world, communications are frequently sent, routed, or stored abroad — where they may be collected, often in bulk, in the course of the NSA’s spying activities.

For example, the NSA has relied on EO 12333 to collect nearly 5 billion records per day on the locations of cell phones, as well as hundreds of millions of contact lists and address books from email and messaging accounts. It also intercepted private data from Google and Yahoo user accounts as that information traveled between those companies’ data centers located abroad.

Despite its breadth, surveillance under EO 12333 is not subject to meaningful oversight by Congress or the courts. This makes learning how EO 12333 works even more important. We’re seeking basic information about the government’s interpretation of the legal boundaries of the executive order and the supposed protections for Americans whose communications are ensnared in this largely unchecked surveillance.

Although the government has disclosed some of this information over the course of the case, it’s improperly withholding key parts of a Justice Department memo that provided the basis for President George W. Bush’s unconstitutional warrantless wiretapping program. It’s also withholding six other memos that set out the legal basis for surveillance activities under the order.

The government claims that these documents should be kept secret because the memos didn’t expressly and officially impose legal limits that spy agencies had to abide by. But because the memos contain what’s known as “working law” — essentially the rules of the road for what the government does — they shouldn’t be withheld from the public. Working law includes the legal analyses that agencies accept and rely on as a basis for their actions.

The legal reasoning in these memos is precisely the kind of information that Congress intended to make public through the Freedom of Information Act. The Supreme Court has issued rulings supporting that principle, saying that “the public is vitally concerned with the reasons” undergirding agency actions. FOIA requires the government to make these reasons public whenever possible. Yet the district court wrongly decided in this case that the government could keep the documents hidden.

While the government might rightly withhold the operational details of EO 12333 programs for national security reasons, the public has a right to know the basic legal contours under which the NSA and CIA are gathering our personal communications.

When the government operates a massive surveillance apparatus in the shadows without meaningful legislative or judicial oversight, it undermines accountability to the people. Secret law has no place in a democracy.