Skip to main content

Some thoughts on e-Voting vulnerabilities.


I'm a little bit surprised about today's Schneier blog post "Security Vulnerability of Switzerland’s E-Voting System



Just to add some context before continuing:  I've been researching into that specific e-Voting system since 2022.  I've reported quite a few vulnerabilities (I hold the 1st place in the 'SwissPost e-Voting' Bug Bounty program), also publishing detailed write-ups for some of these security issues. Even today I got some really bad vulnerabilities still being reviewed.

I understand, and support, all the precautions about e-Voting technologies security people usually express. That said, I can't understand the commonplace assertions that depict e-Voting as an unsolvable problem in general terms, which would irremediably leave us with just the 'paper' option. 

However, the worst part is that the issue described in that article, that apparently sustains the subsequent reasoning, is not even a vulnerability but a malware-based social engineering attack. Long story short: the claimed 'vulnerability' is that the e-Voting protocol is not explained in the printed documentation received by the voters, so if your computer is infected, the malware can modify the victim's browser to  show a malicious Swiss Post eVoting website in order to guide the voter through a different UI to 'bypass' the printed 'security codes', which provide the voters with the ability to validate the individual verifiability.

This is a social engineering attack because even if the full protocol is explained in the printed documentation you receive, the malware already present in your computer would simply adapt its approach by injecting into the locally rendered view of the Swiss Post e-Voting website that "a last-minute change introduced by the Chancellery has modified the protocol previously laid out. Please follow the new instructions.". Or, "Please scan the printed documentation you received and upload the image by using this webform to continue the voting process", and so on...

This situation is even easier to understand by extrapolating it to the 'analog world': the day of the election, while you're on your way to the polling station, you run into someone who eventually tricks you into changing your vote. It may happen, but I wouldn't claim that 'analog' voting is useless as a result.

There are some parts in the original description of the 'vulnerability' that I consider a little bit over the top, to be honest. 

"Even with a Master’s degree in computer science, I have difficulties matching the source code to the public documentation and the theoretical protocol. While third parties have formally verified the cryptographic protocol [7], it is difficult to compare the provably correct theoretical protocol to the actual implementation by Swiss Post due to the code size and complexity (over 60,000 lines of Java code, distributed over almost 800 files). Additionally, the possibility for an attacker to force clients to deviate from the intended protocol has not yet been thoroughly studied, leading to vulnerabilities like the one whose risk we showcased."

I don't even have a degree and I profoundly disagree with the previous statement: I've reviewed some of the largest codebases in the world, and this is the conclusion I mentioned in "Finding vulnerabilities in Swiss Post’s future e-voting system - Part 1", published a year ago. 

"Swiss Post e-voting platform is a quite complex system, comprised of different technologies, whose codebase is approximately 150,000 lines of code, most of them Java but also Typescript for the front-end applications. Please note that a significant part of the code is dedicated to implement custom cryptographic protocols and operations.  Despite this, code and component interactions are surprisingly easy to follow as everything is highly documented: cryptographic protocols, architecture, operations...The entire system seems to have been designed, defined and implemented in such a way that a 3rd party may properly audit it.  Actually Swiss Post paid special attention to this aspect by requesting an external auditability report."

This is also corroborated by independent reports, which provide formal metrics to back those conclusions. 

I know it's likely an unpopular opinion within the infosec community, but I see e-Voting as something positive that will facilitate the right to vote for many people in different situations and/or certain conditions. I also acknowledge that a massive undertaking is required to guarantee significant public trust levels around these technologies. SwissPost's approach to this task, which prioritizes transparency and open source, is, under my point of view, the right one.

E-Voting criticism is obviously legitimate and necessary, not in vain I periodically try to break the SwissPost e-Voting system, publicly detailing the outcome of these efforts. However, I think that we should refrain ourselves from challenging maths and code with either vague claims or commonplace assertions.