The former head of GCHQ has launched a robust defence of end-to-end encryption in his first interview since leaving the agency.

Appearing on this morning’s Today programme, Robert Hannigan described the technology as “overwhelmingly a good thing”.

Following recent terror attacks, Theresa May has claimed tech firms offer terrorists a place to hide – but Hannigan said the solution isn’t to water down encryption in apps like WhatsApp.

“I don’t advocate building in backdoors,” he said. “It’s not a good idea to weaken security for everybody in order to tackle a minority.”

Instead, the police and intelligence agencies should target the phones or laptops used by people abusing encryption, the ex spy chief argued.

End-to-end encryption is more secure than normal encryption because the firms providing the service can’t decrypt the data.

“You can’t un-invent end-to-end encryption […],” Hannigan added. “You can’t legislate it away.”