Mostly he remained inconceivably calm. Even now, with the clock winding down on his freedom, Snowden still went to bed at 10.30, as he had every night during my time in Hong Kong. While I could barely catch more than two hours of restless sleep at a time, he kept consistent hours. ‘Well, I’m going to hit the hay,’ he would announce casually each night before retiring for seven and a half hours of sound sleep, appearing completely refreshed the next day. When we asked him about his ability to sleep so well under the circumstances, Snowden said that he felt profoundly at peace with what he had done and so the nights were easy. ‘I figure I have very few days left with a comfortable pillow,’ he joked, ‘so I might as well enjoy them.’

Glenn Greenwald​ expresses his bafflement and the reader can share it. The journalist is in a panic – about security, about deadlines, about being scooped, about being misunderstood – while the source is cool and inscrutable. Snowden later told the Guardian’s editor, Alan Rusbridger, that if ‘I end up in chains in Guantánamo Bay … I can live with it’. Greenwald is a former constitutional and human rights lawyer, and now a journalist who isn’t afraid to point the finger at the conventional and the powerful. Snowden came in search of him. At first, Greenwald thought him another nutter – it’s a world of nutters – until the filmmaker Laura Poitras showed him some emails. In one of them, we see the degree of Snowden’s commitment. All his predictions came true, and he was ready from the beginning to see the plan through, at whatever cost to himself. He had it all worked out. The shock after the first revelations, he wrote,

will provide the support needed to build a more equal internet, but this will not work to the advantage of the average person unless science outpaces law. By understanding the mechanisms through which our privacy is violated, we can win here … In the end, we must enforce a principle whereby the only way the powerful may enjoy privacy is when it is the same kind shared by the ordinary: one enforced by the laws of nature, rather than the policies of man.

Greenwald next saw some documents. His heart is always racing, he’s always plunging in, getting excited, and he’s always anxious about things falling apart. (He’s that kind of reporter.) But he knows what he’s doing and in this case he made an immediate and powerful connection between himself, the source and the Guardian editors in New York. To all of them it seemed too good to be true: a highly placed source within the US security establishment wished to tell the world about ‘a system of secret, pervasive surveillance from which there is no refuge’. In his book, Greenwald hops from anxiety to anxiety, and spends quite a bit of time objecting to the Guardian’s ideas – for instance, its suggestion that Ewen MacAskill, an experienced reporter, go to Hong Kong with him and Poitras. The Guardian knew, as it did in its earlier dealings with Julian Assange, that sources aren’t the same as journalists, and that not all journalists can make a story secure. Greenwald, for his part, paints a portrait of a slightly desperado world of reporters flying by the seat of their pants – always exhausted, always taking the batteries out of their phones to escape surveillance, always booking flights at a few hours’ notice, always up against it, and often in danger. I have spent a lot of time with these people and you feel the fear coming off them, not fear of arrest, or of Isis or the CIA, but fear of losing a story or missing a vital exclusive. But MacAskill was not put off by Greenwald and Poitras’s protectionism and they went to Hong Kong in a posse.

Compared to any other major leak in recent times, the material passed on was not only of the highest order but beautifully organised. If there was a Zen prize for whistleblowers, Snowden would win without trying: he checks and labels everything, he thinks out the moral, he cross-references and relates the material to possible future outcomes. Most of all: he let his name come out for the sake of veracity and to put a human face to the leaks, then he aimed to disappear and say little and profit nowhere, letting the story be bigger than him. He wouldn’t be calling press conferences or having Twitter wars. He simply organised the material and then appended a few notes to explain to the journalists what he was doing. ‘I understand that I will be made to suffer for my actions,’ he wrote somewhat dramatically,

and that the return of this information to the public marks my end. I will be satisfied if the federation of secret law, unequal pardon and irresistible executive powers that rule the world that I love are revealed for even an instant. If you seek to help, join the open-source community and fight to keep the spirit of the press alive and the internet free. I have been to the darkest corners of government, and what they fear is light.

