The Ministry of Defence’s former cyber security chief has accused the Government of trying to “use” the devastating Westminster attack to grab unnecessary and intrusive surveillance powers.

Major General Jonathan Shaw said ministers were attempting to “use the moment” to push for security services having more control, despite there being only a weak case for it.

Home Secretary Amber Rudd has turned up the heat on internet firms, saying it is “completely unacceptable” that authorities cannot look at encrypted social media messages of attacker Khalid Masood, but her words come as debate continues over allowing spy agencies further intrusive powers – only last year Parliament granted them sweeping new capabilities.

After Ms Rudd demanded access to encrypted messages on sites like WhatsApp, Major General Shaw said unlocking the data would also allow other parties – like criminals and foreign spies – to access it, and said legislating for such a move would not necessarily make it easier to stop future terror attacks.

Speaking to BBC Radio 4’s Today programme, he said: “I think there’s a lot of politics at play here.

“There’s a debate in Parliament about the whole Snooper’s Charter and the rights of the state and I think what they are trying to do is use this moment to nudge the debate more in their line.”

Major General Shaw argued that if the Government does push through laws to decode messages on sites like WhatsApp, terrorists would quickly use other secure methods of communicating.

Amber Rudd says WhatsApp's encryption of messaging may come to an end after Westminster terror attack

He added: “The problem will mutate and move on. We are aiming at a very fluid environment here. We are in real trouble if we apply blunt weapons to this, absolutist solutions.”

Ms Rudd said on Sunday that there must be “no place for terrorists to hide”, following reports that the Westminster attacker Masood was on chat platform WhatsApp before his deadly assault on the streets surrounding Parliament.

Speaking on The Andrew Marr Show, she said: “We need to make sure organisations like WhatsApp, and there are plenty of others like that, don’t provide a secret place for terrorists to communicate with each other.

“In this situation we need to make sure our intelligence services have the ability to get into situations like encrypted WhatsApp.”

She hinted that the Government could be prepared to create new laws on the matter, and speaking to Sky News later said: “I’m calling time on terrorists using social media as their platform…I’m giving them more than a ticking off.”

But Labour leader Jeremy Corbyn told ITV’s Peston on Sunday he did not necessarily back Ms Rudd’s proposal for greater access for security services.

He said: “There is a question of always balancing the right to know, the need to know with the right to privacy.

“I think it probably is [broadly right at the moment]. I’ve been concerned about giving too much unaccountable power to anybody in our society.”

Westminster attack: Londoners share messages of unity

The Investigatory Powers Act gained Royal Assent last year, granting new surveillance powers to agencies including rules that force internet providers to keep complete records of every website that all of their customers visit.

Those are available to a wide range of agencies, which includes the Department for Work and Pensions as well as the Food Standards Agency.