The N.S.A.’s Chief Chronicler

In 1982, long before most Americans ever had to think about warrantless eavesdropping, the journalist James Bamford published “The Puzzle Palace: A Report on N.S.A., America’s Most Secret Agency,” the first book to be written about the National Security Agency, which was started in 1952 by President Harry Truman to collect intelligence on foreign entities, and which we learned last week has been collecting the phone and Internet records of Americans and others. In the book, Bamford describes the agency as “free of legal restrictions” while wielding “technological capabilities for eavesdropping beyond imagination.” He concludes with an ominous warning: “Like an ever-widening sinkhole, N.S.A.’s surveillance technology will continue to expand, quietly pulling in more and more communications and gradually eliminating more and more privacy.” Three decades later, this pronouncement feels uncomfortably prescient: we were warned.

Bamford, who served in the Navy and studied law before becoming a journalist, published three more books after “The Puzzle Palace,” composing a tetralogy about the N.S.A.: “Body of Secrets: Anatomy of the Ultra-Secret National Security Agency” (2001); “A Pretext for War: 9/11, Iraq, and the Abuse of America’s Intelligence Agencies” (2004); and “The Shadow Factory: The Ultra-Secret N.S.A. from 9/11 to the Eavesdropping on America” (2008). As the progression of subtitles indicates, Bamford has become disenchanted with the agency that he knows probably better than any other outsider. Fellow investigative journalists regard him with what can broadly be described as admiration, though, as the Times reporter Scott Shane wrote, in 2008, “His relationship with the National Security Agency might be compared to a long and rocky romance, in which fascination with his quarry’s size and capabilities has alternated with horror at its power to invade privacy.”

The image of a troubled romance is one that Bamford readily summons. “I have a love-hate relationship with the N.S.A.,” Bamford joked when I spoke to him last week, in the wake of the revelation that the N.S.A. is gathering metadata from telecommunications and Internet companies. “I love them, and they hate me.” They have good reason. Bamford, who divides his time between Washington, D.C., and London, is a slightly mischievous character whose obvious persistence and curiosity have served him well. He talks with the relish of a child who has entered a forbidden room and knows that he will do so again. He decided to write about the N.S.A., which is believed to receive ten billion dollars in annual government funding and employ some forty thousand people, because no one had done it before—and because it was probably more fun than reading case law. While doing research at the Virginia Military Institute, he uncovered a load of N.S.A.-related documents from the files of the masterful Moldovan-born cryptographer William Friedman, as well as those of Marshall Carter, who headed the agency from 1965 to 1969. And, incredibly enough, the Department of Justice, under Jimmy Carter, complied with Bamford’s Freedom of Information Act requests, supplying him with secret documents related to the Church Committee, the Senate group that, in 1975, investigated American intelligence agencies for potential transgression of their mandates.

That the government would hand over sensitive information to Bamford predictably infuriated the N.S.A.; Reagan Administration lawyers tried to bully Bamford into ceding his goods, threatening him with the Espionage Act, while the N.S.A. attempted to sequester the documents he’d uncovered. But because he was a lawyer, Bamford knew that he had done nothing wrong. Unlike the secret court order on wiretapping that required Verizon to supply the N.S.A. with its customers’ phone records which was passed covertly to the Guardian’s Glenn Greenwald, Bamford’s information was obtained through legal channels.

I had a hard time finding “The Puzzle Palace.” Online bookstores notwithstanding, the only physical copy I could locate promptly was at the Queens Central Library. The book was in storage, I was told, and would take some time to retrieve. Indeed, “The Puzzle Palace” has the feel of an artifact, the darkly revealing kind. Though published during the Reagan years, the book is coolly subversive and powerfully prescient. Its warnings of “technotyranny” and reminders that “the same technology that is used against free speech can be used to protect it” sound like something you might hear from a Google executive at a TED talk. Bamford writes with stinging skepticism about the legal procedures created in 1978 under the Foreign Intelligence Surveillance Act to adjudicate spying—the same laws that, since 9/11, have allowed for domestic wiretapping—calling them “a super hush-hush surveillance court that is virtually impotent.”

