Professor Mark Ryan led a team at the university to develop a system which he says is secure enough to ward off potential attacks from foreign superpowers who might try to influence an election.

He said: "You could have state-sponsored criminals who would want to change the outcome of the election. Estonia use an electronic system and it's often suprising to me that it isn't more secure.

"It seems to be a real threat. A lot of the computers we use are built [abroad], so we have to assume that at source, where these things are made, in the factories, malware could be installed at that stage."

Professor Ryan says his team's system needs more testing before it is fully secure, but estimates that we could be voting electronically by the 2025 general election.

The system, which took two-and-a-half years to build, is based on the card readers used in online banking. It involves a separate device, the size of a credit card, which is small and simple enough to avoid being vulnerable to viruses, and would connect to a voter's computer.

A mock-up of the online voting system developed by a University of Birmingham team

Professor Ryan said that with the proper security, he hopes an electronic system could protect against vote-rigging of the kind carried out by disgraced Tower Hamlets mayor Lutfur Rahman.

"That's the kind of thing that we hope would take place. We hope that there would be better authentication of voters and prevention of the coercion of voters and manipulation of results."

He added that other benefits to electronic voting could include an increase in turnout, especially among young people, because they "live their entire lives online."

The current system also means blind people's votes are never private, but an electronic programme could be tailored to mean they could vote in secret for the first time.

To avoid coercion, and to help people who are unused to computer technology, people would also be able to vote in person using the traditional method, overriding any electronic votes which might have been made under pressure from family members.