# Practical Quantum Electronic Voting

This example protocol achieves the functionality of Quantum Electronic Voting. In this protocol, an untrusted multipartite entanglement source can be used to carry out an election without any election authorities.

## Outline

• In the first phase of the protocol, each agent is assigned a secret unique random index
• Next, we perform multiple rounds of voting, one for each agent. In each round, the following steps are carried out:
• The agent with the same index as the round number is designated the voter for that round
• The source distributes one qubit of a GHZ state to each agent. The voting agent randomly chooses to either verify the GHZ state or vote with a certain probability. This step, including state distribution, is repeated until the voter chooses to vote. Once voting is chosen, the voter anonymously transmits their vote to all agents.
• Finally, all the votes are tallied. All agents have the votes for each round and can thus verify the final tally.

## Notation

• ${\displaystyle N}$: Number of agents
• ${\displaystyle V=\{v_{k}\}_{k\in [N]}}$: The votes
• ${\displaystyle S}$: Security parameter
• ${\displaystyle \epsilon }$: Distance from the perfect GHZ state
• ${\displaystyle \delta }$: Threshold for verification
• ${\displaystyle \eta }$: Probability of failure of verification
• B: Bulletin board - ${\displaystyle N}$ x ${\displaystyle N}$ binary matrix. Each row corresponds to one round of voting, and each column contains the output of a single voter across all rounds
• E: Vote vector - The list of votes across ${\displaystyle N}$ rounds. Each element is computed as the parity of a row from B
• T: Final tally

## Protocol Description

### Protocol 1 : Quantum e-voting

Inputs: ${\displaystyle V=\{v_{k}\}_{k\in [N]}}$ - Set of votes; ${\displaystyle S}$ - Security parameter; ${\displaystyle \epsilon }$ - Distance from the perfect GHZ state; ${\displaystyle \delta }$ - Threshold for verification; ${\displaystyle \eta }$ Probability of failure of verification

Output: The candidate with majority votes or Abort

Resources: Classical communication, random numbers, N-qubit GHZ source, quantum channels

• Phase 1 [getting unique secret indices]
• Agents perform UniqueIndex until each agent has a secret unique random index ${\displaystyle \omega _{k}}$
• For ${\displaystyle l=1}$ to ${\displaystyle N}$
• The voting agent is the agent ${\displaystyle k}$ with ${\displaystyle \omega _{k}=l}$
• Repeat until Voting is announced
• The source distributes to each of the N agents one qubit of the GHZ source
• All agents ${\displaystyle j\in [N]}$ set rejections${\displaystyle _{j}=}$ trials${\displaystyle _{j}=0}$
• The voting agent tosses log${\displaystyle _{2}[{\frac {16N\epsilon ^{2}}{(\epsilon ^{2}-4\delta )^{2}}}}$ln${\displaystyle ({\frac {1}{\eta }})]}$
• The agents perform LogicalOR, where output 1 indicates Verification and output 0 indicates Voting. Everyone except the voting agent inputs 0; if the coin toss is 'all heads' the voting agent also inputs 0, otherwise the voting agent inputs 1
• If Verification is chosen, the agents perform RandomAgent and the voting agent anonymously picks an agent ${\displaystyle j\in [N]}$ to be the verifier. Agent ${\displaystyle j}$ updates trials${\displaystyle _{j}+=1}$ and if Verification outputs reject: rejections${\displaystyle _{j}+=1}$
• If for any ${\displaystyle j\in [N],\delta _{j}={\frac {rejections_{j}}{trials_{j}}}>\delta }$, the protocol Aborts
• Perform Voting. The outcome is one row of the Bulletin Board B. The parity of the row gives one entry in the vote vector E.
• Given the votes E, the tally T can be computed.
• Phase 3 [Verification of results]:
• All agents perform LogicalOR with security parameter ${\displaystyle S}$, and input 1 if their vote is not the same as the entry in E for the round in which they voted, and 0 otherwise.
• If LogicalOR outputs 1, Abort the protocol. Else output the candidate with the most votes according to the tally T.

### Protocol 2 : UniqueIndex

Input: Security parameter ${\displaystyle S}$ to be used in LogicalOR,${\displaystyle N}$ random boolean variables ${\displaystyle x_{i}}$.

Output: Each agent ${\displaystyle k}$ has a secret unique index ${\displaystyle \omega _{k}}$.

Resources: Classical communication and random numbers.

