docs(spec): align the overview with the qualified security claims
@@ -48,7 +48,7 @@ % ---- 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. Using recent advancements in \ac{ZK} proof systems and blockchain technology, \davinci operates as a specialized \ac{ZK} rollup that inherits network security from its settlement layer, either the Ethereum mainnet or an Ethereum rollup built on the OP Stack. Voters prove that their encrypted ballots are well-formed with a \ac{ZK-SNARK}, and sequencers prove each batch of ballots inside a \ac{zkVM}: a single succinct proof attests to the verification of every ballot proof, signature, and census proof in the batch, to the re-encryption of the ballots, and to the resulting update of the election state and of the encrypted tally. The system relies on cryptographic proofs to ensure integrity and security, eliminating the need for centralized authorities. By integrating \acsp{ZK-SNARK}, a \ac{zkVM}, and threshold homomorphic encryption, \davinci enables individual and universal verifiability, ballot privacy, and trustlessness in election processes. The protocol distributes the election key among a set of key wardens through distributed key generation, coordinates the process through a single registry smart contract, and publishes in Ethereum data blobs enough data for anyone to rebuild the election state. Voters may revote, and the silent re-randomization of stored ballots obscures revotes from outside observers, which mitigates vote buying and coercion without a trusted tally server. With a focus on accessibility, scalability, coercion mitigation, and automation, \davinci aims to facilitate high-frequency and low-cost voting, fostering mass adoption of voting and simplifying civil participation. + \Davinci is the evolution of the Vocdoni voting protocol, designed to empower civil society by providing essential tools for secure, verifiable, and ballot-private digital voting. Using recent advancements in \ac{ZK} proof systems and blockchain technology, \davinci operates as a specialized \ac{ZK} rollup that inherits network security from its settlement layer, either the Ethereum mainnet or an Ethereum rollup built on the OP Stack. Voters prove that their encrypted ballots are well-formed with a \ac{ZK-SNARK}, and sequencers prove each batch of ballots inside a \ac{zkVM}: a single succinct proof attests to the verification of every ballot proof, signature, and census proof in the batch, to the re-encryption of the ballots, and to the resulting update of the election state and of the encrypted tally. The system relies on cryptographic proofs to ensure integrity and security, reducing the trust placed in the operators that process ballots and tally the results. By integrating \acsp{ZK-SNARK}, a \ac{zkVM}, and threshold homomorphic encryption, \davinci enables individual and universal verifiability, ballot privacy, and reduced trust in election processes. The protocol distributes the election key among a set of key wardens through distributed key generation, coordinates the process through a single registry smart contract, and publishes in Ethereum data blobs enough data for anyone to rebuild the election state. Voters may revote, and the silent re-randomization of stored ballots obscures revotes from outside observers, which mitigates vote buying and coercion without a trusted tally server. With a focus on accessibility, scalability, coercion mitigation, and automation, \davinci aims to facilitate high-frequency and low-cost voting, fostering mass adoption of voting and simplifying civil participation. % Finally, the design of \davinci is grounded in practicality: all components are implemented using current technologies, deployed in production, and evaluated on production-grade hardware. In sum, the proposed architecture is not merely theoretical, but a working system. The source code has been made open source, allowing practitioners and researchers to further investigate its details and potential for future uses.
@@ -5,7 +5,7 @@ \label{sec:analysis:security}
Based on the above principles, the protocol provides a number of concrete security properties that ensure the integrity, confidentiality, and verifiability of voting events. In what follows we discuss how \davinci achieves these properties, with particular emphasis on integrity, ballot secrecy, and the obfuscation of revotes, before turning to data availability, liveness, verifiability, and robustness against quantum threats. The discussion is informal: it states what each mechanism enforces and under which assumptions, but it does not prove the properties in a formal model, such as a receipt-freeness or coercion-resistance game. Table~\ref{tab:trust} summarizes the assumptions that each property relies on. -\paragraph{Integrity and soundness.} The integrity of the election rests on the soundness of the proofs rather than on trust in any operator: the knowledge soundness of Groth16 for ballot proofs, and the soundness of the ZisK \acp{STARK} and of the PlonK wrapper for the batch and results programs. No party (including a malicious sequencer) can advance the state from $S_i$ to $S_{i+1}$ without supplying a valid batch proof, since the registry rejects any update not accompanied by such a proof. Because a \ac{zkVM} proves the execution of a program, the statement that is proven is exactly what the program checks, and the registry pins the program through its verification key: an update proven by any other program, under any other setup, or with a failed verdict ($\okflag \ne 1$) is rejected. The registry also binds every proof to the election: the old root must be the latest root, the census root must be one the election accepts, the count of occupied slots must match, and the blob openings must match the published blobs. Consequently, every counted ballot carries a valid membership proof in a census the election accepts, and every accumulator update follows the protocol rules. Double voting is prevented \emph{without} nullifiers: each voter is bound to a slot in the state tree, so a second submission by the same voter overwrites their previous ballot at that slot rather than adding a new contribution to the tally. This one-slot-per-voter semantics relies on invariants of the census that the batch program checks only within a batch: in a Merkle census, no two members may share a slot; in a \ac{CSP} census, the \ac{CSP} must assign one stable index to each voter and distinct indexes to distinct voters (see Section~\ref{sec:vocdoni-protocol:census}). Integrity is therefore relative to the configured census and to these invariants; whether the census itself lists the right people and weights is outside the protocol. Vote identifiers, by contrast, are derived per ballot and therefore differ across submissions, which is precisely what enables individual verifiability without linking a voter to their ciphertext. The guest programs are built reproducibly, so anyone can recompile the published source, recompute the program keys, and compare them with the keys pinned by the registry. +\paragraph{Integrity and soundness.} The integrity of the election rests on the soundness of the proofs rather than on trust in any operator: the knowledge soundness of Groth16 for ballot proofs, and the soundness of the ZisK \acp{STARK} and of the PlonK wrapper for the batch and results programs. No party (including a malicious sequencer) can advance the state from $S_i$ to $S_{i+1}$ without supplying a valid batch proof, since the registry rejects any update not accompanied by such a proof. Because a \ac{zkVM} proves the execution of a program, the statement that is proven is exactly what the program checks, and the registry pins the program through its verification key: an update proven by any other program, under any other setup, or with a failed verdict ($\okflag \ne 1$) is rejected. The registry also binds every proof to the election: the old root must be the latest root, the census root must be one the election accepts, the count of occupied slots must match, and the blob openings must match the published blobs. Consequently, every counted ballot carries a valid membership proof in a census the election accepts, and every accumulator update follows the protocol rules. Double voting is prevented \emph{without} nullifiers: each voter is bound to a slot in the state tree, so a second submission by the same voter overwrites their previous ballot at that slot rather than adding a new contribution to the tally. This one-slot-per-voter semantics relies on invariants of the census that the batch program checks only within a batch: in a Merkle census, no two members may share a slot; in a \ac{CSP} census, the \ac{CSP} must assign one stable index to each voter and distinct indexes to distinct voters (see Section~\ref{sec:vocdoni-protocol:census}). Integrity is therefore relative to the configured census and to these invariants; whether the census itself lists the right people and weights is outside the protocol. Vote identifiers, by contrast, are freshly derived for every ballot, subject to collision rejection and resampling (Section~\ref{sec:vocdoni-protocol:state-tree}), which enables individual verifiability without revealing the slot of the voter. The guest programs are built reproducibly, so anyone can recompile the published source, recompute the program keys, and compare them with the keys pinned by the registry. \paragraph{Obfuscation of revotes.} \Davinci aims to prevent voters from proving to others how they voted, which mitigates coercion and vote-buying, by combining re-encryption, ballot overwrites, and randomized state updates. \begin{itemize}@@ -16,7 +16,7 @@ \item \textit{Concealing overwrites (silent revoting)}: to make overwrites hard to distinguish from routine re-randomizations, every batch also re-encrypts a sample of the occupied slots it does not write. The batch program enforces the size of the sample, at least $\min(\mathsf{target}(n, w), o - w)$ slots, with $\mathsf{target}(n, w) = \min(2048, \max(16, 2w, n))$ and $o$ the number of occupied slots, and the blobs list every updated slot in a single sorted list, so the published data does not mark which updates are overwrites. Sequencers keep a history of the batches that carried each vote, so that a vote sealed again after a lost race or a failed settlement refreshes every slot of its earlier batches that the sequencer has observed.
\end{itemize} These mechanisms obscure revotes from observers of the public data, but the protection is conditional and partial. First, the batch program checks the size and the validity of the refresh sample, not that it was drawn uniformly or that the seed is unpredictable: the sealing sequencer and its prover, who also learn which updates are overwrites, must draw both from fresh randomness and keep them secret, and a voter who fears coercion should revote through a sequencer they trust. Second, public data still reveals participation (the first write to a slot is distinguishable, since refreshes only touch occupied slots), the number of overwrites of each batch, the set of updated slots, and the timing of batches; when few slots are occupied, the sample is small, and in the extreme cases where every occupied slot is overwritten ($w = o$, for instance a single occupied slot that is overwritten), the published data reveals the revotes directly. Third, the coverage history only includes batches that the sequencer observed: a batch of another sequencer that a reorganization removed before its blobs were fetched cannot be covered. Finally, re-encryption scalars are 256-bit SHA-256 digests reduced modulo the 254-bit order $s$ of the BN254 scalar field, which leaves them at statistical distance about $2^{-4.7}$ from uniform in $[0, s)$; after the implicit reduction modulo the subgroup order $t \approx s/8$, the scalars actually applied are at statistical distance about $2^{-7.6}$ from uniform. Removing this gap requires reducing a wider digest, and hence a new program key. We therefore claim that \davinci obscures revotes from outside observers under these conditions; we do not claim receipt-freeness or coercion resistance in a formal sense. -\paragraph{Privacy.} Ballots remain secret even though encrypted ballots are publicly stored and processed. Ballot secrecy is preserved through ElGamal encryption, which allows votes to be aggregated without decryption, and it is claimed only beyond what the published tally and metadata reveal: in a small electorate, or when tallies of overlapping elections are combined, the tally itself may reveal individual choices. When the encryption key is generated through a \ac{DKG} or a council ceremony, no single party holds the secret key, and the protocol only requests the threshold decryption of the final aggregate, never of individual ballots. Under the assumption that fewer than $\theta$ of the $\nu$ \keywardens are compromised over the whole lifetime of the key, no individual ballot ciphertext can be decrypted. A coalition of $\theta$ \keywardens, however, could decrypt every ballot published in the blobs, so the threshold must be chosen to reflect the trust placed in the committee; in the locked \ac{DKG} mode, the coalition would also need the organizer's secret. On-chain decryption gates, such as the organizer's reveal or the opening date of a council, constrain the contracts and honest members, not a colluding threshold. In the council mode, all the processes bound to a ceremony share its key and form a single privacy domain: their confidentiality additionally requires that every adapter the ceremony allows only requests the decryption of authenticated final accumulators, that ballots are encrypted with fresh randomness and proven valid, and that the setups of the council's proofs are sound~\cite{davinci-council}. Elections that need strict isolation should use separate ceremonies. In the sequencer mode, the sequencer that holds the key can decrypt every ballot, which is why this mode is reserved for elections that accept that trust. Note that, while the content of a ballot stays hidden, the protocol does reveal whether a given voter has cast a vote, that is, turnout is public, but the choice is not. With a Merkle census, the slot of a voter is a public function of their address, so the participation of each census member can be read from the state; a sequencer additionally learns the address and the submission time of every ballot it receives. In a \ac{CSP} census, the \ac{CSP} is trusted for eligibility: it can issue credentials to anyone, and it knows which index belongs to which voter. +\paragraph{Privacy.} Ballots remain secret even though encrypted ballots are publicly stored and processed. Ballot secrecy is preserved through ElGamal encryption, which allows votes to be aggregated without decryption, and it is claimed only beyond what the published tally and metadata reveal: in a small electorate, or when tallies of overlapping elections are combined, the tally itself may reveal individual choices. When the encryption key is generated through a \ac{DKG} or a council ceremony, no single party holds the secret key, and the protocol only requests the threshold decryption of the final aggregate, never of individual ballots. Under the assumption that fewer than $\theta$ of the $\nu$ \keywardens are compromised over the whole lifetime of the key, no individual ballot ciphertext can be decrypted. A coalition of $\theta$ \keywardens, however, could decrypt every ballot published in the blobs, so the threshold must be chosen to reflect the trust placed in the committee; in the locked \ac{DKG} mode, the coalition would also need the organizer's secret. A colluding threshold can bypass policy-only gates, such as the opening date of a council, which constrain the contracts and honest members; in the locked mode, it additionally needs the organizer's secret or the organizer's cooperation, on-chain or off-chain. In the council mode, all the processes bound to a ceremony share its key and form a single privacy domain: their confidentiality additionally requires that every adapter the ceremony allows only requests the decryption of authenticated final accumulators, that ballots are encrypted with fresh randomness and proven valid, and that the setups of the council's proofs are sound~\cite{davinci-council}. Elections that need strict isolation should use separate ceremonies. In the sequencer mode, the sequencer that holds the key can decrypt every ballot, which is why this mode is reserved for elections that accept that trust. Note that, while the content of a ballot stays hidden, the protocol does reveal whether a given voter has cast a vote, that is, turnout is public, but the choice is not. With a Merkle census, the slot of a voter is a public function of their address, so the participation of each census member can be read from the state; a sequencer additionally learns the address and the submission time of every ballot it receives. In a \ac{CSP} census, the \ac{CSP} is trusted for eligibility: it can issue credentials to anyone, and it knows which index belongs to which voter. \paragraph{Data availability.} Ballots and state updates are published in Ethereum blobs, and the registry checks, at settlement, that the published blobs open to the values the batch program derived from the verified state. A sequencer therefore cannot settle a transition whose data it withholds. In L1-blob mode, the guarantee is the same: the blobs live on Ethereum, and the registry on the rollup verifies their inclusion in the Ethereum chain from block headers anchored at the rollup's view of Ethereum, so it relies, in addition, on the rollup deriving its L1 origin correctly, an assumption the rollup itself already makes. Since blobs are pruned after about 18 days, long-term availability requires archival. The blob encoding allows any party holding a complete archive of an election's blobs to rebuild it, and every sequencer stores and serves the blobs of the transitions it has seen; the current node, however, does not yet bootstrap automatically from the archive of another node, so a node that starts after the blobs have been pruned needs its operator to provide an archival blob source. Since EIP-7594, only nodes that custody full blobs can serve them, so sequencers should rely on such nodes or on archivers.@@ -24,7 +24,7 @@ \paragraph{Liveness and censorship resistance.} Sequencing is permissionless, so a voter whose ballot is ignored by one sequencer can submit it to another, and anyone can run a sequencer for any election. This guarantees an alternative, not fair inclusion: settlement is a race in which the first valid transition wins, and a sequencer whose batches keep losing races to transitions that omit a ballot cannot force its inclusion. The grace window lets ballots received before the end of the voting period settle after it, and Eq.~\eqref{eq:grace-end} bounds how long transitions may keep settling; it does not guarantee that every admitted ballot settles. Inclusion requires enough proving and settlement capacity, fees, and timely transaction inclusion before the window closes; ballots still queued when it closes are discarded, and voters can detect this through the status of their vote identifiers. Once results are requested from the \keywardens, the process leaves the organizer's control and can no longer be canceled. Finalization depends on the key mode. In the \ac{DKG} and council modes, it requires that at least $\theta$ members of the committee holding the key take part; if more than $\nu - \theta$ of them become unavailable, the results are lost, since keys are not reshared to later committees. In the locked \ac{DKG} mode, it also requires the organizer to reveal its secret, and a council whose decryption is opened manually, without a fallback date, depends on its organizer to open it; in both cases, an absent organizer blocks the publication of the results indefinitely. In the sequencer mode, the results depend on the availability of the single key holder.
\paragraph{Quantum resistance.} Quantum computers threaten discrete-logarithm-based cryptography such as ECDSA and ElGamal, and pairing-based proof systems such as Groth16 and PlonK. The \acp{STARK} that prove the batch and results programs are hash-based arguments, made non-interactive with the Fiat--Shamir transform, and are plausibly post-quantum, but their PlonK wrapper, the ballot proofs, the voters' signatures, and the encryption of ballots are not. For this reason, \davinci is designed in a modular way that would allow migration to post-quantum primitives in the longer term. Candidate replacements include lattice-based signature schemes such as CRYSTALS-Dilithium (ML-DSA) and Falcon, and the hash-based SPHINCS+ (SLH-DSA); lattice-based homomorphic encryption such as BGV or BFV; and the direct on-chain verification of \acp{STARK}. -\paragraph{Verifiability.} Voters can check that their own submissions were recorded, while anyone can audit the entire process to verify the final tally. Every voter can check, with an inclusion proof of their vote identifier against a state root recorded on-chain, that their submission was included in an accepted transition (individual verifiability, in the sense of recorded-as-cast). Since vote identifiers are never removed, this receipt persists after an overwrite, and it does not show by itself that the submission is the ballot that is finally counted; a voter who cast several ballots relies on the order in which they were settled, which the sequencer that receives them preserves. Additionally, any third party can replay every state transition from the published blobs, check that it reproduces the roots recorded on-chain, and verify the proofs, which confirms that the tally is the sum of the final ballots of the slots (universal verifiability) and that each counted ballot comes with a valid membership proof (eligibility verifiability). The protocol does not provide, by itself, a mechanism for a voter to verify that their device encrypted the intended choice (cast-as-intended verifiability); this property can be added by the client application, for instance with a second device that audits a ballot before it is cast. End-to-end verifiability in the usual sense requires such a mechanism in addition to the properties above. +\paragraph{Verifiability.} Voters can check that their own submissions were recorded, while anyone can audit the entire process to verify the final tally. Every voter can check, with an inclusion proof of their vote identifier against a state root recorded on-chain, that their submission was included in an accepted transition (individual verifiability, in the sense of recorded-as-cast). Since vote identifiers are never removed, this receipt persists after an overwrite, and it does not show by itself that the submission is the ballot that is finally counted; a voter who cast several ballots relies on the ballot settled last prevailing, and on the receiving sequencer settling them in the order it received them, which the protocol does not prove. Additionally, any third party can replay every state transition from the published blobs, check that it reproduces the roots recorded on-chain, and verify the proofs, which confirms that the tally is the sum of the final ballots of the slots (universal verifiability) and that each counted ballot comes with a valid membership proof (eligibility verifiability). The protocol does not provide, by itself, a mechanism for a voter to verify that their device encrypted the intended choice (cast-as-intended verifiability); this property can be added by the client application, for instance with a second device that audits a ballot before it is cast. End-to-end verifiability in the usual sense requires such a mechanism in addition to the properties above. \begin{table}[h] \centering@@ -76,7 +76,7 @@ \bottomrule
\end{tabular} \end{table} -\paragraph{Normative documents.} This paper describes the protocol at the level needed to understand, analyze, and implement it, and refers to the documents of Table~\ref{tab:normative} for byte-level details such as input frames, serialization, and contract interfaces. Where this paper and one of these documents disagree, the document of the pinned release prevails. +\paragraph{Normative documents.} This paper describes the protocol at the level needed to understand, analyze, and implement it, and refers to the documents of Table~\ref{tab:normative} for byte-level details such as input frames, serialization, and contract interfaces. For byte encodings, interfaces, constants, and executable constraints, the documents of the pinned releases are normative; where they contain informal security commentary that differs from the qualifications of Section~\ref{sec:analysis:security}, this paper prevails. \begin{table}[h] \centering@@ -104,7 +104,7 @@ \label{sec:analysis:performance-evaluation}
We evaluate \davinci along four axes: voter-side proving, sequencer proving, on-chain verification, and data availability, together with the end-to-end throughput of the system. Unless stated otherwise, sequencer measurements use one NVIDIA RTX 5090 GPU (32~GB) on a host with an AMD Ryzen 9 9950X3D CPU. -\paragraph{Voter proving.} A ballot proof is generated from the published Groth16 artifacts of the ballot circuit, either in a browser with snarkjs or natively. With the Rust prover of the client library (arkworks), one 16-core CPU produced 8192 ballot proofs in 1326~s, running several proofs in parallel, that is, about six proofs per second and 0.16~s of machine time per proof. We have not measured the latency of browser proving for this version of the circuit; it requires downloading the 35.5~MiB proving key and the 6.5~MiB witness generator, which can be cached across ballots. +\paragraph{Voter proving.} A ballot proof is generated from the published Groth16 artifacts of the ballot circuit, either in a browser with snarkjs or natively. With the Rust prover of the client library (arkworks), one 16-core CPU produced 8192 ballot proofs in 1326~s, running several proofs in parallel, that is, about six proofs per second and 0.16~s of amortized wall time per proof at that concurrency. We have not measured the latency of browser proving for this version of the circuit; it requires downloading the 35.5~MiB proving key and the 6.5~MiB witness generator, which can be cached across ballots. \paragraph{Sequencer proving.} Table~\ref{tab:proving} and Fig.~\ref{fig:proving-time} report the time to prove one batch, including witness generation, the \ac{STARK} proof, its recursion, and the PlonK wrapper. The \emph{first} batch of an election has nothing to refresh; a \emph{steady} batch of $n$ new votes refreshes $n$ slots, the regime that determines throughput for fresh votes (a batch of overwrites refreshes up to twice as many slots as it writes, and a re-sealed batch more). A batch of two votes takes about $15.5$~s, mostly the fixed cost of recursion and of the PlonK wrapper, and each refresh adds 13--16~ms at $n_f = 2$ and 40--50~ms at $n_f = 16$, the upper values at the largest batches. Throughput peaks around 512 votes per batch at $n_f = 2$ and 256 at $n_f = 16$; beyond that, the batch size is bounded by the host memory of the prover (about 54~GB for a steady batch of 1024 votes), not by the GPU. The proof is 768 bytes, plus 512 bytes of public values, at every batch size. These figures were measured on ZisK~1.3.0-alpha, the predecessor of the release in Table~\ref{tab:pins}, with the same batch program logic~\cite{davinci-zkvm}.@@ -135,7 +135,7 @@ \caption{Proving time of a steady batch (votes plus as many refreshes) and the resulting proving throughput, on one RTX 5090.}
\label{fig:proving-time} \end{figure} -\paragraph{End-to-end throughput.} With two provers, each serving one sequencer that runs two elections of 2048 voters at $n_f = 2$ in batches of 512, the system proved and settled 8192 votes of four independent elections in $678.7$~s, a sustained throughput of $12.07$ votes per second ($724$ per minute), on a local chain with one-second blocks and without competing sequencers. Each prover was busy for the whole run, so aggregate throughput scales with the number of provers serving independent elections: one RTX 5090 settles about six votes per second at $n_f = 2$. The transitions of a single election are sequential, since each starts from the root left by the previous one, so more provers do not speed up one election beyond the rate at which its batches can be proven one after another. +\paragraph{End-to-end throughput.} With two provers, each serving one sequencer that runs two elections of 2048 voters at $n_f = 2$ in batches of 512, the system proved and settled 8192 votes of four independent elections in $678.7$~s, a sustained throughput of $12.07$ votes per second ($724$ per minute), on a local chain with one-second blocks and without competing sequencers. Each prover was busy for the whole run, so aggregate throughput scales with the number of provers serving independent elections: one RTX 5090 settles about six votes per second at $n_f = 2$. The current sequencer keeps at most one batch in flight per election, so these measurements show scaling across independent elections, not the acceleration of one election by additional provers; settlement within an election remains ordered by state root. \paragraph{On-chain verification.} Thanks to the succinctness of PlonK, verifying a batch proof costs an essentially constant amount of gas, independent of the number of ballots in the batch; the cost of a settlement grows with the number of blobs, by one point evaluation each, and, in L1-blob mode, with the number of Ethereum headers and transaction proofs it carries. In blob mode, measured with the same contracts on Gnosis Chain (a chain with native blob transactions, on which \davinci was deployed before OP Mainnet), a settlement with one blob costs 0.40--0.44M gas and one with two blobs 0.46--0.50M gas. On OP Mainnet in L1-blob mode, verifying the L1 proof with three Ethereum headers costs 430K--460K gas, and a whole settlement 800K--860K gas.
@@ -42,7 +42,7 @@ \item If $\uniquevalues = \true$, then $v_i \neq v_j$ for all $i\neq j$.
\item $\minvalue \leq v_i \leq \maxvalue$ for all $i\in\{1, \dots, n_f\}$. \item $\minvaluesum \leq \sum_{i=1}^{n_f} v_i^{\costexponent} \leq \mathsf{max}$, where $\mathsf{max} = \maxvaluesum$ if $\maxvaluesum > 0$, and $\mathsf{max} = \weight$ otherwise. \end{itemize} -The inactive fields $n_f < i \le 16$ are not constrained by the ballot circuit, but the batch program requires their ciphertexts to be the identity, so they always contribute zero to the tally. The circuit evaluates these rules over the BN254 scalar field, with values of at most 48 bits and with the cost sum and its bounds compared as 63-bit integers. The integer semantics above therefore hold for configurations in which $n_f \cdot \maxvalue^{\costexponent} < 2^{63}$, so that the cost sum cannot wrap around the field or exceed the comparator, and in which the effective upper bound is below $2^{63}$; organizers must choose the parameters accordingly, and a voter whose weight serves as the bound and is $2^{63}$ or more cannot produce a valid ballot. +The inactive fields $n_f < i \le 16$ are not constrained by the ballot circuit, but the batch program requires their ciphertexts to be the identity, so they always contribute zero to the tally. The circuit evaluates these rules over the BN254 scalar field, with values of at most 48 bits and with the cost sum and its bounds compared as 63-bit integers. The integer semantics above therefore hold for configurations in which $n_f \cdot \maxvalue^{\costexponent} < 2^{63}$, so that the cost sum cannot wrap around the field or exceed the comparator, and in which the effective upper bound is below $2^{63}$; these bounds define a sufficient parameter profile for the integer semantics, which organizers should respect; outside it, which ballots are accepted is determined by the field arithmetic of the circuit. \paragraph{General mechanism.} A ballot is valid if and only if all the above constraints are satisfied. Invalid ballots are rejected at the circuit level and do not contribute to the tally. Valid ballots are aggregated into a results array, where each entry is the sum of all votes cast for the corresponding field across all voters. Voter weights, defined in the census (see Section~\ref{sec:vocdoni-protocol:census}), enter the ballot rules as a budget: when \maxvaluesum is zero, a voter may distribute at most their weight across the fields, so the weight bounds each voter's contribution to the tally. Tallies are always field-wise sums: modes such as ranking aggregate ranks or scores, and counting rules that are not additive, such as instant-runoff elimination, are outside the ballot protocol. By default, all voters have the same weight. The ballot circuit enforces the bound with the weight committed in \ballotinputshash, and the batch program checks that this weight is the one certified by the census (see Sections~\ref{sec:vocdoni-protocol:circuits:ballot} and~\ref{sec:vocdoni-protocol:circuits:batch} for further details).
@@ -56,7 +56,7 @@ \caption{Ballot circuit. Public values are framed in green, secret private values in red, and private values bound by \ballotinputshash in orange.}
\label{fig:circuit-ballot} \end{figure} -\noi The ballot proof does not authenticate the voter: anyone who knows a voter's address could prove a ballot for it. Authentication is provided by a separate signature over the vote identifier, $\signature = \hlget{\SSign}_{\sk}(\voteid)$, produced with the voter's SECP256K1 key and verified by the batch program. The signature authenticates the vote identifier, and the ballot proof binds the ciphertext and the other inputs to it through \ballotinputshash; as long as $k$ is fresh for every ballot, distinct ballots of a voter have distinct identifiers. +\noi The ballot proof does not authenticate the voter: anyone who knows a voter's address could prove a ballot for it. Authentication is provided by a separate signature over the vote identifier, $\signature = \hlget{\SSign}_{\sk}(\voteid)$, produced with the voter's SECP256K1 key and verified by the batch program. The signature authenticates the vote identifier, and the ballot proof binds the ciphertext and the other inputs to it through \ballotinputshash; with a fresh $k$ for every ballot, distinct ballots of a voter get freshly derived identifiers, subject to the collision rejection of Section~\ref{sec:vocdoni-protocol:state-tree}. \subsubsection{Batch program} \label{sec:vocdoni-protocol:circuits:batch}
@@ -7,7 +7,7 @@ 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 \textit{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 on 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 based on a bespoke \ac{BFT} layer-1 blockchain, named Vochain. At the time, efficient zero-knowledge (ZK) proof systems were emerging, but not yet practical for most deployments. Vochain provided a performant and low-cost environment (achieving approximately 700 transactions per second) in which advanced cryptographic tools could be used without the constraints imposed by general-purpose blockchains based on the \ac{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 ZK proofs, zero-knowledge virtual machines, 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, zero-knowledge virtual machines, improved bulletin board constructions, and mechanisms intended to mitigate coercion under explicit assumptions, 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. An earlier design of \davinci enforced the protocol with a pipeline of four arithmetic circuits over three elliptic curves, recursively composed into one state-transition proof. This document specifies the current design, in which the sequencer-side circuits are replaced by programs written in an ordinary programming language and proven by a \ac{zkVM}. The statement proven for each batch of ballots is the same in spirit, but it is now expressed as one auditable program, checked by one universal verifier, and extended with guarantees that were impractical to express as circuits, such as the in-proof layout of the published data and the silent re-randomization of stored ballots.
@@ -107,7 +107,7 @@ \begin{align*} \vote = [&\processid, \address, \voteid, \encryptedballot, \ballotproof,\\ &\ballotinputshash, \signature, \weight, \censusproof] \end{align*}
to the chosen sequencer, where \censusproof is only present for a \ac{CSP} census. \item Follow the status of the vote through its identifier. Once the vote is settled, obtain from any sequencer an inclusion proof of the leaf \voteid under the state root, and check it against the root recorded in the \processregistry. \end{enumerate} -A voter may repeat these steps any number of times while the voting period is open; each new ballot, once settled, replaces the previous one in the voter's slot. All ballots of one voter should be sent to the same sequencer, which settles them in the order they were cast; across sequencers, the ballot settled last prevails.\\ +A voter may repeat these steps any number of times while the voting period is open; each new ballot, once settled, replaces the previous one in the voter's slot. The protocol enforces that the ballot settled last prevails. An honest sequencer settles the ballots of a slot in the order in which it received them, which is not necessarily the order in which the voter created them, and ballots sent to different sequencers have no common order; voters should therefore send their ballots to one sequencer, one after another.\\ \noi \textbf{(b) Vote admission.} Upon receiving a vote $\vote_i$, a sequencer runs every per-vote check of the batch program before accepting it, so that a single invalid vote cannot invalidate a batch: \begin{enumerate}
@@ -11,7 +11,7 @@ \end{figure}
\begin{enumerate} \item \textit{Election setup}. - In the first phase, the \emph{organizer} gathers all census data and generates a cryptographic commitment to this data. Additionally, the organizer defines the voting parameters, including the number of ballot fields, the rules a valid ballot must satisfy (e.g., single choice, approval, weighted or quadratic voting), the voting period, and the maximum number of voters. The organizer also chooses who will hold the election key, as described in the next phase. Once these details are set, the organizer submits a transaction to the process registry smart contract. This transaction publicly records the voting parameters and the census commitment, and derives from them the initial state of the election, ensuring transparency and preventing any subsequent alterations to the voting setup.\\ + In the first phase, the \emph{organizer} gathers all census data and generates a cryptographic commitment to this data. Additionally, the organizer defines the voting parameters, including the number of ballot fields, the rules a valid ballot must satisfy (e.g., single choice, approval, weighted or quadratic voting), the voting period, and the maximum number of voters. The organizer also chooses who will hold the election key, as described in the next phase. Once these details are set, the organizer submits a transaction to the process registry smart contract. This transaction publicly records the voting parameters and the census commitment, and derives from them the initial state of the election, ensuring transparency: the configuration of the election is committed, and the few parameters that may change later (such as the end time or a dynamic census) can only be changed by the organizer, under the rules of the registry.\\ % \item \textit{Encryption key generation.} A designated group of participants, referred to as \emph{\keywardens}, collaboratively generate a shared encryption public key, which voters will use to encrypt their votes. This key is established through a \ac{DKG} protocol, ensuring that no single party can control or reconstruct the corresponding private key independently. In \davinci, the \keywardens are either a committee of permissionless operators, which prepares encryption keys in advance and hands one to each new election, or a council of members invited by the organizer. For elections in which the organizer accepts a weaker trust model, a single sequencer can also provide the key. In every case, the encryption public key is recorded in the process registry when the election is created, and the voting period can start.\\@@ -27,7 +27,7 @@ To ensure privacy, votes are encrypted using the election's encryption public key. Additionally, voters compute a unique vote identifier that will allow them to verify that their submission has been included in the election state. Alongside the encrypted vote and the vote identifier, each voter must also provide the following data: a proof of valid voting, demonstrating that the vote complies with the election rules; a proof of eligibility, verifying that they are registered in the census; and a proof of identity ownership, in the form of a digital signature, confirming that they are the legitimate voter and are not impersonating someone else. To mitigate coercion and vote-buying, the protocol allows voters to overwrite their vote any number of times during the voting phase; only the last ballot counts. \\
% \item \label{sec:protocol-intuition:vote-batching} \textit{Vote batching}. During this phase, sequencers collect encrypted votes from multiple voters along with their corresponding proofs, and verify the validity of these submissions. That is, sequencers - verify the signatures, to ensure the votes were cast by legitimate voters; they verify the proof of compliance, confirming that each vote adheres to the election voting rules; and they verify the census membership proofs against the commitment to the census data that was originally registered in the process registry. Valid votes are grouped into batches. For each batch, the sequencer re-encrypts the votes, so that voters can no longer decrypt or recognize their own ballots, and also re-encrypts a random sample of the ballots already stored in the state, so that an outside observer can hardly tell a voter who overwrote a ballot from one whose ballot was merely refreshed. While this process does not alter the final tally, it makes it harder for voters to prove their choice to third parties, which mitigates vote selling and coercion. The sequencer then updates the election state and the encrypted tally, and publishes the data of the batch in Ethereum data blobs. + verify the signatures, to ensure the votes were cast by legitimate voters; they verify the proof of compliance, confirming that each vote adheres to the election voting rules; and they verify the census membership proofs against the commitment to the census data that was originally registered in the process registry. Valid votes are grouped into batches. For each batch, the sequencer re-encrypts the votes, so that the stored ciphertexts no longer match the voters' original encryption randomness, and also re-encrypts a random sample of the ballots already stored in the state, so that an outside observer can hardly tell a voter who overwrote a ballot from one whose ballot was merely refreshed. While this process does not alter the final tally, it makes it harder for voters to prove their choice to third parties, which mitigates vote selling and coercion. The sequencer then updates the election state and the encrypted tally, and publishes the data of the batch in Ethereum data blobs. Instead of submitting individual verifications for each vote, the sequencer generates a single \ac{ZK} proof that attests to the correctness of the whole batch: every verification, every re-encryption, the state update, and the published data. Finally, the sequencer submits the proof and the new state root to the process registry, which verifies the proof and the blobs and accepts the new state. Settlement is permissionless: any sequencer may submit the next state transition, and the first valid one to land advances the election.\\ \end{enumerate}
@@ -55,7 +55,7 @@ where the first eight bytes of the digest $h$ are read as a big-endian integer. For a \ac{CSP} census, the slot is $(\configmax + 1) + \idx$, where $\idx$ is the index signed by the \ac{CSP}. In both cases, the result lies in the ballot namespace. The value stored at a slot is the SHA-256 digest of the voter's latest encrypted ballot, after re-encryption by the sequencer; the ciphertexts themselves are published in the data blobs (see Section~\ref{sec:vocdoni-protocol:circuits:batch}).
This construction assigns each eligible voter a unique, reserved leaf in the state tree. Because the address is authenticated by the voter's signature and bound to the census proof (or the index is authenticated by the \ac{CSP}'s signature), a voter can only write to their own slot. Deriving the slot from the address rather than from the voter's position in the census also keeps slots stable when the census grows, and avoids relying on the position of a leaf in a lean \ac{IMT}, which a membership proof does not pin (see Section~\ref{sec:background:mt}). This enables efficient \emph{last-vote-wins} semantics: if a voter overwrites their ballot, the new ciphertext replaces the previous one at the same slot, while the tally is updated by subtracting the old contribution and adding the new one. The uniqueness of slots among the members of a census is discussed in Section~\ref{sec:vocdoni-protocol:census}. -Besides the slots written by votes, every state transition also rewrites a random sample of already occupied slots with fresh re-encryptions of the ballots they hold (see Section~\ref{sec:vocdoni-protocol:circuits:batch}). As a consequence, a change in the value of a slot does not by itself reveal whether its voter cast a new ballot. Only the first write to a slot, which turns an empty leaf into an occupied one, is distinguishable, and it reveals that the voter participated, not how. +Besides the slots written by votes, every state transition also rewrites a random sample of already occupied slots with fresh re-encryptions of the ballots they hold (see Section~\ref{sec:vocdoni-protocol:circuits:batch}). As a consequence, a change in the value of a slot does not by itself reveal whether its voter cast a new ballot. A first write, which turns an empty leaf into an occupied one, reveals that the voter participated, not how. Subsequent changes may hide an overwrite among refreshes, subject to the limitations discussed in Section~\ref{sec:analysis:security}. \paragraph{Vote identifier namespace.}