Election of the Laboratory Council✯
English version here
Election address
For instructions provided by the Belenios software publisher, you can visit the belenios.org website.
Voter Instructions✯
Before the election begins, the voter receives an email with their vote code and the election URL. The election page displays the opening time when it is not yet open.
During the election, the voter can go to the election page and vote as follows:
- the voter enters their
vote code. This step can be done automatically if theelection URLreceived by the voter has been customized with thevote code(e.g., when vote codes are sent by the server). - they then have access to the election questions and select their candidates
- the computer encrypts their choices (using a JavaScript program) and displays a
tracking numberto the voter, which is a hash of the ballot. Thistracking numberis also sent by email when the voter has finished voting. - once the voter has verified their choices, they are prompted to authenticate. They then receive a one-time password at their email address, which they enter into the voting interface. Other authentication methods are possible (e.g., prior sending of a password depending on the election).
- note: a voter can vote again. Only the last vote is taken into account.
A video tutorial is available online.
The Belenios voting system is verifiable.
-
the voter can ensure that their ballot is correctly recorded by verifying that their
tracking numberappears in the ballot box, by consulting theview accepted ballotspage on the election homepage. They must protest if this is not the case. If the voter votes multiple times, only their lasttracking numberwill appear. -
the voter must also strongly protest if they receive a confirmation email without having voted or if they receive a confirmation email with a
tracking numberdifferent from the one displayed on the screen during the voting phase. Someone may have successfully added a ballot in their name. This could, for example, indicate an attack by a system administrator with access to the voter's email if the password and vote code are sent to the same address.
A voter can also verify the entire voting process. That is, instead of simply checking that their ballot is in the ballot box, they can verify the integrity of all ballots, monitor the ballot box to ensure no ballots disappear, and finally ensure that the declared result matches the ballots in the ballot box. To do this, they must follow the auditor instructions.
Instructions for the Electoral Commission✯
At minimum, the electoral commission checks the election homepage as soon as it is open and verifies that:
- the number of voters displayed matches the electoral list;
- the
Voters list hashvalue displayed matches the hash of thevoters.txtelectoral list provided (by the IT system or the election administrator). The hash can be calculated using one of the commands described here. - the
voters.txtelectoral list correctly corresponds to eligible voters, with the associated number of votes in the case of a weighted vote. - the list of questions and answers matches what was determined for this election. The questions and answers appear in the
$UUID.belfile. This file can be obtained by clicking onpublic datain the banner at the bottom of the election homepage.
Ideally, the electoral commission also performs the auditor's work or assigns someone to do it (e.g., IT services).
Instructions for the Auditor✯
Anyone with access to the election URL can act as an auditor. The URL of an election is of the form PREFIX/elections/UUID/, where, for example, PREFIX=https://e-vote.limos.fr and UUID=8GVH85AoSyweXG.
An auditor will, in particular, ensure that:
- the election data (public keys, list of public vote codes, etc.) is consistent and does not change over time;
- the ballot box, which contains encrypted votes, evolves consistently: no ballot is removed unless it has the same vote code (this corresponds to a revote);
- the ballot box contains only well-formed ballots (with valid zero-knowledge proofs and a valid vote code);
- the integrity of active files (HTML, JavaScript, etc.) used by voters and authorities is preserved;
- the election result corresponds to the encrypted ballots, thanks to the zero-knowledge proofs of correct decryption produced by the decryption authorities.
The security of Belenios relies on the fact that the checks described below are performed by at least one honest person.
Note: these checks are also performed automatically by our servers for elections set up with the highest security level (external vote code authority and at least two external decryption authorities).
Preparation To perform these tests, software is required. We describe here how to run the checks using belenios-tool, whose sources are available from the Inria GitLab and which can be installed on Linux Debian/Ubuntu with sudo apt install belenios-tool. The auditor must then create a working directory workdir where the election audit data will be saved as downloads, in the form of a git repository.
To verify that the HTML/JavaScript code used by voters, decryption authorities, and the vote code authority has not been modified by a corrupted server, the auditor must obtain the “correct” code for all these programs. They must then ensure that the server provides these files faithfully. First, a reference file must be created. To do this, copy the one from the Belenios sources:
cp path/to/sources/belenios/contrib/reference_template.json workdir/hashref
Next, there are several ways to ensure that the files served by the server are valid when auditing an election identified by UUID:
-
the auditor can simply trust the files downloaded the first time and verify that they do not change over time (TOFU principle). The audit command is then:
./monitor_elections.py --url PREFIX --wdir workdir --checkhash yes --hashref workdir/hashref --outputref workdir/hashref --uuid UUID -
Each time a file changes (including the first execution), an alert message will be displayed.
-
the auditor can retrieve the sources, recompile the code, start a local server, and use the previous command to populate the
workdir/hashreffile with trusted data. They can then copy this file as a reference for auditing the real election hosted on the external server. The command remains the same as above. -
the auditor can trust an identified person who has published a GPG-signed version of the reference file. In this case, additional arguments must be passed to the audit program: the URL of this signed version, as well as a GPG keyring containing the person's public key as a trusted key. For our voting platform, such a file is provided by the main Belenios developer, Stéphane Glondu. We provide the corresponding command line, which should be adapted for another server or trusted person:
./monitor_elections.py --url https://vote.belenios.org/ --wdir workdir --checkhash yes --hashref workdir/hashref --outputref workdir/hashref --sighashref https://vote.belenios.org/monitoring-reference/reference.json.gpg --keyring workdir/trustdb.gpg --uuid UUID
In all cases, the auditor will regularly run an audit command we will call monitor_elections. It is possible to redirect messages with the --logfile option. Then, only abnormal behaviors will be reported to stdout/stderr, making it possible to run the command from a crontab and be alerted in case of a problem.
Voting Phase During the election, the auditor is expected to:
-
if the auditor has access to the
voters.txtelectoral list (which is the case for the electoral commission), verify that the number of voters displayed on the election homepage matches the electoral list, as well as the total weight of the election if it is a weighted vote, and that the hash of the electoral list matches the one saved previously, for example using one of the commands suggested here; -
if the auditor does not have access to the electoral list, verify that the number of voters and the total weight of the election displayed on the election homepage match the official data.
-
frequently run
monitor_elections. Ideally, this should be done at unpredictable times, from various IP addresses reflecting the diversity of voters and authorities. The goal is to prevent a corrupted server from guessing whether requests come from an auditor, a voter, or an authority. Here are some recommendations for an auditor to blend in with regular users: - as already mentioned, requests to the server should be frequent but not at regular or predictable intervals;
- not only should IP addresses vary, but also browser configuration details (browser type and version, system, active extensions, time zone, language, screen resolution, etc.), using a wide range of configurations actually used by humans;
- IP addresses should reflect the varied locations and ISPs of the voter population;
- the order in which files are requested from the server should reflect the typical browsing pattern of voters and authorities, with plausible (but unpredictable) delays between each request.
Note that the script provided by belenios-tool does not support all of this.
After the Election After the election, the auditor is expected to:
- run
monitor_electionsagain. The election page now contains aresult.jsonfile, and this command will verify the cryptographic proofs associated with the election result; - verify that the result mentioned in the
result.jsonfile matches the result published on the election homepage. This verification must be done manually.
Note: If the belenios-tool command-line tool is used, trust in the tests performed partly depends on trust in the tool itself. It is possible to implement your own verification software based on the Belenios specifications, available here.
How to Compute the Hash of a File?✯
To compute the hash of a file, you must use the same hash function as the one used in Belenios. We propose several solutions here to compute this hash from the command line. We use the voters.txt file as an example, but you can of course replace it with another file.
sha256sum voters.txt | xxd -p -r | base64 | tr -d "="
(or shasum -a256 instead of sha256sum, for example on macOS)
or:
cat voters.txt | python3 -c "import hashlib,base64,sys;m=hashlib.sha256();m.update(sys.stdin.read().encode());print(base64.b64encode(m.digest()).decode().strip('='))"
You can also use the online tool provided by Belenios.