Ballot Encryption
An ElectionGuard ballot is comprised entirely of encryptions of one (indicating selection made) and zero (indicating selection not made). To enable homomorphic addition (for tallying), these values are exponentiated during encryption. Specifically, to encrypt a ballot entry
-
Zero (not selected) is encrypted as
. -
One (selected) is encrypted as
.
Note that if multiple encrypted votes
A contest in an election consists of a set of options together with a selection limit that indicates the number of selections that are allowed to be made in that contest. In most elections, most contests have a selection limit of one. However, a larger selection limit (e.g., select up to three) is not uncommon in some elections. Approval voting can be achieved by setting the selection limit to the total number of options in a contest. Ranked choice voting is not supported in this version of ElectionGuard, but it may be enabled in a future version.2 Also, write-ins are assumed to be explicitly registered or allowed to be lumped into a single “write-ins” category for the purpose of verifiable tallying. Verifiable tallying of free-form write-ins may be best done with a MixNet3 design.
A legitimate vote in a contest consists of a set of selections with cardinality not exceeding the selection limit of that contest. To accommodate legitimate undervotes, the internal representation of a contest is augmented with “placeholder” options equal in number to the selection limit. Placeholder options are selected as necessary to force the total number of selections made in a contest to be equal to the selection limit. When the selection limit is one, for example, the single placeholder option can be thought of as a “none of the above” option.
With larger selection limits, the number of placeholder options selected corresponds to the number of additional options that a voter could have selected in a contest.
Note
For efficiency, the placeholder options could be eliminated in an approval vote. However, to simplify the construction of election verifiers, we presume that placeholder options are always present – even for approval votes.
Two things must now be proven about the encryption of each vote to ensure the integrity of a ballot.
-
The encryption associated with each option is either an encryption of zero or an encryption of one.
-
The sum of all encrypted values in each contest is equal to the selection limit for that contest (usually one).
The use of ElGamal encryption enables efficient zero-knowledge proofs of these requirements, and the Fiat-Shamir heuristic can be used to make these proofs non-interactive. ChaumPedersen proofs are used to demonstrate that an encryption is that of a specified value, and these are combined with the Cramer-Damgård-Schoenmakers technique to show that an encryption is that of one of a specified set of values – particularly that a value is an encryption of either zero or one. The encryptions of selections in a contest are homomorphically combined, and the result is shown to be an encryption of that contest’s selection limit – again using a Chaum-Pedersen proof.
Note
Note that the decryption of the selection limit could be more efficiently demonstrated by just releasing the sum of the nonces used for each of the individual encryptions. But, again to simplify the construction of election verifiers, a Chaum-Pedersen proof is used here as well.
The “random” nonces used for the ElGamal encryption of the ballot nonces are derived from a single 256-bit master nonce
A user of ElectionGuard may optionally provide an additional public key. If such a key is provided, ElectionGuard uses that key to encrypt each ballot’s master nonce
Ballot nonces may be independent across different ballots, and only the nonces used to encrypt ballot selections need to be derived from the master nonce. The use of a single master nonce for each ballot allows the entire ballot encryption to be re-derived from the contents of a ballot and the master nonce. It also allows the encrypted ballot to be fully decrypted with the single master nonce.
Outline for proofs of ballot correctness
To prove that an ElGamal encryption pair
NIZK Proof that
The prover selects a random value
NIZK Proof that
To prove that
As with many zero-knowledge protocols, if the prover knows a challenge value prior to making its commitment, it can create a false proof. For example, if a challenge
Sketch of NIZK Proof that
After the prover makes commitments
Details for proofs of ballot correctness
The full protocol proceeds as follows – fully divided into the two cases.
To encrypt an “unselected” option on a ballot, a random nonce
NIZK Proof that
To create the proof that
and
A challenge value
To encrypt a “selected” option on a ballot, a random nonce
NIZK Proof that
To create the proof that
and
A challenge value
In either of the two above cases, what is published in the election record is the encryption
Important
An election verifier must confirm the following for each possible selection on a ballot:
(A) The given values
(B) The challenge
(C) The given values
(D) The equation
(E) The equation
(F) The equation
(G) The equation
(H) The equation
Proof of satisfying the selection limit
The final step in proving that a ballot is well-formed is demonstrating that the selection limits for each contest have not been exceeded. This is accomplished by homomorphically combining all of the
NIZK Proof that
An additional Chaum-Pedersen proof of
Note that all of the above proofs can be performed directly by the entity performing the public key encryption of a ballot without access to the decryption key(s). All that is required is the nonces
Important
An election verifier must confirm the following for each contest on the ballot:
(A) The number of placeholder positions matches the contest’s selection limit
(B) The contest total
(C) The given value
(D) The given values
(E) The challenge value
(F) The equation
(G) The equation
Tracking codes
Upon completion of the encryption of each ballot, a tracking code is prepared for each voter. The code is a running hash that begins with the extended base hash code
Important
An election verifier must confirm that each of the values in the running hash is correctly computed. Specifically, an election verifier must confirm each of the following.
(A) The equation
(B) For each ballot
(C) The closing hash
Once in possession of a tracking code (and never before), a voter is afforded an option to either cast the associated ballot or spoil it and restart the ballot preparation process. The precise mechanism for voters to make these selections may vary depending upon the instantiation, but this choice would ordinarily be made immediately after a voter is presented with the tracking code, and the status of the ballot would be undetermined until the decision is made. It is possible, for instance, for a voter to make the decision directly on the voting device, or a voter may instead be afforded an option to deposit the ballot in a receptacle or to take it to a poll worker to be spoiled. For vote-by-mail scenarios, a voter can be sent (hashes of) two complete sets of encryptions for each selectable option and can effect a ballot challenge implicitly by choosing which encryptions to return.
-
The initial decryption actually forms the value
. However, since is a relatively small value, it can be effectively computed from by means of an exhaustive search or similar methods. ↩ -
Benaloh J., Moran. T, Naish L., Ramchen K., and Teague V. Shuffle-Sum: Coercion-Resistant Verifiable Tallying for STV Voting (2009) in Transactions of Information Forensics and Security. ↩
-
Chaum D. Untraceable Electronic Mail, Return Addresses, and Digital Pseudonyms (1981) Communications of the ACM. ↩
-
One could simply release the aggregate nonce
to complete this proof. However, since Chaum-Pedersen proofs are being performed elsewhere, it is simpler for a verifier to just repeat the same steps. ↩