arnaucube
arnaucube/davinci-paperPublic Self-hosted repository
add new intro + generator points + some udpates
bellesmarta belles.mm@gmail.com
Fri, 11 Jul 2025 18:13:59 +0200
commit

cab554c81a1f8356fcde2f13cf3544248cadb2b1

parent

7b0043a4ab57841e461c8e2bf0031bef3e4b7a45

M v2/bibliography/bibtex.bib → v2/bibliography/bibtex.bib

@@ -51,8 +51,8 @@ @article{johnson01ecdsa,

author = {Johnson, Don and Menezes, Alfred and Vanstone, Scott}, title = {The Elliptic Curve Digital Signature Algorithm ({ECDSA})}, year = {2001}, - issue_date = {August 2001}, - publisher = {Springer-Verlag}, + issue_date = {August 2001}, + publisher = {Springer - Verlag}, address = {Berlin, Heidelberg}, volume = {1}, number = {1},

@@ -60,8 +60,8 @@ issn = {1615-5262},

url = {https://doi.org/10.1007/s102070100002}, doi = {10.1007/s102070100002}, journal = {Int. J. Inf. Secur.}, - month = aug, - pages = {36–63}, + month = {August}, + pages = {36--63}, numpages = {28} }

@@ -445,3 +445,34 @@ title = {{SEC 2}: Recommended Elliptic Curve Domain Parameters. {In}: Standards for Efficient Cryptography 2 ({SEC 2})},

url = {https://www.secg.org/sec2-v2.pdf}, year = 2010 } + +@misc{erc2494, + author = {Barry WhiteHat and Marta Bellés and Jordi Baylina}, + title = {{ERC-2494}: {B}aby {J}ubjub Elliptic Curve [{DRAFT}], {E}thereum {I}mprovement {P}roposals, no. 2494, [Online serial]}, + url = {https://eips.ethereum.org/EIPS/eip-2494}, + year = {January 2020} +} + +@article{wood2014ethereum, + title={Ethereum: A secure decentralised generalised transaction ledger}, + author={Wood, Gavin and others}, + journal={Ethereum project yellow paper}, + volume={151}, + number={2014}, + pages={1--32}, + year={2014} +} + +@misc{eip3026, + author = {Youssef El Housni and Michael Connor and Aurore Guillevic}, + title = {{EIP-3026}: {BW6-761} curve operations [{DRAFT}], {E}thereum {I}mprovement {P}roposals, no. 3026, [Online serial]}, + url = {https://eips.ethereum.org/EIPS/eip-3026}, + year = {October 2020} +} + +@misc{eip2539, + author = {Alex Vlasov and hujw77}, + title = {{EIP-2539}: {BLS12-377} curve operations [{DRAFT}], {E}thereum {I}mprovement {P}roposals, no. 2539, [Online serial]}, + url = {https://eips.ethereum.org/EIPS/eip-2539}, + year = {February 2020} +}
M v2/build/main.tex → v2/build/main.tex

@@ -20,7 +20,7 @@ %enumerate pages

\pagestyle{plain} \thispagestyle{plain} -\addcontentsline{toc}{section}{\protect\numberline{}Abstract} +%\addcontentsline{toc}{section}{\protect\numberline{}Abstract} \begin{abstract} \Davinci is the evolution of the Vocdoni voting protocol, designed to empower civil society by providing essential tools for secure, verifiable, and anonymous digital voting. Leveraging recent advancements in zero-knowledge (ZK) proof systems and blockchain technology, \davinci transitions to a specialized ZK-rollup system that inherits network security from settlement layers like Ethereum mainnet. The system relies on cryptographic proofs to ensure integrity and security, eliminating the need for centralized authorities. By integrating ZK-SNARKs and threshold homomorphic encryption, \davinci enables end-to-end verifiability, privacy, and trustlessness in the voting process. The protocol employs a distributed key generation among sequencers, coordinated via Ethereum smart contracts, and uses Ethereum data blobs for data availability. With a focus on accessibility, scalability, receipt-freeness, and automation, \davinci aims to facilitate high-frequency, low-cost voting, fostering mass adoption of e-voting and simplifying civil participation. Finally, the introduction of the Vocdoni token aligns incentives among participants, ensuring the system's sustainability and enabling decentralized governance. %

@@ -29,10 +29,6 @@

% \freefootnote{\scriptsize{Authors are listed in alphabetical order (\url{https://www.ams.org/profession/leaders/CultureStatement04.pdf}).}} \end{abstract} -\martai{Change Vocdoni to DAVINCI.} - -\martai{Mention that the spec can be tailored to the needs of the specific vote. So, here we present some default configuration, but some of the pieces can be changed (specially the cryptographic schemes or curves). For this reason, we tried to make this document modular (like the code), to facilitate the changes and the analysis of the consequences.} - \martai{Separate the roles of the sequencers from key generators?} \setcounter{tocdepth}{3}

@@ -40,13 +36,10 @@ \makeatletter

\renewcommand*\l@author[2]{} \renewcommand*\l@title[2]{} \makeatletter + \tableofcontents -%\pagebreak -\section*{Vocdoni} -\addcontentsline{toc}{section}{\protect\numberline{}Vocdoni} -\label{sec:intro-old} -\input{\secs/introduction-old} +\newpage \section{Introduction} \label{sec:intro}

@@ -61,7 +54,6 @@ \section{Protocol intuition}

\label{sec:protocol-intuition} \input{\secs/protocol-intuition} -\newpage \section{Cryptographic primitives} %building blocks \label{sec:cryptographic-primitives} \input{\secs/cryptographic-primitives}
M v2/sections/analysis.tex → v2/sections/analysis.tex

@@ -11,6 +11,35 @@ \label{sec:analysis:security}

Make a section called \textit{properties}? +From old intro: + +\paragraph{Design principles.} + +To build the \davinci stack, we adhere to the following design principles: + +\begin{enumerate} + \item \textbf{Cryptography as the source of truth}: we rely exclusively on cryptographic proofs to ensure the integrity and security of the voting process. By trusting only in cryptography, we eliminate the need for centralized authorities, making the system inherently secure and transparent. + + \item \textbf{Trustlessness}: our system operates without requiring trust in any single party. Through cryptographic protocols and decentralized infrastructure, we ensure system integrity and prevent compromise from any malicious actor. + + \item \textbf{End-to-end verifiability}: every voter can verify their ballot from casting to result computation (individual verifiability). Additionally, any third party can audit the election data to confirm results (universal verifiability) and verify that each vote comes from a uniquely registered voter (eligibility verifiability). Transparent cryptographic mechanisms make this possible. + + \item \textbf{Composability}: the system is modular, consisting of interchangeable components that can be rearranged or integrated with external systems via adaptable interfaces. This allows for redundancy, flexibility, and seamless integration with third-party applications, exemplified by our voting-as-a-service APIs. + + \item \textbf{Accessibility}: Vocdoni’s voting platform (App) is open source, universally available and user-friendly. The interface is intuitive for all users, including those less familiar with technology, and accommodates voters that use assistive technologies like screen readers. + + \item \textbf{Open source}: by releasing our code openly, we invite anyone to audit and contribute, enhancing security and fostering community engagement. Transparency prevents security through obscurity and accelerates innovation. + + \item \textbf{Resilience}: we design for robustness against hardware failures, network outages, and censorship. Infrastructure decentralization and distributed ownership enhance system availability and resistance to attacks. + + \item \textbf{Scalability}: our solution processes votes at high throughput, exceeding current requirements to accommodate future growth. The decentralized infrastructure scales organically as usage increases, ensuring consistent performance. + + \item \textbf{Receipt-freeness}: to mitigate risks of collusion, coercion, and vote-buying, the system enables voters to verify their votes without being able to prove to others how they voted, thus reducing incentives for coercion and bribery. Additionally, voters are allowed to overwrite their votes while maintaining secrecy. + + \item \textbf{Automation}: we minimize human intervention through smart contracts and cryptographic protocols, reducing costs and human error. Automation ensures consistent operation and frees resources for voter support and auditing. +\end{enumerate} + + \subsubsection{Receipt-freeness} In democratic processes, the ability of voters to cast their votes freely, without undue influence or coercion, is crucial. A critical aspect of maintaining this freedom is ensuring receipt-freeness, preventing voters from being able to prove to third parties how they voted. \davinci implements receipt-freeness by leveraging the properties of the ElGamal cryptosystem, and zkSNARKs.
M v2/sections/cryptographic-primitives.tex → v2/sections/cryptographic-primitives.tex

@@ -60,17 +60,98 @@ \item $\F_w$: scalar field of $\BLS{\G}_1, \BLS{\G}_2, \BLS{\G}_T$.

% \end{itemize} -\paragraph{Generators.} +\paragraph{Generators.}\mbox{}\\ + +\noi We denote by $\hlget{\SEC{G}}$ the generator of $\SEC{\G}$ as defined in~\cite{brown10sec}, $\hlget{\BN{G}}$ the generator of $\BN{\G}_1$ as defined in~\cite{wood2014ethereum}, $\hlget{\BJ{G}}$ the generator of $\BJ{\G}$ as defined in~\cite{erc2494}, $\hlget{\BW{G}}$ the generator of $\BW{\G}_1$ as defined in~\cite{eip3026}, and $\hlget{\BLS{G}}$ the generator of $\BLS{\G}_1$ as defined in~\cite{eip2539}. + \begin{itemize} - \item Generator of $\SEC{\G}$: \[\hlset{\SEC{G}} = \]. - % - \item Generator of $\BN{\G}_1$: $\hlset{\BN{G}} = $. - \item Generator of $\BJ{\G}$: $\hlset{\BJ{G}} = $. - % - \item Generator of $\BW{\G}_1$: $\hlset{\BW{G}} = $. - \item Generator of $\BLS{\G}_1$: $\hlset{\BLS{G}} = $. - % + \item + $ + \hlset{\SEC{G}} = + (\tt{0x79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798,0x483ada7726} \allowbreak + \rule{1.37cm}{0pt} + \tt{a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8}). + $ + \item + $ + \hlset{\BN{G}}\hspace{0.14cm} = \: (\tt{0x01}, \tt{0x02}). + $ + + \item + $ + \hlset{\BJ{G}}\hspace{0.18cm} = + \hspace{0.09cm} (\tt{0x0b9feffffffffaaabfffffffffffffffeffffffffffffffffffffffffffffff}, + \tt{0x17fffffffff} \\ + \rule{1.37cm}{0pt} + \tt{ffffffffffffffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141}). + $ + \item + $ + \hlset{\BW{G}}\hspace{0.085cm} = + \hspace{0.09cm} (\tt{0x1075b020ea190c8b277ce98a477beaee6a0cfb7551b27f0ee05c54b85f56fc779017ffac15520}\\ + \rule{1.37cm}{0pt} + \tt{ac11dbfcd294c2e746a17a54ce47729b905bd71fa0c9ea097103758f9a280ca27f6750dd0356133}\\ + \rule{1.37cm}{0pt} + \tt{e82055928aca6af603f4088f3af66e5b43d, 0x58b84e0a6fc574e6fd637b45cc2a420f952589884} \\ + \rule{1.37cm}{0pt} + \tt{c9ec61a7348d2a2e573a3265909f1af7e0dbac5b8fa1771b5b806cc685d31717a4c55be3fb90b6f} \\ + \rule{1.37cm}{0pt} + \tt{c2cdd49f9df141b3053253b2b08119cad0fb93ad1cb2be0b20d2a1bafc8f2db4e95363)}. + $ + \item + $ + \hlset{\BLS{G}}\hspace{0.07cm} = + \hspace{0.06cm}(\tt{0x008848defe740a67c8fc6225bf87ff5485951e2caa9d41bb188282c8bd37cb5cd5481512ffcd3} \\ + \rule{1.37cm}{0pt} + \tt{94eeab9b16eb21be9ef,0x01914a69c5102eff1f674f5d30afeec4bd7fb348ca3e52d96d182ad44} \\ + \rule{1.37cm}{0pt} + \tt{fb82305c2fe3d3634a9591afd82de55559c8ea6}). + $ \end{itemize} + +%\begin{itemize} +% \item Generator of $\SEC{\G}$ as defined in~\cite{}: +% \begin{align*} +% \hlset{\SEC{G}} = +% (&\tt{0x79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798},\\ +% &\tt{0x483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8}). +% \end{align*} +% % +% \item Generator of $\BN{\G}_1$ as defined in~\cite{}: +% %https://ethereum.github.io/yellowpaper/paper.pdf +% \begin{align*} +% \hlset{\BN{G}} = +% (\tt{0x01}, \tt{0x02}). +% \end{align*} +% % (-1, 1) o bé (1, 2)? +% % +% \item Generator of $\BJ{\G}$ as defined in~\cite{}: +% %https://eips.ethereum.org/EIPS/eip-2494 +% \begin{align*} +% \hlset{\BJ{G}} = +% (&\tt{0x0b9feffffffffaaabfffffffffffffffeffffffffffffffffffffffffffffff},\\ +% &\tt{0x17fffffffffffffffffffffffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141}). +% \end{align*} +% % +% \item Generator of $\BW{\G}_1$ as defined in~\cite{}: +% %https://eips.ethereum.org/EIPS/eip-3026 +% \begin{align*} +% \hlset{\BW{G}} = +% (&\tt{0x1075b020ea190c8b277ce98a477beaee6a0cfb7551b27f0ee05c54b85f56fc779017ffac15520ac11dbfcd294c2e746a17a54ce47729b905bd71fa0c9ea097103758f9a280ca27f6750dd0356133e82055928aca6af603f4088f3af66e5b43d},\\ +% &\tt{0x58b84e0a6fc574e6fd637b45cc2a420f952589884c9ec61a7348d2a2e573a3265909f1af7e0dbac5b8fa1771b5b806cc685d31717a4c55be3fb90b6fc2cdd49f9df141b3053253b2b08119cad0fb93ad1cb2be0b20d2a1bafc8f2db4e95363}). +% \end{align*} +% % +% \item Generator of $\BLS{\G}_1$ as defined in~\cite{}: +% %https://eips.ethereum.org/EIPS/eip-2539 +% \begin{align*} +% \hlset{\BLS{G}} = +% (&\tt{0x008848defe740a67c8fc6225bf87ff5485951e2caa9d41bb188282c8bd37cb5cd5481512ffcd394eeab9b16eb21be9ef},\\ +% &\tt{0x01914a69c5102eff1f674f5d30afeec4bd7fb348ca3e52d96d182ad44fb82305c2fe3d3634a9591afd82de55559c8ea6}). +% \end{align*} +% % +%\end{itemize} + +\pagebreak \subsection{Hash functions} \label{sec:cryptographic-primitives:hash}
M v2/sections/introduction-old.tex → v2/sections/introduction-old.tex

@@ -1,10 +1,5 @@

% !TeX root = ../build/main.tex -\paragraph{Vision and background.} - -Voĉdoni, meaning “to give voice” in Esperanto, embodies our mission to empower civil society from the grassroots level. We aim to build essential primitives and tools that enable any collective—from small groups to millions of citizens—to be heard, regardless of their circumstances or available resources. Our philosophy envisions voting beyond traditional nation-state elections; we see it as a collective signaling mechanism with cryptographic guarantees of integrity and outcome. To address the challenge, we developed a end-to-end verifiable and anonymous voting system designed to work on any device, including smartphones. We also successfuly deployed an infrastructure that maximizes resilience, neutrality, and transparency. - -In 2018, when Vocdoni began, zkSNARKs was just an emerging technology. We chose to base our solution on a customized Byzantine fault tolerant layer-1 (L1) blockchain called Vochain. This allowed us to achieve scalability (approximately 700 transactions per second), to leverage advanced cryptographic tools that are prohibitively expensive on EVM-based blockchains, and enable users to send voting transactions without costs. This experience has provided us with invaluable insights that have enabled us to overcome technical and operational challenges. Although this solution has effectively met user requirements and demonstrated its viability, further development is essential for its widespread adoption as a universal voting protocol. \Davinci represents the evolution of the Vocdoni voting protocol. It integrates smart contracts for orchestration, a zkSNARK-based state machine for verifying and accumulating votes, and a decentralized data availability layer to ensure censorship resistance.

@@ -34,24 +29,4 @@

\item \textbf{Automation}: we minimize human intervention through smart contracts and cryptographic protocols, reducing costs and human error. Automation ensures consistent operation and frees resources for voter support and auditing. \end{enumerate} -\paragraph{Components overview.} -Below, we detail the components of the architecture that collectively support the operation and management of the voting system. - -\begin{figure}[h] - \centerline{\includegraphics[width=300pt,draft=false]{\figs/architecture.png}} - \caption{Caption.} - \label{fig:circuit-inputs} -\end{figure} - -\begin{enumerate} - \item \textbf{Ethereum}. An Ethereum compatible network is used as the source of truth for the voting system. By leveraging an EVM blockchain, the process management ensures that all transitions are immutable and verifiable by all participants. To this end, we implement several smart contracts. - \begin{itemize} - \item \textbf{Process management}: Responsible for the lifecycle management of voting processes. It includes the initiation, monitoring, execution, and closure of voting events. - \item \textbf{Results verification}: For each voting process, this smart contract maintains the integrity of the cast votes and process lifecycle. It verifies that each state transition committed by a ZK sequencer adheres to the predefined rules. - \item \textbf{Sequencer registry}: This smart contract keeps track of the existing available sequencers, stores the collateral to ensure good behavior, and it's used to coordinate the distributed key generation when a new Process is created. - \end{itemize} - \item \textbf{Sequencer}. The Sequencer is a specialized component designed to handle the voting process using zero-knowledge proof mechanisms. It ensures that all transactions related to this process are validated and sequenced. The Sequencers periodically commit the state of the voting process to Ethereum. - \item \textbf{Frontend user interface}. The user interface serves as the primary interaction layer for voters and organizers. It provides tools and functionalities needed by organizers to set up, manage, and oversee elections. This interface simplifies the complexities involved in managing a decentralized vote. - \item \textbf{Data availability}. For each voting process, the system needs to keep track of the current State Merkle Tree, which contains all information of such processes. A public data availability layer, ensures that all state transitions are available and verifiable and allows the participation of multiple sequencers within the same voting process. -\end{enumerate}
M v2/sections/introduction.tex → v2/sections/introduction.tex

@@ -4,12 +4,18 @@ Online voting remains one of the most studied yet elusive applications in applied cryptography. As digital services expand across both public and private sectors, secure and universally verifiable online voting systems have become an increasingly desirable goal. Remote electronic voting promises scalability, accessibility, and administrative efficiency; yet the design of systems that simultaneously ensure privacy, integrity, coercion resistance, and transparency under realistic adversarial models remains a formidable challenge. Numerous deployments—including iVote, Helios, and the Estonian I‑voting system—have revealed deep-rooted usability flaws and security gaps, particularly when verifiability mechanisms are either poorly understood by users or reliant on centralized infrastructure.

Against this backdrop, the Vocdoni project was initiated in 2018 with the aim of rethinking online voting from first principles. The name Voĉdoni, meaning “to give voice” in Esperanto, reflects the project’s foundational goal: to empower collectives—from small associations to millions of citizens—to engage in secure and verifiable decision-making, regardless of technological or institutional barriers. Central to this vision was the idea that voting is not limited to formal governmental elections but serves as a more general-purpose mechanism for collective signaling. Vocdoni introduced a fully anonymous, end-to-end verifiable voting system designed to operate efficiently across a range of devices, including smartphones. To support these goals, the team deployed a custom infrastructure emphasizing resilience, neutrality, and transparency. -Technically, the architecture of Vocdoni was grounded on a bespoke Byzantine Fault Tolerant (BFT) layer-1 blockchain, named Vochain. At the time, zero-knowledge proof systems such as zkSNARKs were emerging but not yet practical for most deployments. Vochain provided a performant and low-cost environment (achieving approximately 700 transactions per second) where advanced cryptographic tools could be used without the constraints imposed by EVM-based blockchains. The ability to issue voting transactions without requiring user fees enabled broader accessibility. Over several years of development and deployment, this architecture proved both viable and valuable in practice. However, broader adoption as a universal voting protocol highlighted the need for further architectural refinements and stronger formal guarantees. +Technically, the architecture of Vocdoni was grounded on a bespoke \textit{Byzantine fault tolerant} (BFT) layer-1 blockchain, named Vochain. At the time, \textit{zero-knowledge} (ZK) proof systems such as ZK-SNARKs were emerging but not yet practical for most deployments. Vochain provided a performant and low-cost environment (achieving approximately 700 transactions per second) where advanced cryptographic tools could be used without the constraints imposed by blockchains based on the \textit{Ethereum virtual machine} (EVM). The ability to issue voting transactions without requiring user fees enabled broader accessibility. Over several years of development and deployment, this architecture proved both viable and valuable in practice. However, broader adoption as a universal voting protocol highlighted the need for further architectural refinements and stronger formal guarantees. -In this work, we introduce \davinci, a new protocol that builds upon the lessons and conceptual groundwork laid by Vocdoni. DaVinci adopts a modular design and integrates state-of-the-art cryptographic tools—including succinct zero-knowledge proofs, improved bulletin board constructions, and robust coercion resistance mechanisms—reflecting the most recent advances in academic research. Unlike monolithic designs, DaVinci is conceived as a composable primitive: a foundational layer intended to support secure and verifiable voting in diverse contexts, from blockchain governance to institutional elections. This shift in design philosophy aims to address long-standing challenges in the field, offering a cleaner abstraction with clearer security boundaries and formal underpinnings. +In this work, we introduce \davinci, a new protocol that builds upon the lessons and conceptual groundwork laid by Vocdoni. \Davinci adopts a modular design and integrates state-of-the-art cryptographic tools—including succinct ZK proofs, improved bulletin board constructions, and robust coercion resistance mechanisms—reflecting the most recent advances in academic research. Unlike monolithic designs, \davinci is conceived as a composable primitive: a foundational layer intended to support secure and verifiable voting in diverse contexts, from blockchain governance to institutional elections. This shift in design philosophy aims to address long-standing challenges in the field, offering a cleaner abstraction with clearer security boundaries and formal underpinnings.\\ + +\martai{Mention the Vocdoni token.} \subsection{Contributions} \label{sec:introduction:contributions} + +This work introduces \davinci, a modular and verifiable protocol for digital voting, designed to support privacy-preserving, auditable, and adaptable election processes across diverse governance contexts. The protocol models voting as a constrained state machine, in which each valid operation is expressed as a formally defined state transition, enforced through succinct ZK proofs. That is, at the core of the system lies a set of reusable arithmetic circuits that implement voter authentication, encrypted ballot validation, state transitions, and tally finalization. These circuits are optimized for off-chain proving and are compatible with modern ZK-SNARK systems. Application-layer state is maintained off-chain and committed on-chain using cryptographic accumulators, specifically Merkle trees. The protocol defines two such trees: one for the voter registry (the census) and one for the voting state. These trees enable voters and verifiers to produce efficient inclusion and transition proofs, while minimizing on-chain storage and computation. + +To coordinate protocol execution, \davinci includes a set of Ethereum smart contracts that mediate the setup of elections, manage finalization procedures, and verify submitted proofs of correctness. A standardized transaction and data encoding format supports all stages of the process, including vote casting, aggregation, and result publication. This approach ensures that protocol interactions remain deterministic and interoperable across clients and backends. Overall, the design aims to balance auditability and privacy while reducing trust assumptions on infrastructure providers. By cleanly separating concerns and providing modular interfaces, the protocol is intended to serve as a foundation for both practical deployments and future extensions, such as integration with alternative identity systems, off-chain data availability layers, or other consensus backends. \begin{itemize} \item The Vocdoni voting protocol.

@@ -35,4 +41,6 @@ \item Section~\ref{sec:ballot-protocol}: a proposed protocol for ballots. The rules of this protocol are implemented in the process management smart contracts.

\item Section~\ref{sec:token}: the Vocdoni token. \item Section~\ref{sec:analysis}: analysis of the proposed protocols. It includes a security discussion of the properties of the protocol, implementation details, and a performance evaluation. \item Section~\ref{sec:conclusions}: we finish with some last remarks. -\end{itemize}+\end{itemize} + +\martai{Mention that the spec can be tailored to the needs of the specific vote. So, here we present some default configuration, but some of the pieces can be changed (specially the cryptographic schemes or curves). For this reason, we tried to make this document modular (like the code), to facilitate the changes and the analysis of the consequences.}
M v2/sections/vocdoni-protocol.tex → v2/sections/vocdoni-protocol.tex

@@ -1,6 +1,6 @@

% !TeX root = ../build/main.tex -\martai{Is the process called voting? Election, poll?} +This section outlines the \davinci voting protocol. We introduce the parties involved in the process in Section~\ref{sec:vocdoni-protocol:parties}. In Section~\ref{sec:vocdoni-protocol:merkle-trees}, we describe the census and state Merkle trees, and in Section~\ref{sec:vocdoni-protocol:smart-contracts} the Ethereum smart contracts. In Section~\ref{sec:vocdoni-protocol:circuits}, we present the zero-knowledge circuits used to enforce vote validity, authentication, aggregation, and state transitions. Finally, in Section~\ref{sec:vocdoni-protocol:flow}, we detail the full protocol flow step by step, from the voting setup to the results validation and process finalization. \subsection{Parties involved} \label{sec:vocdoni-protocol:parties}

@@ -13,18 +13,36 @@ \paragraph{Sequencer.} Sequencers are a set of decentralized parties that facilitate the voting process. On the one hand, they collaboratively generate a public encryption key that voters use to encrypt their votes. Then, during the voting phase, they receive and verify encrypted votes from voters and reencrypt votes to prevent coercion.

\paragraph{Voter.} Voters are the participants that belong the census that cast their votes in the election. -\subsection{Components} -\label{sec:vocdoni-protocol:components} +\subsection{Merkle trees} +\label{sec:vocdoni-protocol:merkle-trees} -\subsubsection{Merkle trees} +Merkle trees are used to create a cryptographic representation of both the voter registry (census) and the voting process state. -\textit{Old text: Merkle trees are employed to create a cryptographic representation of both the voter registry (census) and the voting process state: - \begin{itemize} - \item \textbf{Census}: Each voter is assigned a Merkle proof, which they use to prove their eligibility to vote. This mechanism ensures efficient and secure verification of voter eligibility. - \item \textbf{State}: The voting process state is represented as a Merkle tree, with new votes being added to the tree. The root of this Merkle tree is stored on Ethereum, allowing multiple sequencers to participate in the voting phase and ensuring consistency. -\end{itemize}} +%\begin{itemize} +% \item \textbf{Census}: Each voter is assigned a Merkle proof, which they use to prove their eligibility to vote. This mechanism ensures efficient and secure verification of voter eligibility. +% \item \textbf{State}: The voting process state is represented as a Merkle tree, with new votes being added to the tree. The root of this Merkle tree is stored on Ethereum, allowing multiple sequencers to participate in the voting phase and ensuring consistency. +%\end{itemize}} -\paragraph{Census Merkle tree.} Explain what it is. \\ +\subsubsection{Census Merkle tree} + +The census represents the list of eligible voters and their associated voting weights. It is implemented as a binary Merkle tree using an iden3 Sparse Merkle Tree (SMT) structure with a zkSNARK-friendly hashing function to ensure compatibility with zero-knowledge circuits. Each leaf in the tree corresponds to a unique voter address (e.g., Ethereum address), and stores the associated voting weight. This construction enables efficient Merkle proofs that allow voters to prove their eligibility and weight without revealing the full census dataset. + +The organizer is responsible for generating the census and computing its Merkle root, which is then committed on-chain. To minimize on-chain storage, the full census is distributed off-chain—e.g., via IPFS or a trusted HTTPS endpoint—allowing verifiers and sequencers to independently access the dataset and reconstruct Merkle proofs as needed. + +The protocol does not prescribe a specific method for constructing the census, but supports multiple approaches to accommodate various use cases: + +Private datasets. Organizations with internal lists of eligible voters (e.g., membership databases or CSV files) can directly convert them into the Merkle format. This allows voter registries to remain confidential, with only the root hash made public. + +Self-Sovereign Identity (SSI). Voter eligibility can also be derived from SSI systems, where users control their identities. The organizer collects and aggregates this data into the census tree, enabling participation without centralized identity management. + +Ethereum-based tokens. Token holdings—such as ERC-20 or NFT balances—can define voter eligibility using either of two approaches: + +Optimistic: A snapshot of token holders at a specific Ethereum block is used to build the census off-chain. The root is submitted to the smart contract, and a dispute period allows for fraud proofs (e.g., using Ethereum storage proofs) to challenge incorrect entries. + +Zero-knowledge: A zkSNARK circuit verifies that the census has been constructed correctly with respect to the on-chain token balances at a given block. The proof ensures balance correctness and total supply consistency. + +This flexible design allows the system to support a wide range of identity and eligibility models while maintaining transparency, verifiability, and scalability. + \martai{There is a whole section about the Census Merkle tree in the whitepaper -- CHECK!!}

@@ -32,7 +50,7 @@ \martai{It could actually be another type of data structure. We only need to be able to get a commitment and a membership proof that can be proven in-circuit. Mention it in some way.}

\martai{One way to think about it: (weight, pk).} -\paragraph{State Merkle tree.} Explain what it is and the structure. Below, the original text:\\ +\subsubsection{State Merkle tree} Explain what it is and the structure. Below, the original text:\\ \martai{Essentially, the first "addresses" or "leaves" are reserved to those items (like processId, censusRoot, etc.), and then the voters' addresses and nullifiers are used as paths to the leave where the encrypted ballot/commitment is stored.}

@@ -64,7 +82,21 @@

\textbf{The Initial State}: The voting process begins with an initial state where the Merkle Tree Root is established and published on the Process Management smart contract. Predefined parameters are included, but the results are initialized to zero, and no nullifiers are present. The Process Organizer transaction, contains the initial root and the necessary Merkle proofs. These proofs verify that the initial parameters are correct according to the voting process information and that no additional information is stored. Since the `ProcessId` of the initial state is a unique identifier, there won't be duplicate roots for different processes. -\subsubsection{Smart contracts} +\subsection{Smart contracts} +\label{sec:vocdoni-protocol:smart-contracts} + +Old text: + \begin{enumerate} + \item \textbf{Ethereum}. An Ethereum compatible network is used as the source of truth for the voting system. By leveraging an EVM blockchain, the process management ensures that all transitions are immutable and verifiable by all participants. To this end, we implement several smart contracts. + \begin{itemize} + \item \textbf{Process management}: Responsible for the lifecycle management of voting processes. It includes the initiation, monitoring, execution, and closure of voting events. + \item \textbf{Results verification}: For each voting process, this smart contract maintains the integrity of the cast votes and process lifecycle. It verifies that each state transition committed by a ZK sequencer adheres to the predefined rules. + \item \textbf{Sequencer registry}: This smart contract keeps track of the existing available sequencers, stores the collateral to ensure good behavior, and it's used to coordinate the distributed key generation when a new Process is created. + \end{itemize} + \item \textbf{Sequencer}. The Sequencer is a specialized component designed to handle the voting process using zero-knowledge proof mechanisms. It ensures that all transactions related to this process are validated and sequenced. The Sequencers periodically commit the state of the voting process to Ethereum. + \item \textbf{Frontend user interface}. The user interface serves as the primary interaction layer for voters and organizers. It provides tools and functionalities needed by organizers to set up, manage, and oversee elections. This interface simplifies the complexities involved in managing a decentralized vote. + \item \textbf{Data availability}. For each voting process, the system needs to keep track of the current State Merkle Tree, which contains all information of such processes. A public data availability layer, ensures that all state transitions are available and verifiable and allows the participation of multiple sequencers within the same voting process. + \end{enumerate} \paragraph{Process management.} This smart contract is responsible for the life-cycle management of voting processes. It includes the initiation, monitoring, execution, and closure of voting events.