Helios Cryptography

Here’s an introduction to the cryptographic systems in Helios. It’s important that these be made clear for a wide range of readers, since the auditability and security, and thus the trustworthiness of Helios is based on their operation.

ElGamal encryption and public-key cryptography

  • Basics:

    Public key cryptography allows two parties to begin communicating securely over a public network, with no previously arranged secret codes. The discrete logarithm problem enables this by making it very hard to calculate private keys given the portions of an ElGamal cipher that are sent over public channels.

  • See it: Assymetric Diagram
  • Operation: (using the traditional Bob and Alice)

  • Bob generates a pair of numbers - a private key and a public key.
  • (cyclic group and gcd)
  • Bob publishes a public key group, which includes a cyclic group, his public key, and a public random number “g” raised to his private key.
  • Alice selects an element from that cyclic group as her private key and computes the private component from Bob raised by her selection. This is the shared secret that will not be sent in the clear.
  • She multiplies this number by her message and sends a package including this encryption and g raised to her selected private key.
  • Bob raises Alice’s key section by his private key to get the shared secret.
  • Now Bob and Alice agree on the same number without transmitting it and can encrypt and decrypt messages.
  • The assumption is that it is very hard to figure out the shared secret given the public information.


  • Weaknesses:

    ElGamal is assumed to be very strong, since it requires a previously unknown, very efficient, maybe impossible algorithm to compute the discrete log problem. For this reason, public key is generally treated as a primitive construct in discussions of Helios.

    Homomorphic Encryption

  • Basics:

    Homomorphic encryption is a technique that allows a system to manipulate data while the data is encrypted, never seeing decryptions of the data. In Helios, that means we can add together 1’s and 0’s of ballot choices without decrypting a ballot. This is a key factor in the public-auditing portion of Helios, since anyone can add up the ballots without being able to decrypt them and reveal an individual voter’s choices.

  • See it: Homomorphic Diagram


  • Weaknesses:

    This provides a good deal of auditability, although ensuring that the election officials honestly decrypt the correct sum requires measures like threshold encryption and a varied pool of trustees.

    All ballots should be certified as valid before this tally. Removal requires either:

  • The trustees decrypt the ballot and decrement the total, either manually or with a modification that supports homomorphic subtraction to create a new official tally.
  • The ballot is removed and the election is re-tallied.

  • Altering the tally after the auditing process requires special attention to procedures around invalid or previously uncounted valid ballots.

    The Helios Encryption Process

  • Election Setup:

    Helios Elections begin by creating a database entry containing a unique election id and name, a default trustee to decode the election, a set of questions, and settings for who can vote, how questions are answered, when the election starts and ends, and whether the names of voters will be visible or replaced by random strings.

    Closed elections have another database table that stores a list of voters with a name, id, and email for each.

  • Trustees:

    By default, Helios acts as a trustee. This means that the creator of an election does not have to input any information to edit or tally and election.

    Additional trustees can be added. Each trustee receives a public and private key, and all trustees must cooperate with the automatic Helios trustee to edit or tally the election.

    Helios does not currently support threshold encryption, which allows a subset of trustees to execute administrative functions.

  • Identity:

    Helios shows voter names by default, but can replace names with aliases to help prevent coercion and enhance privacy. Administrators can decrypt ballots, but trustees and threshold encryption can be used to prevent this.

  • Casting:

    Votes are encrypted entirely on the client’s computer, so a voter’s choices are never transmitted in the clear. Votes can be cast with provided code, but Helios’ creator recommends building a personalized casting system as a challenge. The possibility of writing your own encryption service adds to the transparency of the system.

    Once a vote is encrypted, an independent audit system allows a voter to spoil their vote and see what their choices were encoded as. When this is implemented in a stateless manner, the auditor cannot tell when it is being tested. This makes it hard to fool voters and encrypt votes incorrectly.

    These properties follow from Benaloh’s 2006 paper Simple Verifiable Elections, which recommended that election machines be split up to improve trustworthiness. Ballot generation, encryption, and auditing can all be run independently of each other.

  • Tallying

    Homomorphic tally: The response sections of all ballots are added to produce a public encrypted tally (the sum of all responses)

    Trustees decrypt the tally: All trustees perform partial decryptions, resulting in a private decrypted sum for each candidate. This sum is released, while the keys enabling decryption are kept private.

    Auditors verify encrypted tally: Anyone can calculate the public encrypted tally and compare it to the published version, so the election is trustworthy as long as every voter trusts at least one trustee. This assumes that trustees are sourced from opposing or neutral sides and thus have an interest in spotting and rejecting manipulation of the results.

  • Threshold Encryption

    Threshold encryption allows any subset of a sufficient number of trustees to execute tallying, decrypting, and other tasks like roster modifications. This prevents individuals from changing election details without approval and also prevents elections from being held up by the loss or subversion of a minority of trustees.

  • See it:Threshold Diagram