Bamford’s 1982 book is a reminder to anyone who thinks that domestic eavesdropping is a necessary part of a post-9/11 world that the N.S.A. has tested the bounds of the Fourth Amendment before. Project Shamrock, carried out after the Second World War, compelled companies like Western Union to hand over, on a daily basis, all telegraphs entering and leaving the United States. A younger sibling, Project Minaret, born in 1969, collected information on “individuals or organizations, involved in civil disturbances, antiwar movements/demonstrations and Military deserters involved in the antiwar movement.”

My own favorite passage is of a lighter variety. It describes the N.S.A.’s headquarters, near Washington—sometimes called Crypto City—which Bamford got to visit in exchange for making a few concessions regarding information the N.S.A. was particularly eager to keep out of public view. He writes, “Although security at the Puzzle Palace appears close to hermetic, much of it is little more than illusion. Triple-wrapping in chain link and electricity notwithstanding, access to the front lobby and plush reception area is easier than walking into a Greyhound bus station.” I’m quite certain such laxity is long gone.

If “The Puzzle Palace” is hard to find, it is only because the book that followed, “Body of Secrets,” almost entirely eclipsed it. Published months before 9/11, it is the story of an agency adrift, the Soviet menace diminished but the one from the Middle East not yet in full focus. The book is turgid with agency history, partly because it was the work for which Bamford would receive the most thorough coöperation from the N.S.A. Then director Michael Hayden, who had taken charge of the agency in 1999, even invited Bamford to a dinner at his house. (“He had a three-piece band,” Bamford told me. “Generals get these things.”)

The history is not always kind: “Body of Secrets” opens with a description of American intelligence agents at the end of the Second World War desperate to poach Nazi codebreakers who might have been helpful against the looming Soviet threat. The Suez Crisis of 1956, in which Israel, Britain, and France attacked Egypt, “marked a dismal entry into the world of crisis intelligence,” Bamford writes, the agency’s analysis consisting of nothing more specific or useful than “communications between Paris and Tel Aviv.” Eight years later, the N.S.A. committed a “major blunder,” in Bamford’s words, by inflating the threat of a second attack in the Gulf of Tonkin in the early days of August, 1964, which President Lyndon B. Johnson would use as a pretext for leading the nation into what would become the Vietnam War. Later, Bamford alleges that the N.S.A. lost cryptographic equipment to the North Koreans, who passed it on to the Soviets, who, in turn, handed it over to their North Vietnamese allies (the N.S.A. has disputed this claim). The agency did draw an “electronic noose” around the Soviet Union, though, as Bamford told me later, “because the Cold War remained cold, the N.S.A. was never tested against its ultimate challenge.”

Slow to change during the nineteen-nineties, the agency began to adapt to the digital world by the time Hayden took office. Its codebreakers were by and large brilliant mathematicians and computer scientists, but they were not always au courant. Bamford writes that, “as the Cold War passed, so did the N.S.A.’s boom years,” noting that, by 1997, “the intelligence community budget had shrunk to what it had been in 1980.” For the N.S.A., that meant that in the first seven years of the nineties, it had to cut its staff by 17.5 per cent.

Because the N.S.A. appears to have treated Bamford almost like a civilian ombudsman at the time, the book is full of odd little details: the post office in Crypto City, as of 2000, distributed seventy thousand pieces of mail each day, and the “N.S.A. is the largest contributor to Maryland’s blood donor program.” There is even “an annual film festival, sponsored by the Crypto-Linguistic Association and a Battlegaming Club, not to mention a Taco Bell and Pizza Hut.” The details are intended to endow, with a sheen of normalcy, what Bamford describes as “an avatar of Jorge Luis Borges’ ‘Library of Babel,’ a place where the collection of information is both infinite and monstrous, where all the world’s knowledge is stored, but every word is maddeningly scrambled in an unbreakable code.” The great irony here is that the agency charged with omniscience overlooked the fact that several of the 9/11 hijackers were living in Laurel, Maryland, an N.S.A. bedroom community. Bamford speculates that the five terrorists-to-be who were sequestered there may have exercised at the same Gold’s Gym as many N.S.A. employees.