1. Beginning of round R = 1
2. Agents perform LogicalOR with inputs ${\displaystyle x_{k}=0}$ if they already have an index and ${\displaystyle x_{k}=1}$ if they do not.
3. If ${\displaystyle y=0}$, repeat from step 2
4. If an agent ${\displaystyle k}$ has a bit ${\displaystyle x_{k}=1}$ and ${\displaystyle \omega _{k}=0}$ they know they are the only one and has been assigned the secret index corresponding to the round ${\displaystyle \omega _{k}=R}$, otherwise there is a collision.
5. [notification] Everybody performs a LogicalOR with input 0, unless they received the index in this round, in which case they input 1.
6. If the output of LogicalOR is 0, no index was assigned and we repeat from step 2.
7. If the output of LogicalOR is 1, the index was assigned and we repeat from step 2 with R+ = 1.
8. Repeat from step 2 until all indices have been assigned.

### Protocol 3 : Verification

Input: A quantum state distributed and shared by ${\displaystyle N}$ parties, security parameter ${\displaystyle S}$ for RandomAgent.

Output: If the state is a GHZ state ${\displaystyle \rightarrow }$ YES.

Resources: Classical communication, random numbers, quantum state source, quantum channels.

1. Everyone executes RandomAgent to choose uniformly at random one of the voters to be the verifier.
2. The verifier generates random angles ${\displaystyle \theta _{j}\in [0,\pi )}$ for all agents including themselves, such that the sum is a multiple of ${\displaystyle \pi }$. The angles are then sent out to all the agents.
3. Agent ${\displaystyle j}$ measures in the basis ${\displaystyle [|+_{\theta }\rangle ,|-_{\theta }\rangle ]=[{\frac {1}{\sqrt {2}}}(|0\rangle +e^{i\theta _{j}}|1\rangle ),{\frac {1}{\sqrt {2}}}(|0\rangle -e^{i\theta _{j}}|1\rangle )]}$ and publicly announces the result ${\displaystyle Y_{j}=\{0,1\}}$
4. The state passes the verification test when the following condition is satisfied: if the sum of the randomly chosen angles is an even multiple of ${\displaystyle \pi }$, there must be an even number of 1 outcomes for ${\displaystyle Y_{j}}$ , and if the sum is an odd multiple of ${\displaystyle \pi }$, there must be an odd number of 1 outcomes for ${\displaystyle Y_{j}:\bigoplus _{j}Y_{j}={\frac {1}{\pi }}\sum _{i}\theta _{i}}$

### Protocol 4 : Voting

Input: Voting agent preference ${\displaystyle v_{k}}$.

Output: All agents get one row of the bulletin board.

Resources: Classical communication, GHZ source, quantum channels.

1. Each agent measures the state they received in the Hadamard basis and records the outcome.
2. The outcomes of the measurement of each voter ${\displaystyle k}$ is ${\displaystyle d_{k}}$. Then we know that ${\displaystyle \sum _{k}d_{k}=0}$ mod ${\displaystyle 2}$
3. The voting agent performs an XOR between the outcome ${\displaystyle d_{k}}$ and their vote ${\displaystyle v_{k}}$: ${\displaystyle d_{k}\leftarrow d_{k}\oplus v_{k}}$. However, this alone will still appear as a random string.
4. Every agent publicly broadcasts ${\displaystyle d_{k}}$ which gives one line ${\displaystyle b_{k}}$ of the bulletin board B ${\displaystyle =\{b_{k}\}}$

### Protocol 5 : LogicalOR

Inputs: ${\displaystyle N}$ agents, ${\displaystyle N}$ boolean variables ${\displaystyle x_{i}}$, security parameter ${\displaystyle S=(1-2^{-\Gamma })^{\Sigma }\in (0,1)}$

Output: ${\displaystyle y=\vee _{i}^{N}x_{i}}$

Resources: Classical communication and random numbers

