In 2009 the American ambassador to Tunisia spent the evening at the home of Mohamed Sakher el-Materi, the president's son-in-law. By any standards the dinner was lavish – yogurt and ice cream were flown in from St Tropez – and the home was opulent. In a cable, made public by WikiLeaks, the diplomat wrote: "The house was recently renovated and includes an infinity pool … there are ancient artefacts everywhere: Roman columns, frescos and even a lion's head from which water pours into the pool. Materi insisted the pieces are real." By Tunisian standards it was particularly obscene. El-Materi owned a tiger and fed it four chickens a day.

The US diplomatic corps in Tunis understood this was a problem. In a cable the previous year, entitled What's yours is mine, they'd written: "With Tunisians facing rising inflation and high unemployment, the conspicuous displays of wealth and persistent rumours of corruption have added fuel to the fire." But the US continued to back the Tunisian president anyway, considering him a reliable ally against terrorism and preferring a dependable dictatorship to an unpredictable democracy. Until, of course, a couple months after the WikiLeaks revelations, Tunisians rose up and ejected him, unleashing a wave of revolutions in the region.

WikiLeaks did not cause these uprisings but it certainly informed them. The dispatches revealed details of corruption and kleptocracy that many Tunisians suspected, but could not prove, and would cite as they took to the streets. They also exposed the blatant discrepancy between the west's professed values and actual foreign policies. Having lectured the Arab world about democracy for years, its collusion in suppressing freedom was undeniable as protesters were met by weaponry and tear gas made in the west, employed by a military trained by westerners.

On Monday Bradley Manning, the young man who leaked those diplomatic cables, goes on trial in a military court in Maryland. He has pleaded guilty to 10 charges which would put him behind bars for 20 years. But that is not enough for the US military that has levelled 22 charges against him, including espionage and "aiding the enemy", which carries up to life in prison without parole. At the time Manning released the diplomatic cables and military reports he wrote: "I want people to see the truth … regardless of who they are. Because without information, you cannot make informed decisions as a public." He hoped by releasing the cables he would spark "worldwide discussion, debates, and reforms".

If the leaks laid bare the hypocritical claim that the US was exporting democracy, then the nature of his incarceration and prosecution illustrate the fallacy of its insistence that it is protecting both freedom and security at home. Manning's treatment since his arrest in May 2010 has involved a number of serious human rights violations.

At various times since his arrest he has been held in solitary confinement for 23 out of 24 hours a day for five months in succession, held in an 8ft by 6ft cell, been forced to sleep naked apart from an anti-suicide smock for two months, and been woken up to three times a night while on suicide watch. Following an investigation, the UN special rapporteur on torture, Juan Ernesto Méndez, last year argued Manning had been "subjected to cruel, inhuman and degrading treatment".

Meanwhile, the case against him indicates the degree to which the war on terror (a campaign that has been officially retired describing a legal, military and political edifice that remains firmly intact) privileges secrecy over not only transparency but humanity. This is exemplified in one of his leak's more explosive revelations – a video that soon went viral showing two Reuters employees, among others, being shot dead by a US Apache helicopter in Iraq. They were among a dozen or so people milling around near an area where US troops had been exposed to small arms fire. The soldiers, believing the camera to be a weapon, opened fire, leaving several dead and some wounded.

"Look at those dead bastards," says one pilot. "Nice," says the other. When a van comes to pick up the wounded they shoot at that too, wounding two children inside. "Well, it's their fault for bringing their kids into a battle," one of the pilots says.

An investigation exonerated the soldiers on the grounds that they couldn't have known who they were shooting. No disciplinary action was taken. When Reuters tried to get a copy of the video under the Freedom of Information Act, its request was denied. Were it not for Manning it would never have been made public. So the men who killed innocents, thereby stoking legitimate grievances across the globe and fanning the flames of resistance, are free to kill another day and the man who exposed them is behind bars, accused of "aiding the enemy".

In this world, murder is not the crime; unmasking and distributing evidence of it is. To insist that Manning's disclosure put his military colleagues in harm's way is a bit like a cheating husband claiming that his partner reading his diary, not the infidelity, is what is truly imperilling their marriage. Avoiding responsibility for action, one instead blames the information and informant who makes that action known.

There is no need to deify Manning, or WikiLeaks, in all of this. While no one has yet to make a credible case that any of the information he released put a single US soldier in greater danger than they already were by occupying a foreign country, not all of it was as damning as the Apache incident or revelatory as the Tunisian cables.

Much was the routine reports of diplomats to their bosses – channels that, for those of us who prefer diplomacy to war, we should want to protect. The chance of exposing hypocrisy must be weighed against the certainty of inhibiting the kind of candid, private back-door discussions that have helped make everything from the Northern Ireland peace process to the release of Nelson Mandela possible.

Elizabeth Goitein, co-director of the Brennan Center for Justice's Liberty and National Security Program, told the Washington Post that Manning's leaks were a "reckless … data dump … [but] he is not an enemy of the state". But it's not just about Manning. It's about a government, obsessed with secrecy, that has prosecuted more whistleblowers than all previous administrations combined. And it's about wars in which the resistance to, and exposure of, crimes and abuses has been criminalised while the criminals and abusers go free. If Manning is an enemy of the state then so too is truth.

Twitter: @garyyounge