davinci-paper/v1/sections/vote.tex
v1/sections/vote.texRaw
1% !TeX root = ../build/main.tex
2
3In the Vocdoni Z system, a vote comprises several components that work together to ensure secure, private, and verifiable voting. These components are:
4
5\begin{enumerate}
6 \item Process Identifier
7 \item Census Proof
8 \item Identity Commitment
9 \item Nullifier
10 \item Encrypted Ballot and Zero-Knowledge Proof (ZKP)
11 \item Signature
12\end{enumerate}
13
14Below, we detail each component and its role in the voting process.
15
16\begin{enumerate}
17 \item \textbf{Process Identifier} \\
18
19 The \textbf{Process Identifier} (\texttt{ProcessId}) is a unique 32-byte number that uniquely identifies a specific voting process within the Vocdoni Z ecosystem. It encapsulates essential information, including the rules and constraints for ballots and the unique identifier of the Vocdoni Z blockchain instance.\\
20
21 \item \textbf{Census Proof} \\
22
23 The \textbf{Census Proof} serves as the voter's identity verification mechanism, ensuring that only eligible voters can participate. Depending on the process configuration, the voter provides:
24 \begin{itemize}
25 \item \textbf{Merkle Tree-Based Proof}: A Merkle proof showing inclusion in the census.
26 \item \textbf{Credential Service Provider (CSP)}: A credential issued by a trusted third party. \\
27 \end{itemize}
28
29 \item \textbf{Identity Commitment}\\
30
31 The \textbf{Commitment} $C$ is used to prevent a voter from registering multiple nullifiers and to avoid collisions if different voters choose the same secret.
32
33 $$ C = \text{Hash} (\text{Address} || ProcessId || s). $$
34
35 \begin{itemize}
36 \item \textbf{Stored in State Merkle Tree (SMT)}: Indexed by the voter's address.
37 \item \textbf{Prevents Multiple Registrations}: Each address can have only one commitment, ensuring a voter cannot register multiple secrets.
38 \item \textbf{Collision Resistance}: Including the address in $C$ ensures that commitments are unique even if voters choose the same secret $s$.
39 \end{itemize}
40
41 The secret $s$ can be implemented from different ways or a combination of them, such as:
42
43 \begin{itemize}
44 \item A secure enough Password introduced by the user.
45 \item A signature of a specific text.
46 \item A random input that the user must store to allow potential vote overwrite.\\
47 \end{itemize}
48
49 \item \textbf{Nullifier} \\
50
51 The \textbf{Nullifier} $N$ is a 32-byte hash used to:
52
53 \begin{itemize}
54 \item \textbf{Prevent Double Voting}: Ensures each voter can cast only one vote or overwrite their previous vote.
55 \item \textbf{Allow Vote Overwriting}: Voters can submit a new vote with the same nullifier to replace their previous vote.
56 \item \textbf{Provide Anonymity}: Cannot be linked back to the voter's identity without knowledge of the secret $s$.
57 \end{itemize}
58
59 $$ N = \text{Hash}(\text{C} || s) $$
60
61 \item \textbf{Encrypted Ballot and Zero-Knowledge Proof (ZKP)} \\
62
63 The ballot contains the voter's selections encoded according to the ballot protocol rules. To ensure privacy, the ballot is encrypted using the ElGamal cryptosystem over elliptic curves, which allows homomorphic combination of encrypted votes.
64
65 \textbf{Encryption process}:
66
67 \begin{itemize}
68 \item The voter's choice $m$ is encoded as a point on the elliptic curve.
69 \item The voter selects a random scalar $k \in [1, n-1]$, where is the order of the elliptic curve group.
70 \item Compute the ciphertext components:
71 \begin{itemize}
72 \item $C_1 = k \cdot G$
73 \item $C_2 = M + k \cdot H$
74 \end{itemize}
75 \item The ciphertext is the pair $(C_1, C_2)$.
76 \end{itemize}
77
78
79 \textbf{Zero-Knowledge Proof (ZKP)}:
80
81 The voter generates a ZKP to prove the correctness of the ballot and encryption process:
82
83 \begin{enumerate}
84 \item \textbf{Correctness of Encryption}: Ensures the ciphertext $(C_1, C_2)$ is correctly computed from the plaintext message $M$ and random scalar $k$.
85 \item \textbf{Compliance with Ballot Protocol Rules}: The plaintext vote adheres to the ballot protocol constraints, such as valid choices and allowed number of selections.
86 \item \textbf{Correct Computation of Commitment and Nullifier}:
87 \begin{itemize}
88 \item \textbf{Commitment}: $C = \text{Hash} (\text{Address} || ProcessId || s).$
89 \item \textbf{Nullifier}: $N = \text{Hash}(\text{C} || s)$.
90 \item The voter knows the secret linking the commitment and nullifier.
91 \end{itemize}
92 \end{enumerate}
93
94 \textbf{Inputs to the ZKP Circuit}:
95
96 \begin{itemize}
97 \item \textbf{Public Inputs}:
98 \begin{itemize}
99 \item Encrypted Ballot $(C_1, C_2)$.
100 \item Ballot Protocol Configuration.
101 \item Encryption Parameters.
102 \item Voter's Weight
103 \item Commitment $C$.
104 \item Nullifier $N$.
105 \end{itemize}
106 \item \textbf{Private Inputs}:
107 \begin{itemize}
108 \item Plaintext Vote $m$.
109 \item Secret $s$.
110 \item Random Scalar $k$.
111 \item Voter's Address (used internally in the computation of $C$).
112 \end{itemize}
113 \end{itemize}
114
115 \begin{figure}[H]
116 \centering
117 \fbox{
118 \includegraphics[scale = 0.3, draft = false]{\figs/vote-circuit-inputs.png}}
119 \end{figure}
120
121
122 \item \textbf{Signature}\\
123
124 The \textbf{Signature} authenticates the vote and ensures that it was cast by a legitimate voter. The voter signs necessary components using their private key, depending on the census configuration (e.g., ECDSA, EdDSA, RSA).
125\end{enumerate}