<divclass="card-desc">How to structure the Go + Rust codebase. Types, patterns, the multi-party re-architecture, and the Rust transport-security layer.</div>
<p>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 <code>evote</code>.</p>
<p>The Go PoC reimplements the cryptographic core of the production Swiss Post e-voting system in roughly ten thousand lines of Go, plus a small Rust crate for transport security. It uses the same algorithms (ElGamal encryption, Schnorr proofs, Bayer-Groth verifiable shuffle), with two modes: a single-machine <code>demo</code> and a multi-party <code>netdemo</code> where each role is a separate endpoint communicating over an Ed25519-signed, X25519-encrypted transport.</p>
<p>Despite the simplified infrastructure, the Go PoC preserves the <strong>same role structure</strong> as the production system. Each role's responsibilities, trust boundaries, and ceremony steps are faithfully reproduced.</p>
<h3>1.2 System Overview</h3>
<p>The e-voting system operates in three phases across three days:</p>
<divclass="legal-box">The role structure follows the Ordinance on Electronic Voting (OEV/VEleS) issued by the Federal Chancellery (Bundeskanzlei). All operational roles, trust boundaries, and separation-of-duties requirements are mandated by law.</div>
<p>The following organizational hierarchy applies:</p>
<divclass="note-box">In the single-process <code>demo</code>, all roles are exercised by the same person on the same machine via different <code>evote</code> subcommands. The <code>netdemo</code> mode goes further: it splits the parties into separate endpoints that communicate only over an Ed25519-signed, X25519-encrypted transport (implemented in Rust) — a faithful emulation of the production trust boundaries, where these roles run on <strong>different machines under different operators</strong>.</div>
<divclass="role-desc">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.</div>
</div>
<divclass="legal-box">The Cantonal Administrator operates the SDM under cantonal authority, <strong>not</strong> under Swiss Post. All personal data (electoral registers) remains exclusively at the canton. The four-eyes principle applies to all SDM operations.</div>
<h3>2.2 Day 1 -- Configuration Phase</h3>
<divclass="step">
<spanclass="step-num">1</span>
<divclass="step-title">Initialize the election and generate cryptographic parameters</div>
<pstyle="margin-top:8px;">Decide on the number of voters and ballot options.</p>
<divclass="code-block"># Full automated ceremony:
./evote demo --voters=6 --options=2</div>
</div>
<divclass="step">
<spanclass="step-num">2</span>
<divclass="step-title">Coordinate Control Component key generation</div>
<pstyle="margin-top:8px;">The system generates key pairs for all 4 CCs and the Electoral Board. Each CC generates a Schnorr proof of knowledge.</p>
<pstyle="margin-top:8px;">Each voter receives a unique voting card with SVK, BCK, Choice Return Codes, and Vote Cast Code.</p>
</div>
<divclass="warning">In the Go PoC, voting cards are displayed on screen. In production, these are printed on physical paper and mailed to voters.</div>
<h3>2.3 Day 2 -- Release Phase</h3>
<p>The Cantonal Administrator coordinates the Electoral Board constitution and triggers setup verification. Once verification passes, the voter portal is activated.</p>
<h3>2.4 Day 3 -- Tally Phase</h3>
<p>The Cantonal Administrator initiates mixing, coordinates Electoral Board password entry for decryption, and triggers tally verification.</p>
<divclass="role-desc">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.</div>
</div>
<divclass="legal-box">The Ordinance requires a minimum of 2 Electoral Board members. Each member's password must meet complexity requirements (minimum 24 characters in production). The board operates on air-gapped machines.</div>
<h3>3.2 Constituting the Board (Day 2)</h3>
<divclass="step">
<spanclass="step-num">1</span>
<divclass="step-title">Each board member sets a password</div>
<pstyle="margin-top:8px;">The combined passwords derive the Electoral Board's secret key via Argon2id.</p>
<divclass="code-block"> 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</div>
</div>
<divclass="warning">If any board member forgets their password, the ballot box <strong>cannot be decrypted</strong>. There is no recovery mechanism.</div>
<h3>3.3 Authorizing Decryption (Day 3)</h3>
<divclass="step">
<spanclass="step-num">1</span>
<divclass="step-title">Enter passwords on the Tally SDM</div>
<pstyle="margin-top:8px;">After 4 CC shuffles, each board member enters their password to reconstruct the EB secret key.</p>
</div>
<divclass="step">
<spanclass="step-num">2</span>
<divclass="step-title">Authorize the final shuffle and decryption</div>
<pstyle="margin-top:8px;">The system performs the 5th Bayer-Groth shuffle and removes the last encryption layer.</p>
</div>
<divclass="note-box">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.</div>
<h2>4. Swiss Post -- System Provider</h2>
<h3>4.1 Role Description</h3>
<divclass="role-header">
<divclass="role-name">Swiss Post (Schweizerische Post / System Provider)</div>
<divclass="role-desc">Develops and maintains the e-voting software. Operates the central infrastructure and 3 of 4 Control Components. Does <strong>not</strong> operate the SDM, Verifier, or the cantonal CC.</div>
</div>
<h3>4.2 Infrastructure & Central Services</h3>
<divclass="role-desc">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.</div>
</div>
<divclass="legal-box">OEV Art. 3.15: "If a person has physical or logical access to a control component, that person may not have access to any other control component."</div>
<tr><td>Vote Cast Code (VCC)</td><td>Confirm vote is sealed</td><td>VCC00</td></tr>
</table>
<divclass="warning">Voting cards must be printed on physical paper and delivered via postal mail. The codes must <strong>never</strong> be transmitted electronically.</div>
<divclass="role-desc">An eligible citizen who casts a vote using the e-voting system. Interacts through a web browser and verifies using the physical voting card.</div>
</div>
<h3>7.2 Voting Procedure</h3>
<divclass="step">
<spanclass="step-num">1</span>
<divclass="step-title">Open the voting portal</div>
<pstyle="margin-top:8px;">Navigate to the official URL. Verify the TLS certificate.</p>
</div>
<divclass="step">
<spanclass="step-num">2</span>
<divclass="step-title">Authenticate</div>
<pstyle="margin-top:8px;">Enter your <strong>Start Voting Key (SVK)</strong> and <strong>date of birth</strong>.</p>
</div>
<divclass="step">
<spanclass="step-num">3</span>
<divclass="step-title">Cast your vote</div>
<pstyle="margin-top:8px;">Your browser encrypts the vote locally using ElGamal. <strong>The plaintext vote never leaves your device.</strong></p>
</div>
<divclass="step">
<spanclass="step-num">4</span>
<divclass="step-title">Verify the Choice Return Code</div>
<pstyle="margin-top:8px;">Compare the code on screen to your physical voting card. If they match, proceed. If not, <strong>STOP</strong>.</p>
</div>
<divclass="step">
<spanclass="step-num">5</span>
<divclass="step-title">Confirm with the Ballot Casting Key</div>
<pstyle="margin-top:8px;">Enter your <strong>BCK</strong> to finalize.</p>
</div>
<divclass="step">
<spanclass="step-num">6</span>
<divclass="step-title">Verify the Vote Cast Code</div>
<pstyle="margin-top:8px;">Compare the VCC on screen to your card. If it matches, your vote is sealed.</p>
</div>
<h3>7.3 Individual Verifiability</h3>
<p>The return code mechanism provides <strong>individual verifiability</strong>: each voter can personally verify their vote was cast as intended and recorded as cast.</p>
<divclass="note-box">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.</div>
<divclass="role-desc">Operates verification software that independently checks all protocol steps. Runs on an offline machine under cantonal authority. Requires no secret keys.</div>
</div>
<divclass="legal-box">The Verifier provides <strong>universal verifiability</strong>: any party can audit the election using only public data and mathematics.</div>
<h3>8.2 Setup Verification (Day 2)</h3>
<ul>
<li><strong>Key proofs:</strong> Verify Schnorr proof for each CC</li>
<li><strong>Key combination:</strong> Verify Election Public Key is correct product of all 5 keys</li>
<p>If all checks pass, the Verifier provides mathematical certainty that the election result is correct.</p>
<divclass="warning">If <strong>any</strong> check fails, the election result <strong>must not be published</strong>. Contact the Federal Chancellery immediately.</div>
<h2>9. Federal Chancellery & External Examiners</h2>