The methodical 29-year-old man in the white T-shirt and faded jeans was not what anybody had expected. He was a gamer who had spent years in front of screens and had found his moral life there, and he related to the net the way older people relate to literature. He had been on $200,000 a year, had a life in Hawaii and a girl he liked, when he walked out in May 2013 with a couple of thumb drives full of the information that would change everything. In time he might be seen as one of the friends of democracy. He went to Hong Kong with a full understanding that at home he would be branded a danger to national security. The great human story of Edward Snowden is not actually told here. Greenwald isn’t that sort of writer and he quickly moves past his source to give the epic and interesting story behind the story, an argument about the surveillance state and Greenwald’s part in exposing it. For the time being, it is part of Snowden’s virtue that he appears to dwell in invisibility, not yet a memoirist, and perhaps it will take other books and a few good movies to bring him closer.

What Greenwald loves is a story of injustice, and that is what we get, a sound argument peppered with outrage. He has strong grounds for complaint. Not only was he branded a collaborator – in the world of journalism now, when it comes to security stories, one is either a stooge or a patriot, never just a reporter – but Greenwald had to suffer the punishment of seeing his husband detained at Heathrow airport. Waves of American scaremongering about the clear and present (as opposed to vague and mostly absent) danger of terrorist activity on the homeland has changed both America and Britain. Surveillance in the UK is an implicitly sanctioned habit that has smashed the moral framework of journalism. Protection of sources is not an adornment, not some optional garment worn only when it suits, but a basic necessity in the running of a free press in a fair democracy. Snowden proved that, but not to the satisfaction of Britain’s home affairs establishment, or the police, who like to behave as if all freedoms are optional at the point of delivery. Rusbridger recently made the point that source confidentiality is in peril, after the revelation that the Metropolitan Police had spied on the phone records of the political editor of the Sun, Tom Newton Dunn. Snowden might have taught us to expect to be monitored, but his message, that our freedom is being diluted by a manufactured fear of the evil that surveillance ‘protects’ us from, is not being heard. Louder and clearer to many is the message that comes from the security state mind, a suspicion carried on the air like a germ, that certain kinds of journalism, like certain aspects of citizenship, are basically treacherous and a threat to good management. This germ has infected society to such a degree that people don’t notice, they don’t mind, and a great many think it not only permissible but sensible and natural, in a culture of ‘threat’, to imagine that privacy is merely a luxury of the guilty.

We live in a world where more people drown in the bath than are killed by terrorists. Ecstasy tablets have killed more Westerners than the Islamic State. But the internalisation of the terrorist threat after 9/11 is the real story behind Greenwald’s tale. ‘We don’t have a domestic spying programme,’ Barack Obama said on the Tonight Show with Jay Leno in August 2013. ‘What we do have are some mechanisms where we can track a phone number or an email address that we know is connected to some sort of terrorist threat.’ In truth, as Greenwald reveals, a trillion dollars have been spent on security since those two passenger jets were flown into the Twin Towers. Looking back, we might agree that 9/11 unleashed terrible furies in the minds of America and its allies, that it literally drove the security agencies and their leaders mad with the wish to become all-knowing and to make the country impregnable. Everything could go – every letter of the law or constitutional tenet – and so could the notion of freedom itself. ‘A population,’ Greenwald writes, ‘a country that venerates physical safety above all other values will ultimately give up its liberty and sanction any power seized by authority in exchange for the promise, no matter how illusory, of total security.’ This was the culture, this mindless attempt at ‘total security’, that Snowden shone a light into, a world where we forgot that it is for governments to be transparent and for individuals to be private. The reversal of these things is the spirit of the age.

Crazily, it was often journalists who opposed Snowden’s actions and hated what Greenwald was writing. In a moment of pure farce, GCHQ sent staff to enforce the destruction of hard drives in the Guardian’s offices. In historical terms this was bizarre. There was never any question of Ben Bradlee blocking the efforts of his reporters at the Washington Post at the time of Watergate or destroying notes gleaned from Deep Throat, their best source. James Goodale, the lawyer for the New York Times while it was attempting to publish the Pentagon Papers, made the case most strongly that it was a First Amendment issue, and that the paper had a duty to present the material brought to it by Daniel Ellsberg, believing it would enlighten the public as to what the government was doing. Though an injunction was sought by the US attorney general, it was rejected by the judge, Murray Gurfein, who said, memorably, that ‘a cantankerous press, an obstinate press, a ubiquitous press must be suffered by those in authority in order to preserve the even greater values of freedom of expression and the right of the people to know.’

