General Michael Hayden, who also headed CIA, admits US and UK agencies have become too secretive for their own good

Western intelligence agencies must be more transparent and open to scrutiny if they are to keep public support for the type of mass surveillance techniques that have been revealed by Edward Snowden, a former director of the US National Security Agency has admitted.

General Michael Hayden said he believed the American and British intelligence agencies had to "show a lot more leg" if they wanted to win broad public understanding and support for the type of programmes they were undertaking.

Speaking in London, Hayden said western security services were having to make difficult adjustments to new challenges. It was not fair for America's critics to "cross your arms and cluck at us", he said.

Hayden was director of the NSA for six years between 1999 and 2005, and was director of the CIA for three years until 2009.

Speaking in Westminster at an event organised by the Henry Jackson Society, Hayden admitted security agencies had become too secretive for their own good.

Even if every individual decision to keep something secret could be justified, the total effect was harmful, he argued.

"It's clear to me now that in liberal democracies the security services don't get to do what they do without broad public understanding and support.

"And although the public cannot be briefed on everything, there has to be enough out there so that the majority of the population believe what they are doing is acceptable."

He added: "My community has to show a lot more leg or we won't get to do any of what we want to do because the public support is so withdrawn that, politically, nobody is going to give us the authorisation."

Presidents can do "one-offs" without constitutional authority, he said, but "no president can do something repeatedly over a long term without that broad popular support".

The problem for western intelligence agencies was that they were designed in a different era, and are trying to change tack to face new enemies.

"All US security structures were created in about 1947, and so we are hardwired for the security problems of 1947, which fundamentally were encompassed by the power of nation states.

"We are still hardwired to deal with those issues. But now the things that fundamentally affect citizens most, like cyber attacks, terrorism and transnational crime, are not the product of nation states. They are the product of nation state weakness or nation state absence.

"So we are taking this hardwired national security structure which is designed to go this way, and we are trying to get it to go that way."

Hayden defended the NSA's Prism programme which, he said, had not "caused much of a ripple in the United States".

But he admitted that a separate programme that allowed the NSA to collect simple 'metadata' on all phone calls in the United States was "going deep and to the edge of the line."

Hayden said: "I can understand congressmen saying, 'I'm not sure that was the intent in that provision of the Patriot Act'.

"But then I would say, 'Why didn't you read the letter sent to all of you in 2009 and in 2011 before you reauthorised the Patriot Act, which clearly says the NSA was collecting metadata on all phone calls in the United States.'"

Hayden said he did not regard Snowden as a whistleblower because he had not highlighted any wrongdoing.

"He has pointed out many things that people may think are unwise but they are not illegal."

He added: "Even if you object to some of the things my government has done or is doing, I am asking for deeper understanding.

"We are trying to adapt security services that were designed for state powers [to deal with] non state actors. Many dangers for our citizens don't come from other states, they come from individuals and states are not well equipped to deal with that."