arnaucube
arnaucube/davinci-paperPublic Self-hosted repository
davinci-paper/v1/sections/distributed-key-generation.tex
v1/sections/distributed-key-generation.texRaw
 1% !TeX root = ../build/main.tex
 2
 3Vocdoni Z employs a Distributed Key Generation (DKG) protocol that allows a group of participants (Sequencers) to jointly generate a public/private key pair for the ElGamal cryptosystem without any single participant knowing the complete private key. Instead, each participant holds a share of the private key, and only a threshold number of participants can collaborate to decrypt messages (the threshold is configurable). This enhances security by eliminating the need for a trusted dealer and protecting against single-point failures.
 4
 5\subsection{Properties}
 6
 7\begin{itemize}
 8	\item \textbf{Decentralized Key Generation}: No single party knows the complete secret key.
 9	\item \textbf{Coordinated via Ethereum}: The parties do not need to interact directly, they use an Ethereum Smart Contract to bootstrap the process and exchange the required information.
10	\item \textbf{Threshold Security}: A minimum number of participants (threshold) is required to reconstruct the secret.
11	\item \textbf{Verifiable Shares}: Parties and Ethereum can verify the correctness of the shares they receive.
12	\item \textbf{Scalability}: Supports any number of participants and configurable threshold.
13\end{itemize}
14
15\subsection{Protocol Steps}
16
17\begin{enumerate}
18	\item \textbf{Initialization}:
19			\begin{itemize}
20				\item The Ethereum Smart Contract provides the initial parameters:
21						\begin{itemize}
22							\item \textbf{Threshold} $t$: Minimum number of participants required to decrypt messages.
23							\item \textbf{Total Participants} $n$: : Total number of sequencers involved.
24							\item \textbf{Elliptic Curve Parameters}: Choose a suitable elliptic curve with generator point $G$ and order $q$.
25						\end{itemize}
26			\end{itemize}
27	\item \textbf{Secret Polynomial Generation}:
28			\begin{itemize}
29				\item Each participant $P_i$ generates a random secret polynomial of degree $t-1$:
30						$$f_i (x) = a_{i,0} + a_{i, 1}x + a_{i,2}x^2 + \dots + a_{i, t-1}x^{t-1}$$
31						\begin{itemize}
32							\item Coefficients $a_{i,j} \in \mathbb{Z}_q$ are randomly selected.
33							\item The constant term $a{i,0}$ is $P_i$'s individual secret.
34						\end{itemize}
35			\end{itemize}
36	\item \textbf{Commitment to Coefficients}:
37			\begin{itemize}
38				\item Participants compute public commitments to their polynomial coefficients: $C_{i,j} = a_{i,j}\cdot G$
39					\begin{itemize}
40						\item These commitments are points on the elliptic curve and are published to all participants.
41						\item This ensures transparency and allows others to verify shares without revealing secrets.
42					\end{itemize}
43			\end{itemize}
44	\item \textbf{Share Computation}:
45			\begin{itemize}
46				\item Each participant computes shares for every other participant  $P_j$: $s_{i,j} = f_i(j)$
47					\begin{itemize}
48						\item The shares $s_{i,j} \in \mathbb{Z}_q$ are secret scalar values.
49					\end{itemize}
50			\end{itemize}
51	\item \textbf{Secure and Verified Distribution}:
52			\begin{itemize}
53				\item Shares are encrypted before distribution using a simplified version of the \textbf{Elliptic Curve Integrated Encryption Scheme (ECIES)}, since we only need to encrypt a scalar:
54				\item Each participant provides a zkSNARK proof to prove:
55					\begin{itemize}
56						\item The correctness of the encrypted share.
57						\item Compliance with the DKG protocol rules.
58					\end{itemize}
59				\item This allows the smart contract on Ethereum to verify the validity without revealing secrets.
60			\end{itemize}
61	\item \textbf{Aggregation of Shares}:
62			\begin{itemize}
63				\item Each participant computes their private key share by summing the shares received (including their own): $s_j = \sum_{i ^1}^ns_{i,j} \mod q$
64				\item This becomes $P_j$'s portion of the collective private key.
65			\end{itemize}
66	\item \textbf{Public Key Computation}:
67			\begin{itemize}
68				\item Participants compute the collective public key: $PK = \sum_{i = 1}^n C_{i,0}$
69					\begin{itemize}
70						\item Since $C_{i,0} = a_{i,0}\cdot G$, the public key is effectively: $PK = s\cdot G$ where $s = \sum_{i = 1}^n a_{i,0} \mod q$ is the collective private key (unknown to any single participant).
71					\end{itemize}
72			\end{itemize}
73	\item \textbf{Public Key Distribution}:
74			\begin{itemize}
75				\item Any of the participants can publish the collective public key $PK$ to the Ethereum smart contract.
76			\end{itemize}
77\end{enumerate}