🇨🇭

Swiss Post E-Voting

Choose a presentation
🗳️
Interactive Demo
Run a full election step by step. Play every role: Chancellor, CC Operator, Voter, Auditor.
27 slides
🔐
Cryptography Lecture
Undergraduate-level lecture. Groups, ElGamal, ZK proofs, Bayer-Groth, then a live election.
40 slides · 5 parts
🏗️
Software Engineering
How to structure a 6,500-line Go codebase. Types, patterns, architecture, error handling.
34 slides · 8 parts

1. Introduction

1.1 Purpose of This Manual

This manual provides step-by-step operational procedures for all participants in the Swiss Post e-voting election ceremony, as implemented in the Go proof-of-concept (PoC) system evote.

The Go PoC reimplements the cryptographic core of the production Swiss Post e-voting system in approximately 6,500 lines of Go. It uses the same algorithms (ElGamal encryption, Schnorr proofs, Bayer-Groth verifiable shuffle) but operates as a single-machine, command-line tool rather than a distributed multi-server deployment.

Despite the simplified infrastructure, the Go PoC preserves the same role structure as the production system. Each role's responsibilities, trust boundaries, and ceremony steps are faithfully reproduced.

1.2 System Overview

The e-voting system operates in three phases across three days:

PhaseDayKey OperationsPrimary Roles
ConfigurationDay 1Key generation, voting card creation, system setupCantonal Admin, CC Operators
Release & VotingDay 2 + Voting PeriodElectoral Board constitution, setup verification, ballot castingElectoral Board, Verifier, Voters
TallyDay 3Mixing, decryption, tally verification, result publicationCC Operators, Electoral Board, Verifier

1.3 Role Structure & Legal Basis

The following organizational hierarchy applies:

Federal Chancellery (Bundeskanzlei) |-- Issues OEV Ordinance, commissions independent examiners | +-- Cantons (each independent) |-- Electoral Board (>= 2 members) | +-- Verifier Operator | |-- Cantonal Administrator | +-- Operates SDM (Setup, Online, Tally) | +-- Manages 1 Control Component | +-- Manages Printing Office | +-- Contracts with Swiss Post (System Provider) |-- Operates Voting Server, Access Layer +-- Operates 3 of 4 Control Components (separate teams)
In the Go PoC, all roles are exercised by the same person on the same machine via different evote subcommands. In production, these roles are performed by different people on different machines with strict access controls.

1.4 Prerequisites

# Build the binary cd evote/ go build -o evote ./cmd/evote ./evote --help

2. Cantonal Administrator

2.1 Role Description

Cantonal Administrator (Kantonale/r Administrator/in)
Operates the Secure Data Manager (SDM) and coordinates the election ceremony. Responsible for processing electoral data, managing the key generation ceremony, generating voting cards, and coordinating between all other roles.

2.2 Day 1 -- Configuration Phase

1
Initialize the election and generate cryptographic parameters

Decide on the number of voters and ballot options.

# Full automated ceremony: ./evote demo --voters=6 --options=2
2
Coordinate Control Component key generation

The system generates key pairs for all 4 CCs and the Electoral Board. Each CC generates a Schnorr proof of knowledge.

CC0 (Bern): Key generated, Schnorr proof VALID CC1 (Zurich): Key generated, Schnorr proof VALID CC2 (Geneva): Key generated, Schnorr proof VALID CC3 (Lugano): Key generated, Schnorr proof VALID
3
Combine public keys into Election Public Key

The 5 public keys are multiplied together to form the joint Election Public Key.

ElectionPK = PK0 * PK1 * PK2 * PK3 * PK_EB mod p
4
Generate voting cards

Each voter receives a unique voting card with SVK, BCK, Choice Return Codes, and Vote Cast Code.

In the Go PoC, voting cards are displayed on screen. In production, these are printed on physical paper and mailed to voters.

2.3 Day 2 -- Release Phase

The Cantonal Administrator coordinates the Electoral Board constitution and triggers setup verification. Once verification passes, the voter portal is activated.

2.4 Day 3 -- Tally Phase

The Cantonal Administrator initiates mixing, coordinates Electoral Board password entry for decryption, and triggers tally verification.

