Millennials have had to get used to being characterised as lazy, selfish and narcissistic. Now this much maligned generation face the more serious accusation of being traitors to their country.

In the wake of this week's Wikileaks dump of top secret files, a former CIA director has broken cover to point the finger at the millennial generation for the growing trend in damaging security blunders.

"I don’t mean to judge them all," Michael Hayden told BBC2's Newsnight on Thursday, "But this group of millennials…simply have different understandings of the words loyalty, secrecy and transparency than my generation did."

Just so everyone is in no doubt who he is talking about, Hayden named Edward Snowden and Chelsea Manning as the worst cases of millennial treachery.

Whistleblowing controversies of the last decade Show all 12 1 /12 Whistleblowing controversies of the last decade Whistleblowing controversies of the last decade Edward Snowden NSA leak Articles in The Guardian revealed that the US and the UK spied on foreign leaders and diplomats at the 2009 G20 summit. Reuters Whistleblowing controversies of the last decade WikiLeaks' US diplomatic cables leak In 2009, former US soldier Chelsea Manning, downloaded hundreds of thousands of classified US Government documents, and passed them on to Jullian Assange's whistleblowing website WikiLeaks. Among the documents were 250,000 State Department diplomatic cables. One disclosed the close relationship between Russian President Vladimir Putin and then-Italian Prime Minister Silvio Berlusconi, the Guardian reported. Allegations included "lavish gifts", lucrative energy contracts and the use by Berlusconi of a "shadowy" Russian-speaking Italiango-between. Getty Images Whistleblowing controversies of the last decade WikiLeaks' US diplomatic cables leak WikiLeaks' US diplomatic cables leak: In a revelation which bruised the UK's 'special relationship' with the US, WikiLeaks published conversations by US commanders criticising Britain's military operations in Afghanistan. Getty Images Whistleblowing controversies of the last decade WikiLeaks' US diplomatic cables leak WikiLeaks' US diplomatic cables leak: One document disclosed startling levels of corruption in Afghanistan, including an incident involving the then vice-president, Ahmad Zia Massoud, who was reportedly stopped and questioned in Dubai when he flew into the emirate with $52m in cash. Getty Images Whistleblowing controversies of the last decade WikiLeaks' US diplomatic cables leak Another cable documented fears in Washington over Pakistan's nuclear weapons programme, in a volatile country with a strategic position in the Middle East. PA Whistleblowing controversies of the last decade WikiLeaks' US diplomatic cables leak Day four of the gradual drip of leaks exposed allegations that Russia and its intelligence agencies are using mafia bosses to carry out criminal operations, with one cable reporting that the relationship is so close that the country has become a "virtual mafia state". Getty Images Whistleblowing controversies of the last decade Edward Snowden NSA leak In 2013, The Guardian published classified US National Security Agency (NSA) documents, from a then anonymous whistleblower. Four days later he was exposed as former NSA contractor Edward Snowden. A month after the initial leak, the New York Times allegeded that the NSA received emails, video clips, photos, voice and video calls, social networking details, logins and other data held by a range of US internet firms. Whistleblowing controversies of the last decade Edward Snowden NSA leak Since Snowden revealed that the US had eavesdropped on German Chancellor Angela Merkel's phone, German-US relations have been strained. In May 2014, Mrs Merkel said still had significant differences with the United States over surveillance practices and that it was too soon to return to “business as usual," according to the New York Times. Getty Images Whistleblowing controversies of the last decade Edward Snowden NSA leak On 7 June, The Guardian published the Presidential Policy Directive 20, whcih included a list of potential targets for cyber-attacks by the US Government. Rex Features Whistleblowing controversies of the last decade Samy Kamkar iPhone and Android exposé In April 2014, hacker and researcher Samy Kamkar revealed that Android phones collect user location data every few seconds. Files are then transited to Google several times an hour. Getty Images Whistleblowing controversies of the last decade Samy Kamkar iPhone and Android exposé It is believed Apple and Google are using the data to better target adverts to smartphone users, according to The Guardian. Getty Images Whistleblowing controversies of the last decade Samy Kamkar iPhone and Android exposé The two companies have since justified the collection of data. In a letter to the US congress Apple confirmed it collected the data and said that, in order to be useful, "the databases [of tower and network locations] must be updated continuously". A Google spokesman told the Guardian Android phones explicitly asked to collect anonymous location data when users turned them on. Getty Images

"So we bring these people into the agency – good Americans all, I can only assume – but again, culturally, they have different instincts than the people who made the decision to hire them and we may be running into this different cultural approach."

So has Hayden helpfully identified a glitch in the cultural makeup of the millennial generation or is he simply looking for a new scapegoat for an old problem?

In the digital age the skills of the professional gamer and amateur hacker have become highly prized assets among the CIA and GCHQ who actively recruit from the “geek” generation for their code breakers.

This is the reason why so many millennials work for internet companies like Google and Facebook or join hacking groups like Anonymous and Lulz – or even a whistleblowers' portal (such as Wikileaks).

But it is hardly the fault of the millennial generation that because hacking is a young person's game their talents are suddenly in demand.

Edward Snowden addresses Facebook fake news claims

The truth is treachery is not a new phenomenon that can be laid at the door of one particular generation.

Britain and America's history is littered with cases of young (and not so young) spies who have committed acts of treachery or whistleblowing (depending on your point of view) for all kinds of reasons.

Nevertheless, motives such as idealism and ideology do seem to have played a greater influence over younger spies.

Britain's most notorious gang of double agents, the Cambridge Spy Ring, were all twenty-somethings when they started passing on secrets to the Soviets in the 1930s and 1940s.

More recently David Shayler and Annie Machon, who blew the whistle on an MI5 plot to kill Colonel Gaddafi, were only in their late 20s when they first felt the stirrings of betrayal in the 1990s.

But it is not just twenty-somethings who commit acts of treachery. The most famous American double agent, responsible for the deaths of at least ten American agents, was well into his 40s when he started passing secrets to the KGB.

Aldrich Ames compromised more CIA "assets" than any other mole in history until Robert Hanssen's arrest seven years later in 2001. Hanssen, a career CIA officer, was 39 when he started his Soviet spying career.

Perhaps this shows that when it comes to treachery no generation is more culpable than any other.

What Hayden and the rest of his baby boomer generation forget is that in the age of the internet, secrets are much harder to keep while the tools of the whistleblower and the leaker are capable of causing catastrophic damage.

The security services in the UK and America have sophisticated vetting procedures which are supposed to spot high-minded young men and women who might one day put principle before country.

But history shows us that no system of secrecy is perfect. Demonising a new generation for one of the oldest sins of all is a desperate attempt to avoid confronting the urgent problem of protecting state secrets in a digital age.