>> NARRATOR: Last time on "United States of Secrets"... >> We are under emergency conditions. Extraordinary means are required to deal with the threat. >> NARRATOR: They called it "The Program." >> You're looking for unknown conspirators, and the way they devised to do that was to look at everybody. >> NARRATOR: Authorized at the highest levels of government. >> This is a highly classified program that is crucial to our national security. >> NARRATOR: Over two presidencies... >> I'm not aware of any case in which Obama said, "You can't do that." >> I argued it was illegal and unconstitutional, and when this comes out, all hell is going to break loose. >> NARRATOR: Now, Frontline's investigation continues. >> The NSA specifically targets the communications of everyone. >> NARRATOR: With the story of the man who exposed it all. >> Snowden said he was risking his freedom and possibly his life. >> This was a stupendous intelligence breach. >> NARRATOR: And the convergence of government surveillance and an information revolution. >> The Googles, the Facebooks collect as much of our sensitive data as possible. >> But anything you hand to a private company is potentially the government's. >> NARRATOR: Tonight on Frontline... >> Corporate America and the national security state know so much about us, and we know so little about them. >> NARRATOR: "Privacy Lost," part two of "United States of Secrets." >> NARRATOR: Hong Kong, May 2013. NSA contractor Edward Snowden was holed up deep inside the crowded Kowloon district. He chose Hong Kong, he would say later, because he trusted the Chinese would not betray him to U.S. authorities. Before leaving his home in Hawaii, he had downloaded a huge store of top secret files from the NSA's internal networks, and he had sent many of them through encrypted channels to a few journalists he trusted. Two of them, Glenn Greenwald of the Guardian and documentary filmmaker Laura Poitras, came to the Mira Hotel to meet him. Greenwald and Poitras wanted to be sure Snowden's story was rock solid. And they needed to work fast. >> We knew that this was incredibly consequential and that it was super important that we get it right. Um... But also, there was always this kind of uncertainty, one might even say danger, hovering over the room. Because we didn't know what the NSA knew about what he was doing. We didn't know what the Chinese and Hong Kong governments knew about him being there. So we thought it was very possible that the door could be barged down at any moment. >> NARRATOR: The Guardian also sent a senior correspondent to vet their source. >> I asked, do you mind if I tape the interview on an iPhone? And as soon as he saw the iPhone, it was like bringing out a microphone direct into the NSA headquarters. He was totally appalled. And he said, "Get that out of the room as quickly as possible." >> NARRATOR: Even then, Snowden still worried that someone might be recording them. >> He would often put a blanket over his head when he wanted to enter this computer system to prevent overhead cameras from picking up the passwords to the encryption. >> NARRATOR: As Snowden explained more about the tens of thousands of documents, MacAskill listened carefully. >> I was sort of warming to the idea that, you know, this guy was for real. >> NARRATOR: One of the first files they discussed was this one. It directed Verizon Business Services to turn customer phone records over to the NSA. The journalists were stunned. >> What this document revealed is that the NSA surveillance system is not directed at very bad people or about terrorists. It's directed at the American citizenry and other citizenries around the world, indiscriminately, in bulk. >> NARRATOR: The document directly contradicted what Director of National Intelligence General James Clapper had said before Congress just a few months earlier. >> Does the NSA collect any type of data at all on millions or hundreds of millions of Americans? >> No, sir. >> It does not? >> Not wittingly. There are cases where they could inadvertently, perhaps, collect, but not wittingly. >> I think for Snowden, the Clapper testimony was the final nail in the coffin. Watching President Obama's top national security official go before the Senate Intelligence Committee and outright lie about what the NSA was doing convinced him, I think, beyond any shadow of a doubt, that the only hope for public discussion and reform was for him to do what he was going to do. (cars honking) >> NARRATOR: At the Guardian's New York bureau, senior editors received a message from Hong Kong. (phone ringing) >> I sent a message saying "The Guinness is good," which meant, "Snowden is for real." And one of the deputy editors in New York said when he saw those words come over, he just went, "Fantastic, we've got a real story." >> NARRATOR: The Guardian decided to publish the story as fast as possible. They called the White House and gave them four hours to comment. >> I remember well getting the phone call. And it was one of these situations where it almost took us a few minutes to get our minds around how big of a leak this was and how comprehensive the set of revelations were. We had very little time to react. >> NARRATOR: They sounded the alarm and reached out to an NSA official, John DeLong. >> I have two computers on my desk-- a classified computer and an unclassified computer. And I'm used to seeing that document on the classified computer. And I did a real double take. I remember just sitting there for 30 seconds checking and rechecking to see what computer this classified document appeared on. The gravity of it was quite palpable, and I thought, "This is going to be a really tough story as it comes out." >> NARRATOR: At the Guardian, editor-in-chief Janine Gibson took a return call from the White House. >> She has the deputy head of the NSA and the White House on the phone, and they essentially are trying to persuade her not to publish. >> The White House tactic was one of, "Okay, you come and see us, let's talk about this, "and you can chat to our officials and we can discuss what might be published and what might not." >> Janine has her own script, which is to say, "Look, if you have any significant objections, "objections on the grounds of national security, then tell us. Now is the moment to tell us." And of course, they don't. They just want to stall her. >> NARRATOR: The Guardian refused to wait. >> The British newspaper the Guardian reports that Verizon is providing phone records of some businesses to the U.S. government. >> NARRATOR: It was just the beginning. At the Washington Post, reporter Barton Gellman-- the only other reporter to receive documents directly from Snowden-- was working on another story. Before publishing, he contacted the NSA. >> I sent notes to two high-ranking people and a spokesperson in government and said, "I have something very sensitive to talk to you about." >> NARRATOR: The story concerned another NSA program called PRISM. Documents showed how beginning in 2007, nine Internet companies were cooperating with the NSA. Gellman wanted to make sure his reporting wouldn't damage national security. >> We very much did want to know what they thought would do concrete harm, and how, and why. And the U.S. government asked me not to publish the names of the nine companies that were supplying information to the government in the PRISM program. And I said, "Why?" Their argument was that if we publish the names, then the companies would be less inclined to cooperate. And I guess we agreed to disagree on that one. >> The Washington Post is reporting that the... >> NARRATOR: The Post went ahead. >> ...the FBI are mining the servers of nine leading U.S. Internet... >> NARRATOR: The PRISM revelations reached beyond the collection of phone records. This was about the acquisition of content of tens of thousands of NSA targets. >> Did you check your account on Gmail? Secret spying program is entirely different... >> The PRISM program is not about metadata. It's about content. It's the photos and videos you send. It's the words of your emails. It's the sounds of your voice on a Skype call. It's all the files you have stored on a cloud drive service. It's content, it's everything. >> NARRATOR: The President was on a fundraising trip in Silicon Valley. At a press conference, he agreed to take one question about the leaks. >> Good morning, everybody. I'm going to take one question. I don't want the whole day to just be a bleeding press conference but I'm going to take Jackie Calmes' question. >> Mr. President, could you please react to the reports of secret government surveillance of phone and Internet, and can you also assure Americans that your government doesn't have some massive secret database of all their personal on-line information and activities? >> Yeah. What the intelligence community is doing is looking at phone numbers and durations of calls. They are not looking at people's names and they're not looking at content. >> NARRATOR: The president tried to downplay the revelations. >> Now, with respect to the Internet and emails, this does not apply to U.S. citizens and it does not apply to people living in the United States. In the abstract, you can complain about Big Brother and how this is a potential, you know... you know, program run amok. But when you actually look at the details... >> In Hong Kong, Snowden was sitting with three people under contract with the Guardian. They were sitting there on the bed watching the reaction on CNN. >> They are not looking at people's names and they're not looking at content. >> Obama was saying the NSA isn't listening to the telephone calls or reading the emails of Americans, which is absolutely wrong. There were documents that we had that proved that President Obama's claims in that regard were false. And we just could tell, as well, that he at that moment didn't have any idea of the true magnitude of what was coming, given how dismissive and casual his tone was. >> Thank you very much, guys. >> NARRATOR: Snowden now decided to make a bold move. He would reveal his identity, posting a video he had recorded a few days earlier. >> Laura set up the camera. Glenn was asking the questions. And normally Snowden wore a t-shirt, and Glenn says, "Can you not find a shirt?" And Snowden went off and found the grey shirt. >> My name is Ed Snowden. I'm 29 years old. I worked for Booz Allen Hamilton as an infrastructure analyst for NSA in Hawaii. >> What we see is someone who is calm, rational, persuasive. >> The NSA specifically targets the communications of everyone. It ingests them by default. It collects them in its system and it filters them and it analyzes them and it measures them and it stores them. >> The language was clear, sympathetic. And when he did the interview it was as if he was a media natural. So we knew that when Snowden went public it was going to be a huge story. >> Why should people care about surveillance? >> Because even if you're not doing anything wrong, you're being watched and recorded. >> And he sets out why he's done this thing, what his motives are, and basically sort of puts the ball in the court of the public and says, "You make up your minds as to whether this is right or not." >> These things need to be determined by the public, not by somebody who is simply hired by the government. This is the truth. This is what's happening. You should decide whether we need to be doing this. >> Edward Snowden, according to the Guardian, is in Hong Kong. >> ...contractor who leaked the existence of NSA programs... >> (woman speaking Chinese) >> Snowden fled to Hong Kong three weeks ago after copying a last set of documents... >> We knew that the minute we unveiled his identity that he was going to have to go into hiding, because the media horde was about to descend onto Hong Kong and would be looking for him. And the U.S. government would certainly be looking for him. >> At that point he knew it was untenable. Some enterprising journalist had put up on Twitter the pictures of the hotel room and says, "Does anybody recognize these light fittings?" And someone was able to establish it was the Mira. >> Snowden is believed to... >> The Mira Hotel is just across the harbor... >> So Snowden knew they were on their way, so about midday he left his hotel room. >> Um, and there was definitely a kind of air of sadness over our last meeting, because I assumed that the next time I saw him, he was going to be in U.S. custody on a television screen. >> NARRATOR: Snowden left it to the journalists to decide which documents to publish, and then he disappeared into the crowded streets of Hong Kong. For two weeks, he managed to elude the world's press corps. >> Hiding in Hong Kong... >> Apparently still in Hong Kong... >> NARRATOR: And to avoid U.S. authorities. >> Edward Snowden's been charged with two counts of espionage... >> This guy is a traitor, he's a defector... >> NARRATOR: On June 23, Edward Snowden set off for South America via Russia. >> ...transit through Russia, supposedly he's headed for Ecuador. >> He ended up in Russia for one very simple reason, and that is that the United States government forced him to stay there by preventing him from leaving. >> Snowden is believed to be holed up inside Moscow's airport. >> He could no longer get a ticket and leave Russia because his passport had been revoked by the U.S. government. >> People may die as a consequence of what this man did, and anybody who wants to make him a hero is misjudging how they stay safe... >> The man on the run from U.S. authorities... >> One of the greatest security breaches in American history... >> Russia has granted Edward Snowden asylum... >> Edward Snowden was granted asylum in Russia... >> ...less likely he will ever see inside of a U.S. courtroom. >> NARRATOR: Back in the U.S., at NSA headquarters, the news hit hard. >> ...shocking headline, and it has grown bigger... >> ...trolling through billions of phone records... >> It was hard to read in the press, "NSA is lawless, NSA out of control." None of those resonate with us. That's not us. That's not what we are aiming towards. That's not how we hold ourselves accountable. Our ultimate goal is to prevent things from... bad things from happening to ensure the national security. >> You want to draw the box differently? You want to have the security community work in a smaller box? I got it. But before you do that, you got to understand, you got to understand what the costs might be. I mean, we live inside a democracy. And, you know, public will matters in a democracy. I just hope it's informed public will. And frankly, when the decisions are made, you understand the costs. >> We have to strike the right balance between protecting our security and preserving our freedoms. >> NARRATOR: The president did what executives in the midst of a controversy often do... >> Review of our surveillance programs... >> NARRATOR: He appointed a panel. >> So I am tasking this independent group to step back... >> NARRATOR: This one to review the NSA's programs. >> And they will provide an interim report in 60 days and a final report by the end of this year, so that we can move forward with a better understanding of... >> His directions were, "Go wherever you want. "You can see any classified program. "No one can deny you any information. "You can go anywhere in the intelligence community. "You can recommend anything. "Except, realize that what I won't accept "is any block between me and my constitutional oath of defending the United States." >> The highly classified program is code-named PRISM. >> The Guardian and the Washington Post both reporting that the National Security Agency... >> NARRATOR: On the other side of the country, in Silicon Valley, there was anger and confusion over just what kind of access major Internet companies were giving the NSA. >> ...extracting audio, video, photographs and email... >> There was shock and disbelief and horror. A lot of people I know, Silicon Valley-type people, just felt, "It can't be right. "It's not possible Google, Facebook, "these guys are collaborating. It's just not what they would do." >> The CEOs of Internet companies like Facebook and Google denied... >> NARRATOR: The companies scrambled to respond to the news. >> Google denies that they have direct access. Who's right? >> They freaked out because they'd never heard of a program called PRISM. And they were not letting the NSA get direct access to their servers. They were cooperating with a secret program that they really couldn't describe in sufficient detail to their customers. >> These NSA folks are saying... >> They saw here a big threat to their image, to their business model, which relies on people to trust them with their communications. And they started issuing quite heated statements, taking issue with the idea that they would be just handing over free access to the NSA. >> NARRATOR: But then there was more bad news. >> The Washington Post, citing documents stolen and released by Edward Snowden... >> NARRATOR: PRISM was only part of what the NSA was up to. >> NARRATOR: In a program called Muscular, the NSA was secretly extracting data from fiber optic cables overseas, where intelligence operations are much less restrained by surveillance laws. >> PRISM was a front door. PRISM was the court saying, "You have to cooperate with the NSA and give specific information when asked." Now they find out that through the backdoor, the government is actually breaking into their infrastructure and taking whatever they want. >> They can't intentionally look for a U.S. person's information unless they believe it's a legitimate foreign target. But otherwise they're free to collect it at... pretty much unrestricted abroad. They can hack into companies' internal networks and collect information in bulk. >> NARRATOR: The NSA did this by invoking a Reagan-era presidential order, from a time long before the modern Internet. >> The NSA decided it was okay under Executive Order 12333 and with the backing of the Justice Department and the White House to break into the private links, the private data links that connect the data centers of Google and Yahoo around the world. You're collecting a very large fraction of the whole planet's Internet traffic. And that includes a very large number of Americans. >> The project identified by the code name "Muscular"... >> We do not just tap into lines in the United States. Overseas, the ability to do that in bulk is critical for finding the communications of people who are trying to hide. If you can look for certain patterns and dive into those communications, you find people utterly unknown to you who are very dangerous. >> NARRATOR: Google was shocked. They had leased what they thought were secure data lines. >> The idea that one of our own government agencies would go out and essentially break into Google's own data streams to go beyond what Google thought had been a skeptical and resistant, but nevertheless cooperative relationship, I find that quite shocking. That is sort of a betrayal of the relationship that I think Google felt like it had with the government. >> NARRATOR: The leaked files even showed the NSA operatives bragging about their accomplishment. >> There was one slide, the internal NSA slide, showing a little diagram how it worked. It sort of boasted about it and it put a little smiley face there. This little, you know, like emoji, gotcha. You know, saying, you know, "Ha ha," you know, "we figured out a way to get that information." >> NARRATOR: Google, which had a better record than most companies on encryption, was criticized for leaving its internal data lines vulnerable. >> I don't know why Google wasn't encrypting the information traveling between their data centers. But we know that they weren't and we know that the NSA revelations have prompted them to make massive changes in the way their systems work. And they're now trying to encrypt that data on a crash program to get all of that information encrypted. >> NARRATOR: The NSA will now have a harder time reading Google's data without Google's knowledge. >> Obviously, the National Security Agency did not design its programs on the assumption that they would be exposed. Much of this damage is down to Snowden, who is quite deliberately causing as much harm to U.S. companies and the U.S. national interest as he possibly can, leaking these stories in media that are most likely to hype them in ways that will be damaging to the United States. >> NARRATOR: It should have been no surprise that the NSA would be digging into the companies' data. Immediately after 9/11, the companies had been warned. >> This new law that I sign today will allow surveillance of all communications used by terrorists, including emails, the Internet and cell phones. As of today we'll be able to better meet the technological challenges posed by this proliferation of communications technology. >> NARRATOR: With the signing of the Patriot Act in 2001, a new era of intelligence gathering and surveillance had been set in motion. >> The American people need to know that we are collecting a lot of information and we are spending a great deal of time trying to gather as much intelligence as we possibly can to chase down every lead, to run down every hint so that we can keep America safe, and it's happening. It's happening. >> NARRATOR: It was happening, but it was veiled from public view. In San Francisco in the summer of 2002, a technician at AT&T, Mark Klein, was one of the first to witness something. >> There was some speculation of some kind of spying they are doing, having to do with the new era of fighting terrorism or something. But nobody knew. >> NARRATOR: One day an agent of the National Security Agency showed up to talk to one of Klein's supervisors. >> I happened to answer the door. He comes in. He's wearing a business suit, looking very stern and not smiling at all. That's all I knew about it and I thought I would never hear about this ever again. >> NARRATOR: But later, inside this AT&T facility, Klein noticed something unusual on the sixth floor. >> It's room 641A, says on the door. And what's mysterious about it is there is no door handle. So it looks kind of odd. >> NARRATOR: Klein began to investigate. >> I traced the cabling coming out of the room. I could not find direct cabling going from the secret room to the phone switch. The cabling all seemed to go upstairs. >> NARRATOR: Upstairs on the seventh floor was where AT&T handled Internet traffic. >> What Mark Klein found was an infrastructure that suggested that the government was copying all traffic going through the AT&T Internet backbone. >> NARRATOR: Klein got hold of engineering drawings that showed the cables he had traced were going to a device called a splitter. >> The splitter is basically a glass prism. So you put a cable in there. The light beam goes in there and it's split like that. One half is going to the secret room and the other half is going to its normal, assigned destination. But it's been copied in the process. >> And this was important because if one can split the light or divert the light out of one of those networks, one can copy everyone's traffic on the network. It's kind of an unfathomable amount of information. >> The Internet chops everything up into little data packets. So there's your email, your Web browsing, photos you might be sending. This was a huge dragnet operation. And I was furious because I never signed up to work for the NSA. But I was in my late 50s and I didn't want to lose my job. So I was stuck. And I was afraid. >> NARRATOR: Klein was afraid to speak out for several years. >> The New York Times broke the story about the National Security Agency spying inside... >> NARRATOR: But went public after reading a front page New York Times story about NSA spying in 2005. >> When Mark Klein came out and said, "I work at AT&T and the NSA is tapping into our network," that was the first time that the American public realized how far things had gone since 9/11. How much domestic surveillance there was. He raised this allegation. No one ever acknowledged that it was actually happening. It still remains an open question. But no one has ever denied it either. >> Do you remember the incident in San Francisco where the technician Mark Klein had found the room with the splitter? >> Vaguely. >> What was that about? >> I'm not going to talk about that. >> Was it a legal program? >> Absolutely legal, yes. >> It was? >> Mm-hmm. >> Was it part of warrantless wiretapping? >> (sighs) I don't think so. >> Was it under a FISA court order? >> I'm not going to get into that. To the best of my knowledge, it's still a classified program and I'm not here to divulge national security information. >> One of the big stories this week: the National Security Agency's collection... >> NARRATOR: News stories on warrantless wiretapping brought unwanted attention to the telecom companies. >> Mr. Whitacre, has AT&T provided customer information to any law enforcement agency? >> Senator, we protect the privacy of our customers and we follow the law. That's all I can say about that. >> Are you declining to answer my question, Mr. Whitacre? >> We follow the law, Senator. >> Does AT&T provide customer information to any law enforcement agency? >> We follow the law, Senator. >> That is not an answer. >> AT&T, Verizon, the Bell phone companies, have seen themselves in a kind of partnership with the government for almost 100 years. >> I'm telling you we don't violate the law. We follow the law. >> That's a legal conclusion. >> For almost 70 years, the government guaranteed them a monopoly. >> I'm asking you for a factual matter. >> And so they have always been and continue to be faithful handmaidens of the government's will. >> If you're under instructions by the federal government as a matter of state secrecy not to talk, say so. >> Senator, we follow the law. >> Surveillance assistance is now in the structure of these companies. It's something they're very comfortable with. There's no CEO of a telephone company that's losing sleep over the wiretap assistance that they're providing to law enforcement or the intelligence community. >> NARRATOR: The new Internet companies, on the other hand, were less comfortable cooperating with the government. But even before the NSA's PRISM program, they too had been complying. One CEO, however, decided to fight back. >> In 2004, I got a phone call from the FBI. And they said that they had a letter for me. And within an hour or two, an agent had come to hand-deliver a letter to me. >> The FBI handed him a letter. He looked at the letter, and it asked for what he describes as a significant array of information from his company. And he noticed that it didn't appear to have been signed by a judge. It didn't appear to be a regular court order. >> It was not a warrant. It was not stamped or signed by a court or a judge. It was this letter demanding this information from me, and it also told me that I could never tell anyone that I had gotten the letter. It said that I could tell "no person." >> NARRATOR: Nick Merrill ran a small Web hosting company in New York named Calyx. >> It was a company that I started in 1994. We hosted Mitsubishi Motors, IKEA, Snapple, Tanqueray-- you know, blue chip clients. And we hosted a lot of independent media and non-profit organizations that seemed like good people that I wanted to help, and that was really where my passion was. >> NARRATOR: The letter Merrill received was a National Security Letter, or NSL. After 9/11, the Patriot Act allowed any FBI office in the country to issue NSLs without a court's review and with a gag order. >> It said he couldn't tell anyone about this letter at all. And that gag order is part of what made him concerned about going even to a lawyer. >> To be honest with you, I was terrified to talk to anyone about it, so I didn't. I didn't call any of my colleagues, I didn't speak to anyone about it. It was clear to me that this was an official and genuine document, but I thought that it was not legal and not constitutional. And so I decided to disobey the commandment that I couldn't tell anyone, and I called my lawyer. >> NARRATOR: Merrill enlisted the aid of the American Civil Liberties Union to challenge the letter in court. >> I had doubts myself about whether I was doing the right thing, but what gave me confidence was the fact that we offered to give them the information if they would simply get a real warrant and the fact that they refused to get one. >> NARRATOR: That same year, the FBI issued 56,000 National Security Letters, but Merrill was the first person who had challenged a letter on constitutional grounds. >> He was an independent operator of an Internet company who really cared about privacy and the trust of his users. Most companies are not in that business. Most companies are offering services to large numbers of users and don't really want to deal with some kind of lengthy legal fight. >> To litigate is expensive. When you're getting tens of thousands of these letters a year, to litigate any substantial number of them is ruinous. Besides which, the big companies that are receiving these letters have regulatory business before the U.S. government and they don't want to annoy the authorities. >> NARRATOR: Until 2013, no major Internet or phone company is known to have questioned the constitutionality of a National Security Letter. >> I think that Nick challenged that is fantastic. I would love it if Google had challenged that. >> Why didn't they? >> I have no clue. No idea. I mean, the number of people at Google who can know about the existence of the letter is arguably, like, two or three. You know, presumably it's the lawyer who has been designated to receive them. So maybe two people at Google would know about it. You look at it on its face, it looks like it relates to national security, so you comply. >> NARRATOR: Finally, in 2013, Google did challenge 19 NSLs. By that time, the FBI had withdrawn Merrill's National Security Letter after an appeals court ruled it unconstitutional. >> I think that they were afraid that we would make it to the Supreme Court and they were not 100% certain that they would get the answer that they want. >> The FBI dropped its request, but what's interesting is that he's still not able to talk about exactly what they requested other than that it was information. And he says that if we knew what had been requested that we would be shocked. >> NARRATOR: The big Internet companies had different priorities. At the same time the government was expanding its intelligence gathering, the companies were trying to find out as much as possible about their users, amassing huge data troves. The NSA was watching. >> These companies are in a very difficult spot because the types of activities they engage in is very similar to surveillance. It is surveillance, just for advertising rather than for law enforcement. The private sector is where the whole game is. >> I remember I was talking to someone at Google and I was like, "You mean you keep all that stuff, all those things I search for?" And he said, "Well, yeah." >> NARRATOR: From the beginning, Google founders Larry Page and Sergey Brin had discovered that Web searches were very revealing and very valuable. >> Every search is in some sense an expression of intention. It's an expression of what you want to do, where you want to go, what you're looking for. And that maps very nicely with the desire of advertisers to target their messages towards people at the moment when they are intending to go buy something. >> NARRATOR: From a simple search box, Google struck gold. >> I think it's the most effective product the Internet has ever seen. Google's ads were so effective that all of a sudden, their problem was hiding how much money they made so that Microsoft and other competitors didn't come after them. >> NARRATOR: Page and Brin would make billions. But it was their 2004 launch of Gmail with vastly more storage than Microsoft's Hotmail and Yahoo Mail that immediately sparked controversy for how it mined email content. >> They would scan your mail and try to figure out if there was a relevant ad they could show you alongside the mail. >> They said, "We're going to basically recover our costs and make a profit by showing ads when you send email or when you receive email. And in order to determine what ads to show you, they read your emails. >> There was a wave of negative news stories, comments, blog posts and so forth that came out that day. And the alarm bell was really rung by privacy advocates who said, "We cannot allow this to go forward. "This is crossing a Rubicon. You cannot scan our emails." >> And Google tried to assure them, "Really, no, no, it's not people. "You know, we're just scanning the mail. "Other places scan your mail for spam, "you know, so we're really not even doing anything different "by that. We're just showing you ads." And a lot of people just felt it was creepy. >> If I were to go attach alligator clips to the phone wire, it'd be a felony. I'd go to prison for that. What Gmail proposed was exactly that: a kind of wiretap of all email looking at the content to pitch advertising in real time. >> NARRATOR: At Google, Andrew McLaughlin got a phone call. >> I got a phone call from a staffer for a state senator in California named Liz Figueroa. The staffer said, "Senator Figueroa is deeply concerned "about this practice of targeting ads to email messages. "She's very much interested in pursuing legislation "that would ban this practice, and could we have a conversation?" >> We walk into this room, and it's myself and two of my staff-- my chief of staff and one of my attorneys-- and across from us was Larry, Sergey and their attorney. All of a sudden, Sergey started talking to me. He said, "Senator, how would you feel if a robot "went into your home and read your diary "and read your financial records, read your love letters, read everything, but before leaving the house, it imploded?" He said, "That's not violating privacy." I immediately said, "Of course it is. Yes, it is." And he said, "No, it isn't. "Nothing's kept. Nobody knows about it." I said, "That robot has read everything. "Does that robot know if I'm sad or if I'm feeling fear or what's happening?" And he looked at me and he said, "Oh, no, that robot knows a lot more than that." >> NARRATOR: Believing that Google would never retain the information they collected, Senator Figueroa backed off and amended her bill. >> Unbeknownst to me, ultimately they were going to store the information, and that's why they were against it. And I think it was also, "We don't want legislators interrupting our business model." They were going to move forward. And the whole tech industry went against the bill. >> I believe then and still do that Gmail was a privacy disaster. The moment you allow people to look at the content of your communication for some advertising purpose is the moment that the government is going to come along and say, "If you're going to let them listen in for advertising, "why don't you let us listen in for anti-terrorism or for serious crimes?" And it becomes very difficult for courts to say that the private sector can listen in but the government can't. >> NARRATOR: In fact, much more listening and looking was about to happen. >> How big an impact has Facebook had on our lives? >> It's huge-- half a billion users. I mean, in terms of sheer volume, this is remarkable. >> My friends at the FBI say that they love Facebook. They love it. It is a fantastic tool to see who one communicates and associates with, what they're interested in, etc. >> Facebook realized that with the allure of a social network, people were willing to tell them just about everything about themselves. >> Advertisers are willing to pay for information about people and Facebook has so much data about its members, so they got into this personal data business collecting information about you and allowing advertisers to access it in order to sell you targeted ads. >> NARRATOR: With millions of people posting on Facebook, the executives at Google became worried. >> There was a deep sense of anxiety inside Google that Facebook was nailing a new kind of interaction that Google was proving to be very clunky at doing. >> And I suspect that they thought, "Well, shoot, Facebook has something better "to sell to advertisers. We need to boost our data trove too." And I think what happens is that it's a race to build the best database. >> And so it begins what you might call the data wars: the idea that to really win in this game, you need to have the most data possible. >> NARRATOR: To muster more firepower, Google had bought a leading Internet advertising company. >> The DoubleClick acquisition consolidated the fact that Google was an advertising company. >> They really became the most powerful company in the Internet ad world after that. One Google executive told me that they made a "staggering," that was his word, amount of money from tracking where you'd been on the Web. >> NARRATOR: DoubleClick had pioneered and refined the tracking of people's Web browsing. >> When you go to a website, the website has the opportunity to drop a little file onto your computer called a cookie. It's basically a tracking number. It's just an ID number attached to you. And anytime you go to another website that sees that ID number, they know, "Oh, it's that same person." >> So a cookie is a unique identifier set by any website that your computer interacts with. And to be clear, it doesn't have to be the website that you're visiting. You visit any given site and your computer will interact with dozens, if not hundreds, of servers run by different companies. >> NARRATOR: Today, all the big Internet companies use advanced tracking technology. And the NSA has carefully studied their methods. For them, commercial tracking is an opportunity. >> The NSA sees all this data that's flowing to these advertisers, and they're thinking, "Look at all this data about people's behavior "that's just flying out there "to hundreds of different parties, and oftentimes not encrypted." And so they can just snatch it. >> NARRATOR: At the Washington Post, Bart Gellman was going through his Snowden files, thousands upon thousands of them, unpacking highly technical terms, engineering jargon and computer code. Then one day, he came across this slide. At first, he couldn't understand it. He consulted with his colleague, Internet security expert Ashkan Soltani. >> The slide indicated the use of a specific Google cookie-- it's called the PREF cookie-- that's set by Google. Even if you've never been on google.com, in fact, when you turned on your computer and opened the browser, you were likely to get one of these cookies. >> And we found out that the NSA was piggybacking on that. I mean of course, if you're an NSA collections manager and you want to know, "How do I figure out, "you know, where Bart was or whether he's changed devices "or all this other kind of information about him? "Why don't I just go and get that information "that conveniently has been collected for me "by Silicon Valley companies who do it for their own commercial motives?" >> Because Google's using a tracking cookie, the NSA can sit back and see all that stuff go by. They can monitor all of that activity, all those cookies, and use it in order to track your browsing activity or inject malware into your computer. And if they sent you malware, it would take over your computer and essentially let them access all your data, all your keystrokes, all your passwords, etc. >> NARRATOR: Before publishing, the reporters called Google for comment. >> And Google pushed back very hard. They said, "You should not be associating "our commercial ad cookie technology with U.S. government surveillance." And Ashkan said, "We can prove it. "We can prove that they're using this, that the NSA is piggybacking on your technology." >> And I had their own material indicating how it's used to track people and how it's an identifier. So we were going back and forth, and the Google person was insisting that this is not a tracking cookie. And I said, "Look, here's some links. "This is your own video on YouTube "that you made in 2007 about this cookie and how it's an identifier." >> Cookies remind us of your preferences from the last time you visited. >> NARRATOR: As the article went to press, Google emailed an editor at the newspaper, claiming that Soltani had received funds from a foundation known for supporting privacy projects. Soltani says he never received the alleged funding. >> It was a personal hit on me, and that really surprised me, that they would go after me personally. And so my editor talked to Google and said, "Is anything technically wrong with the story?" And the person said, "No. In fact, it was very technically accurate." >> NARRATOR: The article had revealed the privacy risks associated with advertising. Frontline asked Google for an interview, but they declined. All of the major Internet companies we called in the course of reporting this program refused to participate. >> Google, Apple, Twitter, Yahoo, Facebook, just some of the names represented over at the White House... >> NARRATOR: On December 17, 2013, executives from Silicon Valley went to the White House. >> The heads of some of the country's top tech companies speaking with the president... >> NARRATOR: They had been called in to advise the president on how to fix the administration's troubled health care website. >> That meeting was supposed to be mainly about healthcare.gov, but the tech officials refused to go along with that agenda, and they made the NSA stuff the number one subject there. And they, you know, expressed pretty clearly how unhappy they were with the position that they'd been put in. >> They raised strong objections with President Obama. The heads and general counsels of major Silicon Valley companies tell the president that what he's authorized and what the NSA is doing is doing huge damage to their global markets. >> All of them deeply concerned with what the NSA has been doing... >> We make a tremendous amount of money providing technology and online services, advertising and everything else to people around the world. And all of that goes away if people no longer trust the American government and the companies that are subject to its authority. >> It was another devastating blow for the NSA. Today's reports... >> NARRATOR: The next day, the panel the president had appointed to review NSA policies and programs issued its report. >> The president said those programs are important in the fight against terror. >> NARRATOR: It found that some programs like PRISM had played an important role in preventing terrorist attacks. But it was sharply critical of bulk data collection, dragnet surveillance and the use of National Security Letters. It concluded that the NSA was overreaching and that Americans' civil liberties were at risk. >> We say in the report, "Our concern is about what happens after the next 9/11." In that moment of national panic after a traumatic attack on the United States, will we again throw out civil liberties? Will we again empower the government to erode a little bit of the Constitution? As long as the government has spent taxpayers' money and built up this huge technical collection infrastructure, that could be abused at a time after some other tragedy. We've got to be damn sure, since we've built this thing, that it can't be used against us. >> NARRATOR: Over the last few months, there have been more reports. >> Access the popular game Angry Birds... >> NARRATOR: About potential surveillance of smartphone apps and webcam images and hundreds of millions of text messages, how the NSA is capable of recording all of a foreign country's phone calls and is racing to build a computer that can defeat most kinds of encryption. >> Could allow the NSA to map out a person's life... >> Look, let me give you the existential complaint of the American intelligence community. Here's how it works living inside America's liberal democracy, of which, by the way, the intel guys are really a part. American political elites feel very empowered to criticize the American intelligence community for not doing enough when they feel in danger. And as soon as we've made them feel safe again, they feel equally empowered to complain that we're doing too much. >> NARRATOR: In late December 2013, Bart Gellman flew to Moscow. Snowden had agreed to meet. >> I went to a hotel that was arranged in advance. I got a phone call. He gave me a place to meet within a certain time period, and he showed up. He met me, shook my hand, said almost nothing and led me away, and we moved to a place that he considered secure. >> NARRATOR: Gellman interviewed Snowden for 14 hours over two days. >> I asked him the hard questions about being in Moscow, or about whether he thought any of these stories were doing damage or, you know, all the other things that people want to know when they're thinking about his conduct. And I found a guy who was almost Zen-like in his serenity and his comfort with what he had done, that he had consciously decided he was willing to take huge risks to provoke a public debate. And he provoked a public debate that no one could possibly have foreseen. >> That's a fundamentally dangerous thing to democracy... >> ...dragnet surveillance that the president himself said was urgent... >> You can't have 100% security and also then have 100% privacy... >> We take our role really seriously. I think it's my job to protect everyone who uses Facebook and all the information that they share with us... >> So where we are now is in a place where we're living behind one-way mirrors. Corporate America and law enforcement and national security state know so much about us, and we know so little about them, we know so little about what they're doing, how they're doing it. And we can't actually hold our government accountable because we truly don't know what it's doing. >> Go to pbs.org/frontline. How can you protect your personal data online? Find out in our special podcast. What does it mean when the NSA has your number? Learn what your data trail reveals about you. How did we get here? >> ...illegal and unconstitutional. >> Watch part one of this series and connect to the Frontline community. Follow us on Facebook, Twitter or pbs.org/frontline. >> For more on this and other Frontline programs, visit our website at pbs.org/frontline. Frontline's "United States of Secrets" is available on DVD. To order, visit shopPBS.org or call 1-800-PLAY-PBS. Frontline is also available for download on iTunes.