---
title: "The cryptography behind electronic voting (and why paper ballots are still essential)"
description: "Cryptographic voting protocols like Helios and ElectionGuard can keep ballots secret and make tallies publicly verifiable, but they cannot replace paper ballots in general elections because software failures must remain detectable independently of the software (software independence)."
url: "https://swe.quest/articles/the-cryptography-behind-electronic-voting-and-why-paper-ballots-are-still-7ac6e492b80d20ab"
canonical: "https://blog.trailofbits.com/2026/11/03/the-cryptography-behind-electronic-voting-and-why-paper-ballots-are-still-essential/"
source: "Trail of Bits"
published: "2026-11-03"
difficulty: "medium"
kind: "Deep dive"
reading_minutes: 13
tags: ["cryptography","privacy","security"]
---

# The cryptography behind electronic voting (and why paper ballots are still essential)

A post on [Trail of Bits](https://swe.quest/sources/trail-of-bits.md), published 2026-11-03, 13 min read, Deep dive. Original: [https://blog.trailofbits.com/2026/11/03/the-cryptography-behind-electronic-voting-and-why-paper-ballots-are-still-essential/](https://blog.trailofbits.com/2026/11/03/the-cryptography-behind-electronic-voting-and-why-paper-ballots-are-still-essential/)

## Summary

Cryptographic voting protocols like Helios and ElectionGuard can keep ballots secret and make tallies publicly verifiable, but they cannot replace paper ballots in general elections because software failures must remain detectable independently of the software (software independence). Ballots are encrypted with threshold-shared exponential ElGamal so encrypted votes can be summed homomorphically and only the tally decrypted, with zero-knowledge proofs ensuring each ciphertext holds a permitted value. Benaloh's challenge method and ElectionGuard's hash-chained ballot commitments let voters detect compromised clients or servers that alter or drop ballots, but detection depends on many voters participating, and voter authentication, coercion resistance and injected ballots remain unsolved without external evidence such as paper records.

Written by swe.quest, not by the author.

**Difficulty:** Medium: assumes a working developer; shows how it is built or done

## Topics

- [Cryptography](https://swe.quest/tags/cryptography.md) (Security)
- [Privacy](https://swe.quest/tags/privacy.md) (Security)
- [Security](https://swe.quest/tags/security.md) (Security)

## Prerequisites

- public-key encryption ([easy posts on Cryptography](https://swe.quest/tags/cryptography.md?difficulty=easy))
- cryptographic hash functions
- basic group theory

## Keywords

Helios, ElectionGuard, ElGamal, Benaloh challenge, zero-knowledge proofs, homomorphic encryption, end-to-end verifiability

## Related posts

- [How Trail of Bits helps verify the integrity of your Signal chats](https://swe.quest/articles/how-trail-of-bits-helps-verify-the-integrity-of-your-signal-chats-a70bf72c9c6eddcc.md): Trail of Bits · 2026-08-11 · Easy · 3 min read · Cryptography, Security, Privacy
  Signal's Automatic Key Verification is a key transparency system that keeps a globally consistent, auditable map from phone numbers to public keys, so a compromised server cannot quietly hand out a false key.
- [Introducing Automatic Key Verification](https://swe.quest/articles/introducing-automatic-key-verification-2aaa055daad25a08.md): Signal · 2026-08-11 · Medium · 17 min read · Cryptography, Communications, Security, Data structures
  Signal's automatic key verification uses key transparency to confirm that the binding between a phone number or username and its public key is globally consistent, giving the same protection against a compromised directory as comparing safety numbers, without meeting in person.
- [The post-quantum future of web privacy](https://swe.quest/articles/the-post-quantum-future-of-web-privacy-4a158945977ff986.md): Cloudflare · 2026-11-06 · Hard · 19 min read · Cryptography, Privacy, Identity & auth
  Privacy Pass tokens rely on RSA and elliptic curves, so a quantum attacker could forge them, but redemption remains unconditionally unlinkable even after Q-day.
- [Private analytics via zero-trust aggregation](https://swe.quest/articles/private-analytics-via-zero-trust-aggregation-060bfb6ed5bdc13c.md): Google Research · 2026-05-27 · Hard · 6 min read · Cryptography, Privacy, Analytics & OLAP, Security
  Google's private analytics service now layers a new lattice-based, one-shot secure aggregation protocol on top of TEE execution, so individual device data is never decrypted in server memory even if the enclave is compromised by side-channel attacks.
- [How Meta built large-scale cryptographic monitoring](https://swe.quest/articles/how-meta-built-large-scale-cryptographic-monitoring-007f3fb06e949eb9.md): Meta Engineering · 2024-11-12 · Medium · 10 min read · Cryptography, Observability, Scaling, C & C++
  Meta logs every operation in FBCrypto, its managed cryptographic library, without sampling by aggregating identical events into per-event counts in an in-process buffer and flushing them periodically to Scribe, with data landing in Scuba and Hive.

Browse: [Latest posts](https://swe.quest/index.md) · [Topics](https://swe.quest/tags.md) · [Sources](https://swe.quest/sources.md) · [Topic map](https://swe.quest/map.md) · [Site guide (llms.txt)](https://swe.quest/llms.txt)