3. Electoral Board

3.1 Role Description

Electoral Board (Wahlbehörde / Commission électorale)
A group of at least 2 board members who collectively hold the 5th encryption key. Each member sets a password during setup; all members must enter their passwords to authorize decryption.

3.2 Constituting the Board (Day 2)

1
Each board member sets a password

The combined passwords derive the Electoral Board's secret key via Argon2id.

EB member 1: enters password --> | EB member 2: enters password --> |-- Argon2id --> sk_EB EB member 3: enters password --> | pk_EB = g^sk_EB mod p
If any board member forgets their password, the ballot box cannot be decrypted. There is no recovery mechanism.

3.3 Authorizing Decryption (Day 3)

1
Enter passwords on the Tally SDM

After 4 CC shuffles, each board member enters their password to reconstruct the EB secret key.

2
Authorize the final shuffle and decryption

The system performs the 5th Bayer-Groth shuffle and removes the last encryption layer.

The Electoral Board never sees which voter cast which vote. The 5 independent shuffles have permanently destroyed the link between voter identities and ballot contents.

4. Swiss Post -- System Provider

4.1 Role Description

Swiss Post (Schweizerische Post / System Provider)
Develops and maintains the e-voting software. Operates the central infrastructure and 3 of 4 Control Components. Does not operate the SDM, Verifier, or the cantonal CC.

4.2 Infrastructure & Central Services

ComponentTechnologyPurpose
Access LayerWAF, TLS terminationProtects the Voting Server
Voting ServerSpring Boot, KubernetesProcesses vote submissions
3 Control ComponentsBare metal, diverse OSDistributed key gen, return codes, shuffle
Message BrokerApache ActiveMQ ArtemisAsync communication
DatabasesPostgreSQLEncrypted ballots, config, audit logs
In the Go PoC, all of Swiss Post's infrastructure is simulated within the evote binary.

4.3 Red Phase (Voting Period)

5. Control Component Operators

5.1 Role Description & Split Trust

Control Component Operator (CC-Betreiber/in)
Each of the 4 Control Components is operated by a separate team. No person with access to one CC may have access to any other CC. Security guarantees hold as long as at least one CC is honest.
CCLocationOSOperated By
CC0Canton premisesRHEL 9.6Canton
CC1Swiss Post DCDebian 12.12Swiss Post Team A
CC2Swiss Post DCUbuntu 24.04Swiss Post Team B
CC3Swiss Post DCWindows Server 2022Swiss Post Team C

5.2 Key Generation (Setup Phase)

1
Generate the key pair

Each CC generates sk = (sk[0], sk[1]) randomly from Z_q. Publishes pk = (g^sk[0], g^sk[1]).

2
Generate the Schnorr proof of knowledge

Non-interactive Schnorr proof (Fiat-Shamir) demonstrating knowledge of the secret key.

3
Publish public key and proof

Transmitted to the central system for combination with other CCs' keys.

5.3 Shuffle & Partial Decryption (Tally Phase)

1
Receive the current ciphertext batch
2
Generate a random permutation
3
Re-encrypt and shuffle
4
Generate the Bayer-Groth shuffle proof

Zero-knowledge proof with sub-linear O(√N) size: ProductArgument, HadamardArgument, ZeroArgument, SingleValueProductArgument, MultiExponentiationArgument.

5
Destroy the permutation

Securely erase the permutation and all re-encryption randomness.

6
Perform partial decryption

Remove this CC's encryption layer.

The permutation must be destroyed immediately after the proof is generated.

6. Printing Office

6.1 Role Description

Printing Office (Druckerei)
Prints and mails the physical voting cards. The voting card is the root of individual verifiability.

6.2 Voting Card Generation & Distribution

FieldPurposeExample
Start Voting Key (SVK)Authentication credentialSVK-0000
Ballot Casting Key (BCK)Vote confirmation credentialBCK-0000
Choice Return CodesVerify correct recordingCC00, CC01
Vote Cast Code (VCC)Confirm vote is sealedVCC00
Voting cards must be printed on physical paper and delivered via postal mail. The codes must never be transmitted electronically.

7. Voter

7.1 Role Description

