The conviction of Bradley Manning under the 1917 Espionage Act, and the US Justice Department's decision to file espionage charges against NSA whistleblower Edward Snowden under the same act, are yet further examples of the Obama administration's policy of using an iron fist against human rights and civil liberties activists.

President Obama has been unprecedented in his use of the Espionage Act to prosecute those whose whistleblowing he wants to curtail. The purpose of an Espionage Act prosecution, however, is not to punish a person for spying for the enemy, selling secrets for personal gain, or trying to undermine our way of life. It is to ruin the whistleblower personally, professionally and financially. It is meant to send a message to anybody else considering speaking truth to power: challenge us and we will destroy you.

Only ten people in American history have been charged with espionage for leaking classified information, seven of them under Barack Obama. The effect of the charge on a person's life – being viewed as a traitor, being shunned by family and friends, incurring massive legal bills – is all a part of the plan to force the whistleblower into personal ruin, to weaken him to the point where he will plead guilty to just about anything to make the case go away. I know. The three espionage charges against me made me one of "the Obama Seven".

In early 2012, I was arrested and charged with three counts of espionage and one count of violating the Intelligence Identities Protection Act (IIPA). (I was only the second person in US history to be charged with violating the IIPA, a law that was written to be used against rogues like Philip Agee.)

Two of my espionage charges were the result of a conversation I had with a New York Times reporter about torture. I gave him no classified information – only the business card of a former CIA colleague who had never been undercover. The other espionage charge was for giving the same unclassified business card to a reporter for ABC News. All three espionage charges were eventually dropped.

So, why charge me in the first place?

It was my punishment for blowing the whistle on the CIA's torture program and for confirming to the press, despite government protestations to the contrary, that the US government was, indeed, in the business of torture.

At the CIA, employees are trained to believe that nearly every moral issue is a shade of grey. But this is simply not true. Some issues are black-and-white – and torture is one of them. Many of us believed that the torture policy was solely a Bush-era perversion. But many of these perversions, or at least efforts to cover them up or justify them, have continued under President Obama.

Obama and his attorney general, Eric Holder, declared a war on whistleblowers virtually as soon as they assumed office. Some of the investigations began during the Bush administration, as was the case with NSA whistleblower Thomas Drake, but Espionage Act cases have been prosecuted only under Obama. The president has chosen to ignore the legal definition of whistleblower – any person who brings to light evidence of waste, fraud, abuse or illegality – and has prosecuted truthtellers.

This policy decision smacks of modern-day McCarthyism. Washington has always needed an "ism" to fight against, an idea against which it could rally its citizens like lemmings. First, it was anarchism, then socialism, then communism. Now, it's terrorism. Any whistleblower who goes public in the name of protecting human rights or civil liberties is accused of helping the terrorists.

That the whistleblower has the support of groups like Amnesty International, Human Rights Watch, or the American Civil Liberties Union matters not a whit. The administration simply presses forward with wild accusations against the whistleblower: "He's aiding the enemy!" "He put our soldiers lives in danger!" "He has blood on his hands!" Then, when it comes time for trial, the espionage charges invariably are either dropped or thrown out.

The administration and its national security sycophants in both parties in Congress argue that governmental actions exposed by the whistleblower are legal. The Justice Department approved the torture, after all, and the US supreme court said that the NSA's eavesdropping program was constitutional. But this is the same Justice Department that harassed, surveilled, wiretapped and threatened Martin Luther King Jr, and that recently allowed weapons to be sold to Mexican drug gangs in the Fast and Furious scandal. Just because they're in power doesn't mean they're right.

Yet another problem with the Espionage Act is that it has never been applied uniformly. Immediately after its passage in 1917, American socialist leader Eugene V Debs was arrested and imprisoned under the Espionage Act – simply for criticizing the US decision to enter the first world war. He ran for president from his prison cell.

Nearly a century later, when the deputy director for national intelligence revealed the amount of the highly-classified intelligence budget in an ill-conceived speech, she was not even sent a letter of reprimand – despite the fact the Russians, Chinese, and others had sought the figure for decades. When former Defense Secretary and CIA Director Leon Panetta boastfully revealed the identity of the Seal Team member who killed Osama bin Laden in a speech to an audience that included uncleared individuals, the Pentagon and the CIA simply called the disclosure "inadvertent".

There was no espionage charge for Panetta. But there was a $3m book deal.

The Obama administration's espionage prosecutions are political actions for political reasons, and are carried out by political appointees. The only way to end this or any administration's abuse of the Espionage Act is to rewrite the law. It is so antiquated that it doesn't even mention classified information; the classification system hadn't yet been invented. The law was written a century ago to prosecute German saboteurs. Its only update came in 1950, at the height of the Julius and Ethel Rosenberg case. The law is still so broad and vague that many legal scholars argue that it is unconstitutional.

The only hope of ending this travesty of justice is to scrap the Espionage Act and to enact new legislation that would protect whistleblowers while allowing the government to prosecute traitors and spies. This would require congressional leadership, however, and that is something that is very difficult to come by. Giants like the late Senators Daniel Patrick Moynihan and Frank Church, and the late Representative Otis Pike, who boldly took on and reformed the intelligence community in the 1970s, are long-gone. Until someone on Capitol Hill begins to understand the concept of justice for national security whistleblowers, very little is likely to change.

The press also has a role to play, one that, so far, it has largely ignored. That role is to report on and investigate the whistleblower's revelations of illegality, not on the kind of car he drives, the brand of eyeglasses he wears, where he went to college, or what his nextdoor neighbor has to say about their childhood.

The attacks on our civil liberties that the whistleblower reports are far too important to move off-message into trivialities. After all, the government is spying on all of us. That should be the story.