Finding vulnerabilities in Swiss Post's e-voting system: part 3
The verifier and configuration tool never checked that the seed used to generate the election encryption parameters actually matched the election name, and the seed reader silently stripped newlines and spaces. A malicious administrator could therefore supply a seed that looks like the election name in a text editor but contains hidden extra content, weakening the claimed verifiability of the parameters.
January 17, 2024
The full write-up lives on its author's site
It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.
Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.
How it worked
Root cause
Likely the seed was treated as an opaque input: the reader normalised it by stripping whitespace and newlines, and neither the configuration tool nor the verifier cross-checked it against the election name.
Impact
The intended verifiability of the encryption parameters is not enforced, which could enable a malicious seed, though the author notes this does not by itself amount to a practical attack and that robust primality testing and safe-prime generation block the obvious trapdoor routes.
What the attacker needed
Control of the seed file; four-eye board may be deceived; access to pre-configuration phase
How it was found
- The administrator supplies a seed file to the cryptographic parameters tool under the four-eye principle.
- The tool reads the file, strips newlines and trims spaces, and concatenates the remaining lines into one seed.
- The tool generates the encryption parameters payload containing that seed.
- The payload is imported during pre-configuration without comparing the seed to the election name.
- The verifier checks only that the seed regenerates the public parameters, not that it matches the election name.
Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.
Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.
Election encryption relies on public numbers that are generated from a short text string called a seed. The system claimed anyone could check that this seed was derived from the election name, but no component actually compared the two. Because the tool also ignored spaces and line breaks, two different-looking seed files could produce the same seed, so a dishonest insider could hide extra text in the file.
What is Crypto?
Encryption, signatures, randomness or certificate checks that do not protect what they claim to.