1. Decide ${\displaystyle N}$ random orderings, such that each voter is the last once. For each ordering repeat \Sigma times the following.
2. Each voter ${\displaystyle k}$ gives an input ${\displaystyle x_{k}}$
3. If ${\displaystyle x_{k}=0}$, set ${\displaystyle p_{k}=0}$, otherwise toss ${\displaystyle \Gamma }$ coins and set ${\displaystyle p_{k}}$ to ${\displaystyle 1}$ if the result is ‘all heads’ and to ${\displaystyle 0}$ otherwise
4. Then each voter generates uniformly at random an ${\displaystyle N}$-bit string ${\displaystyle r_{k}=r_{k}^{1}r_{k}^{2}...r_{k}^{N}}$, such that ${\displaystyle \bigoplus _{i=1}^{N}r_{k}^{i}=p_{k}}$
5. Voter ${\displaystyle k}$ sends ${\displaystyle r_{k}^{i}}$ to voter ${\displaystyle i}$ for all ${\displaystyle i}$, keeping ${\displaystyle r_{k}^{k}}$
6. Each voter sums the received bits and broadcasts the parity ${\displaystyle z_{i}=\bigoplus _{k=1}^{N}r_{k}^{i}}$ according to the ordering.
7. Compute the parity of the original bits ${\displaystyle y=\bigoplus _{i}z_{i}}$
8. From this everyone can also compute the parity of all other inputs except their own ${\displaystyle w_{k}=\bigoplus _{i=1}^{N}(z_{i}\otimes r_{k}^{i})}$
9. Repeat ${\displaystyle \Sigma }$ times from step 4: each time repeat with ${\displaystyle p_{k}}$ as new inputs
10. If at least once in the ${\displaystyle \Sigma }$ repetitions for the various orderings ${\displaystyle y=1}$, this is the output of the protocol, otherwise it is ${\displaystyle y=0}$

### Protocol 6 : RandomBit

Input: Security parameter S to be used in LogicalOR, voting agent: probability distribution D.

Output: The voting agent anonymously announces a random bit according to D.

Resources: Classical communication and random numbers.

• Perform LogicalOR with security parameter S where the voting agent inputs a random bit according to D and the other agents input 0.

### Protocol 7 : RandomAgent

Input: Security parameter S to be used in RandomBit, voting agent: probability distribution D.

Output: The voting agent anonymously chooses a random agent according to D.

Resources: Classical communication and random numbers.

• Repeat RandomBit log2 N times.

## Properties

• ${\displaystyle (\sigma _{H},\sigma _{D},\gamma )}$-Correctness: This notion of approximate correctness includes two properties:
• ${\displaystyle \sigma _{H}}$-Completeness: If all agents are honest, the election is accepted with probability more than ${\displaystyle \sigma _{H}}$ - Pr[election accepted] ${\displaystyle \geq \sigma _{H}}$
• ${\displaystyle (\sigma _{D},\gamma )}$-Soundness: the probability that the election result is accepted, given that the set of the votes E computed from the bulletin board B resulting from the election is more than ${\displaystyle \gamma }$ away from the real votes V, is smaller than ${\displaystyle \sigma _{D}}$ -
Pr[election accepted ${\displaystyle |{\frac {1}{N}}||}$V - E${\displaystyle ||_{1}\geq \gamma ]\leq \sigma _{D}}$
This particular protocol is ${\displaystyle ([1-\epsilon (1-S)]^{N},S^{N(1+\lambda )[\epsilon (1-\eta )+\eta ]},(1+\lambda )[\epsilon (1-\eta )+\eta ])}$-correct, for a small constant ${\displaystyle \lambda >0}$
• ${\displaystyle \zeta }$-Privacy: The privacy of the election scheme implies that for any voter ${\displaystyle k}$, the probability that any subset of malicious parties ${\displaystyle D}$ that deviates from the honest protocol can guess the vote ${\displaystyle v_{k}}$ of the voter is at most ${\displaystyle \zeta }$ more than in the case they just have access to the bulletin board and to their own votes -
${\displaystyle \forall k,}$ Pr${\displaystyle [v_{k}|D]-}$ Pr${\displaystyle [v_{k}|B,v_{j}\in }$ V${\displaystyle _{D}]\leq \zeta }$
This particular protocol is ${\displaystyle \zeta }$-private with ${\displaystyle \zeta =(1-\eta )^{N}\epsilon +(1-(1-\eta )^{N})}$
• Authentication: This e-voting protocol does not provide authentication, which should be taken care of by the physical implementation of the protocol.
• Double voting: Each voter can vote at most once. Since the number of voters is known in advance for this protocol, double voting is easily taken care of.
• Verifiability: Each voter can verify that their vote has been counted correctly. In this protocol, the tally is performed by the voters themselves. The bulletin board produced as an output of the protocol is public and can always be checked by everyone, while still appearing random.
• Receipt freeness: In order to prevent vote-selling, voters should not be able to prove how they voted. As the unique indices stay secret, voters cannot produce a receipt of their vote.
• Additional candidates: The protocol described here only allows an election consisting of 2 candidates. This can be extended to more candidates by repeating the protocol multiple times in sequence. In particular, if there are K candidates, we can express each of them using log${\displaystyle _{2}}$K bits and repeat the election as many times so that each vote set corresponds to one bit. This however does affect the correctness and privacy.