Bamford is generally kind to Michael Hayden. Yet after 9/11, which came only months after the book’s publication in the spring of 2001, the N.S.A. became both a scapegoat and one of the organizations charged with preventing further attacks. Part of this mission involved bolstering, along with the Central Intelligence Agency, the White House’s claim that Iraq possessed weapons of mass destruction—claims later shown to be largely false, as “Pretext for War” amply demonstrates. In that book, he also reports that the N.S.A. was told by the Bush Administration “to spy on the United Nations weapons inspectors and pressure undecided members of the UN Security Council to vote in favor of its go-to-war.”

Nor did Bamford know the worst of it. Once again, his book had come on the cusp of a cataclysm. On December 16, 2005, the Times published an article titled “Bush Lets U.S. Spy on Callers Without Courts,” alleging that the President “secretly authorized the National Security Agency to eavesdrop on Americans and others inside the United States to search for evidence of terrorist activity without the court-approved warrants ordinarily required for domestic spying, according to government officials”—a predecessor to the Prism program being unravelled today. Bamford felt betrayed. Though he had reported on the excesses of Shamrock and Minaret, he thought that the N.S.A., under Hayden’s leadership, was a more scrupulous outfit than it had been in the past. Bamford now considers the book much too generous toward Hayden.

“The Shadow Factory,” Bamford’s rageful 2008 book about the N.S.A.’s current troubles, is probably the most relevant of Bamford’s books today. In it, he describes an agency that has become increasingly cavalier about what data it will collect, and from whom. As one official told Bamford, “It’s what the N.S.A.’s been doing since 9/11. They’re just sweeping the stuff up.” Hayden, by this time, has been made into “a three-star sycophant unwilling to protect the agency from the destructive forces of Cheney and [David] Addington,” Cheney’s chief of staff. Whereas “Body of Secrets” referenced Borges, “The Shadow Factory” alludes to Orwell.

Particularly irksome is the suspicion that, as far as spy agencies are concerned, the N.S.A. just isn’t very good: Bamford said it has “failed badly” in preventing attacks since the Cold War, missing everything from the first World Trade Center attack in 1993 to the recent Boston Marathon bombing. That’s partly because, as the agency has been inundated with so much data, it has perhaps lost the ability to evaluate information in a timely manner. You need people to point out patterns, to say what is relevant and what is not. Or, as Bamford puts it in “A Pretext for War,” the “N.S.A. needs human intelligence sources to help tell it where, and to whom, to listen.” In the past, a rivalry with the C.I.A.—which is largely responsible for human intelligence, in contrast to the N.S.A.’s general focus on data—had prevented that sort of symbiosis.

At the root of Bamford’s fixation on the N.S.A. is a fascination with Americans’ willingness to “buy the company line” of spymasters, who assure us that the letter of the law is being followed, that civil liberties are respected, even as evidence accumulates suggesting the opposite. It seems we want to believe that those charged with protecting us may occasionally break the law, but will only do it to keep us safe, the way the roguish patriot Carrie Mathison, played by Claire Danes, routinely does on the TV show “Homeland.”

All this has made Bamford increasingly outraged. Though he refused to gloat during our conversation, it was clear that he felt vindicated for all his years of dogged pursuit. And he is still angry, as angry as he was back in 1982, when few Americans had ever heard of Crypto City. Surprisingly apolitical, Bamford simply wants the spies to account for what they do before they do it: “You want to do this?” he says of the N.S.A.’s Prism program. “Put a bill through Congress. Have a public debate.”