Voter (Stimmberechtigte/r)
An eligible citizen who casts a vote using the e-voting system. Interacts through a web browser and verifies using the physical voting card.

7.2 Voting Procedure

1
Open the voting portal

Navigate to the official URL. Verify the TLS certificate.

2
Authenticate

Enter your Start Voting Key (SVK) and date of birth.

3
Cast your vote

Your browser encrypts the vote locally using ElGamal. The plaintext vote never leaves your device.

4
Verify the Choice Return Code

Compare the code on screen to your physical voting card. If they match, proceed. If not, STOP.

5
Confirm with the Ballot Casting Key

Enter your BCK to finalize.

6
Verify the Vote Cast Code

Compare the VCC on screen to your card. If it matches, your vote is sealed.

7.3 Individual Verifiability

The return code mechanism provides individual verifiability: each voter can personally verify their vote was cast as intended and recorded as cast.

Even if your computer is compromised, the return codes on the physical card were generated independently by the 4 CCs during setup. A malware-modified vote would produce the wrong return code.

8. Independent Verifier

8.1 Role Description

Verifier Operator (Prüfer/in)
Operates verification software that independently checks all protocol steps. Runs on an offline machine under cantonal authority. Requires no secret keys.

8.2 Setup Verification (Day 2)

8.3 Tally Verification (Day 3)

1
Verify all Schnorr proofs (4 key proofs)
CC0 (Bern): [PASS] CC1 (Zurich): [PASS] CC2 (Geneva): [PASS] CC3 (Lugano): [PASS]
2
Verify all Bayer-Groth shuffle proofs (5 shuffle proofs)
Shuffle 0 (CC0, Bern): ==> VERIFIED Shuffle 1 (CC1, Zurich): ==> VERIFIED Shuffle 2 (CC2, Geneva): ==> VERIFIED Shuffle 3 (CC3, Lugano): ==> VERIFIED Shuffle 4 (Electoral Board): ==> VERIFIED
3
Verify ballot count consistency
Ballots submitted: 6 Ballots decrypted: 6 ==> PASS

8.4 Interpreting Results

If all checks pass, the Verifier provides mathematical certainty that the election result is correct.

If any check fails, the election result must not be published. Contact the Federal Chancellery immediately.

9. Federal Chancellery & External Examiners

9.1 Oversight Role

Federal Chancellery (Bundeskanzlei)
Issues the OEV Ordinance, commissions independent examinations, approves cantons for e-voting.

9.2 Four Audit Scopes

ScopeSubjectExaminer
Scope 1Cryptographic protocolAcademic cryptographers
Scope 2System softwareSoftware security auditors
Scope 3Infrastructure & operationsInfrastructure security auditors
Scope 4Penetration testingPen testers + bug bounty

Appendix A: Command Reference

CommandDescriptionKey Flags
evote demoRun a full election ceremony--voters=N, --options=N
evote presentInteractive step-by-step presentation(same as demo)
evote serveServe the web presentations--port=N
# Minimal election ./evote demo --voters=3 --options=2 # Larger election ./evote demo --voters=100 --options=5 # Step-by-step presentation ./evote present # Serve web presentations on local network ./evote serve --port=8080

Appendix B: Ceremony Checklist

Day 1 -- Configuration

Day 2 -- Release

Voting Period

Day 3 -- Tally

Appendix C: Production vs. Go PoC

AspectProductionGo PoC
LanguageJava 21 + TS + C#Go
Prime size3072 bits256 bits (demo)
InfrastructureKubernetes + 4 bare-metal CCs + SDMSingle binary
NetworkingHTTPS, RSocket/CBOR, ActiveMQIn-memory
PersistencePostgreSQLIn-memory
Voter PortalAngular SPA, 4 languagesSimulated in CLI
ElGamalIdentical algorithmIdentical algorithm
Schnorr proofsIdentical algorithmIdentical algorithm
Bayer-GrothIdentical algorithmIdentical algorithm
Source code~500K lines, 14 repos~6,500 lines, 1 module
DependenciesBouncyCastle, Spring, Angular, ...Cobra + x/crypto

Swiss Post E-Voting Go PoC -- Operator Manual v1.0 -- February 2026