RWC 2022: A privacy attack on the SwissPost e-voting system

Background on elections

This blog post is about a specific attack in one e-voting system. Before going into the attack, I’d like to say a few words on elections, physical and electronic, in general since not all the readers might be famaliar with the intricate differences between the two as well as the security properties we need. Below, I consider e-voting as online voting on a personal computer and not electronic voting machines, which is more like physical voting since the voter still needs to go to a physical location.

Election is the cornerstone of democracy. Making elections secure is challenging and failing this challenge may have severe real-world consequences. Before speaking of how to make elections secure, let’s first talk about what does security mean. For high-stake elections (e.g., presidential election), we typically want properties such as:

  • Voter privacy: nobody should be able to see the vote of any voter.
  • Coercion resistance: nobody should be able to force the voter to vote in a particular way.
  • Auditability, anybody should be able to audit the voting process (e.g., making sure the tally is correct).

How are these properties achieved in physical voting? Voter privacy is achieved because the ballot does not have the voter’s name. Coercion resistance is achieved because the voter casts his vote in a secure location (the voting authorities wouldn’t let the adversary stand behind the voter and force him/her to vote a certain way). Finally, anyone from the community can audit the voting process and recount the votes, if necessary.

E-voting is a lot more convenient and allows overseas voting. Additionally, having the possibility to vote on a computer allows better user-interface which may facilitate Liquid Democracy. But it’s difficult to achieve the same level of privacy/security as physical voting. Voter privacy can to be achieved using cryptography. Coercion resistance is generally impossible in the online setting since there is no secure location. Finally, we can use also use cryptography (e.g., zero-knowledge proofs) to make sure the protocol is functioning as intended, but this is not the same type of auditability as the physical analog since only cryptographers can audit it. In other words, cryptography makes a voting system less auditable to the general public.

In summary, e-voting is useful, especially for low-stake elections or elections that are held in a benign environment. But it cannot completely replace physical voting in high-stake elections.

Swiss Post e-voting system

Switzerland has a unique history when it comes to electrions. Indeed, it is the only country that uses direct democracy. On the federal level, citizens vote four times a year on various issues and referendums, and possibly more on the canton or commune level. As such, citizens need a secure and convenient voting system. The Federal Chancellery regulates e-voting in Switzerland and publishes a document that specifies the properties that a voting system must achieve to be used in federal elections. For example, the document mandates the existance of a specification, open source code, security properties such as voter privacy and security proofs. The most promising voting system is the one by Swiss Post (formerly developed by Scytl). At RWC 2022, Véronique Cortier, Alexandre Debant, and Pierrick Gaudry presented an attack on the Swiss Post e-voting system.

Not all the details of the voting system is presented below, only the parts relevant for the attack. There are parties called Mixing Control Components (CCM) that are responsible for decrypting the ballots to doing the finally tally after the end of the voting phase. The decryption key is shared between four parties, CCM1, CCM2 CCM3 and CCM4, so that as long as one party is honest, the voter privacy property is preserved. The first three CCM will mix and perform partial decryption one after the other. CCM4 initially does not have the final shared key. Instead, there exists an auditor that checks whether the first three CCMs are behaving honestly, if the checks pass, then the auditor releases the final decryption key to CCM4, to perform the final mixing and decryption. The auditor also checks whether the final decryption is consistent.

The attack happens when multiple ballot boxes need to be tallied at the same time. What CCM1 may do is add a fake ballot box to the initial set of ballot boxes. The fake ballot box contains only one ballot (the ballot of the victim) which is copied from one of the prior ballot boxes. CCM1 forwards the set of partially decrypted ballot boxes to an honest CCM2 to do the next phase of the decryption. Then CCM2 forwards its results to a CCM3 for the next step of mixing and decryption. The issue araises since the specification does not require the CCMs or the auditor to know how many ballot boxes they should decrypt or verify, additionally, the communicatin channel between the CCMs and the auditor is not considered to be trusted. So CCM1 could send the original set of ballot boxes to the auditor for verification (without the fake one). The network adversary could drop the fake ballot box from the message sent by CCM2 to the auditor. CCM3 is also dishonest and disgards the fake ballot box in his message to the auditor. From the auditor’s perspective, the proofs are valid and it will happily release the final decryption key. With this key, CCM4 can decrypt the victim’s ballot and breaking voter privacy.

While the fixes are easy, the primary issues comes from the fact that the protocol is underspecified. There is no specification regarding the protocol behaviour when multiple elections are happening simultaneously.

As a final note, the fact that this attack was discovered was the result of the Swiss system working as intended. Building a perfectly secure e-voting system is extremely difficult in a vacuum. Releasing the code, specifications and security proofs helps tremendously with catching security issues before it’s too late.

References

  • https://hal.inria.fr/hal-03446801/document
  • https://www.bk.admin.ch/bk/en/home/politische-rechte/e-voting/versuchsbedingungen.html
  • https://gitlab.com/swisspost-evoting/e-voting/e-voting-documentation/-/issues/11