Greenwald is always ready to accuse editors and collaborators of cowardice if they move too slowly. He hates caution and wants the story out, and sometimes there is more glory-hunting than careful reasoning on the page. Yet he emerges from his own book as a very necessary kind of reporter in these times, someone who, no matter what his motivations, was able to withstand the hostile fire coming at him from members of his own profession. Not only Fox News, but people such as Jeffrey Toobin of the New Yorker saw it as part of their duty to condemn Snowden’s efforts to tell the truth. Toobin said the whistleblower should be in jail. Greenwald also fared badly at the hands of the New York Times, which enjoyed the idea that a ‘blogger’ wasn’t quite a journalist, despite the fact that most of its own journalists are happy to tweet and blog their copy all day and half the night. Greenwald’s reporting work was relentless if somewhat ruthless, involving threats to take the story away from the Guardian if it wasn’t run when he wanted, but he deserves the credit he gives himself. The Committee to Protect Journalists – an international organisation that monitors attacks on press freedoms by the state – issued its first ever report about the United States in October 2013. Written by Leonard Downie Jr, a former executive editor of the Washington Post, the report concluded: ‘The administration’s war on leaks and other efforts to control information are the most aggressive … since the Nixon administration … The thirty experienced Washington journalists at a variety of news organisations … interviewed for this report could not remember any precedent.’

The revelations were proving difficult for America, and, not least, for American journalism. Why is that? Have the post-9/11 media come to see their role differently? Have they lost their love of independence? Are they there to uphold the government’s abuses, not check them, as part of some new loyalty to the general battle against the forces of evil? Commentators were eager, in any case, to brand Greenwald not as a clever, resourceful, truth-revealing reporter but as a ‘co-conspirator’. How do you get to that? His source came to him with devastating material, and Greenwald checked it out and wrote the stories. David Gregory, the ‘journalist’ who presents Meet the Press, conducted an interview with Greenwald that proved to be a new low, even in the era of supine, on-message political journalism. ‘To the extent that you have aided and abetted Snowden, even in his current movements, why shouldn’t you, Mr Greenwald, be charged with a crime?’

Imagine asking that of Woodward and Bernstein. Or of any member of the Sunday Times Insight team or of Seymour Hersh. ‘Beyond the rhetorical fallacy,’ Greenwald writes,

a TV journalist had just given credence to the notion that other journalists could and should be prosecuted for doing journalism, an extraordinary assertion. Gregory’s question implied that every investigative reporter in the United States who works with sources and receives classified information is a criminal. It was precisely this theory and climate that had made investigative reporting so precarious.

On the not at all ironically titled CNN show Reliable Sources, there was a discussion about the leaks with a dramatic onscreen graphic carrying the legend ‘Should Glenn Greenwald be prosecuted?’ Walter Pincus of the Washington Post felt it was all Julian Assange’s doing (which it wasn’t), while Andrew Ross Sorkin of the New York Times used his CNBC show to say he would arrest Greenwald for seeming to want to get Snowden to Ecuador.

Perhaps we should just be grateful that these commentators didn’t form the wellspring of journalistic endeavour in the darkest days of apartheid. But Greenwald brilliantly describes the period they have brought into being under Obama’s extended wing. We learn that journalism, perhaps in imitation of Western governance itself, has ripped up the rulebook since 2001. It’s less a question of ‘What’s the real story?’ as ‘Whose side are you on?’ That this should be a disaster for the generally liberal-minded will not occur to these bin-rakers and text-inspectors, who think warriors for digital privacy are not that different from the men who would cut off your head. Such commentators are building the dark places they claim to hate – they spread their own kind of terror and advocate their own intolerance – and for such people, no matter what cave or desert or studio they reside in, the truth is always the enemy.

The first thing that amazed me about Julian Assange was how fearful he was – and how right, as it turned out – about the internet being used as a tool to remove our personal freedom. That surprised me, because I’d naively assumed that all hackers and computer nerds were in love with the net. In fact, the smarter ones were suspicious of it and understood all along that it could easily be abused by governments and corporations. The new technology would offer the chance of mass communication and networking like never before, but lurking in all those servers and behind all those cameras was a sinister, surveilling machine of ever growing power. The US government sought omniscience – ‘a system that has as its goal the complete elimination of electronic privacy worldwide’ – and showed by such actions that it considers itself above the prospectus set out in its own constitution. The leaders of the NSA said, ‘collect it all,’ and the people put up with it.