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

Nov 3, 2026

AI summary AI-generated, may contain mistakes

The article explains why paper ballots remain essential for elections despite cryptographic advances, describing how systems like Helios and ElectionGuard use techniques such as homomorphic encryption, threshold key-sharing, and zero-knowledge proofs to protect voter privacy and provide verifiable tallies. It highlights that electronic voting introduces unique risks—such as scalable software vulnerabilities, compromised clients, and coercion—that paper-based systems largely avoid through physical controls and detectability of failures. Ultimately, cryptography can strengthen verifiability as a layer atop paper infrastructure, but it cannot fully replace the security and trust of paper ballots in high-stakes public elections.

As millions of Americans vote in today’s U.S. midterms, most will use paper ballots, which are protected by strict chain-of-custody protocols and, in some cases, statistical audits. You may wonder why we still use paper for our elections and voting systems when tasks like banking, tax filing, and document signing have moved away from paper-based legacy systems and become fully electronic. The short answer: security.

That may come as a surprise to some. After all, cryptography and other security advancements have enabled secure electronic systems for many applications. In fact, cryptography can be used to provide two essential safeguards in elections: keeping (1) individual votes secret while (2) making the final tally independently verifiable. This is exactly the approach of cryptographic protocols like Helios and ElectionGuard. However, Helios intentionally targets lower-risk and lower-coercion settings rather than high-stakes public elections. ElectionGuard, by contrast, is intended for public elections, but not as a replacement for a paper-based system; it is used as a cryptographic layer integrated with traditional voting infrastructure.

In this blog post, we’ll explain how cryptographic techniques can help protect ballot secrecy and prevent manipulation in electronic voting systems, and explore the limitations of these systems. Although cryptography can strengthen election verifiability and have other strong security properties, it cannot fully replace the security and trust of existing paper ballot systems in general elections.

Keep reading

Out of respect for the author only the opening is shown here. Read the rest on the original site, or in HorizonReader with highlights, notes and AI help.

More from Trail of Bits Blog

After Binance, check what your signing systems can approve

AI summaryThe article examines Binance's October 2026 security incident, in which an attacker obtained valid signatures from the exchange's wallet-signing service via social engineering and stolen credentials, then used an EIP-7702 delegation to repeatedly drain funds without further signatures. It warns that many transaction monitoring and signing-policy systems fail to account for newer Ethereum execution paths such as EIP-7702 delegations, session keys, Safe modules, and ERC-4337 UserOperations, allowing malicious wallet-authority changes to go undetected. The author recommends four measures—reducing access to signing infrastructure, treating delegation as an administrative privilege, limiting damage even if signing is compromised, and detecting wallet-authority changes—each with verification tests to confirm the controls work.

Backporting security fixes at scale with Codex

AI summaryThe article describes how thousands of known CVEs remain unfixed in stable software like Linux kernel stable branches, Ubuntu LTS, and Debian because backporting security patches is time-consuming, thankless volunteer work that rarely gets prioritized. Using Codex with GPT-5.6, the team reduced backporting effort from days to roughly 30 minutes to three hours of human attention per fix, with AI agents handling patch adaptation, testing, and evidence gathering while engineers review and submit the patches. By October 29, this workflow had helped land fixes for 149 distinct CVEs in stable Linux kernel releases, along with patches for Fedora and Ubuntu packages, demonstrating that AI assistance can make neglected security work practical at scale.

Your AI agent fixed the bug, but what else did it change?

AI summaryTrail of Bits has released two plugins, patching-bugs and regression-hunt, developed through its Patch the Planet initiative with OpenAI, which let AI agents reproduce reported bugs, develop fixes, and check whether changes break previously working behavior in open-source projects. The plugins standardize patching through strict input/output schemas, live proof-of-concept validation, and project-specific threat models and patching guidelines, with regression-hunt producing 25% fewer false-positive findings than a baseline Codex agent in preliminary evaluations. The authors argue that as AI accelerates bug discovery, the industry needs reliable, standardized patching workflows, and they encourage maintainers to add THREAT_MODEL.md and PATCHING_GUIDELINES.md files so the agents work within each project's rules.

Package managers have an integrity problem

AI summaryThe author tested 25 popular package managers against a simulated malicious package repository using a Docker- and mitmproxy-based harness, finding that fewer than half check integrity via lockfiles by default, only Go and vcpkg verify every downloaded package, and only Go verifies signatures by default. Many cryptographic implementations fall short in subtle ways—for example, Pub detects hash mismatches but installs packages anyway, Conan treats an MD5 hash merely as an identifier, and cpanminus uses unencrypted HTTP—due to design choices, prioritization, or the complexity of developer-friendly solutions. The article warns that as developer compromise becomes harder, attackers will shift to the repositories serving code, and explores which cryptographic designs package managers should adopt going forward.

SequenceHash: multihashing for the rest of us

AI summaryTrail of Bits has introduced SequenceHash and SequenceMAC, a pair of open-source, hash-agnostic multihashing constructions (now part of the C2SP specification project) that let developers securely combine multiple values into a hash using nearly any cryptographic hash function, unlike NIST's TupleHash which is tied to Keccak. The constructions prevent attacks caused by ambiguous input encodings by providing unambiguous length-suffix input encoding, length-extension resistance, optional customization strings for domain separation, and a keyed MAC mode that also avoids HMAC's key pseudocollision issues. Implementations are available in Rust, Go, and Python, along with extensive test vectors to help developers verify their implementations.