% !TeX root = ../build/main.tex At the core of \davinci lie a set of arithmetic circuits that enforce the correctness of every step of the election. Each circuit corresponds to a distinct task and, taken together, they guarantee that all protocol rules are satisfied without revealing any private information. Specifically, the \emph{ballot circuit} (Section~\ref{sec:vocdoni-protocol:circuits:ballot}) ensures that encrypted votes are valid and well-formed, the \emph{verifier circuit} (Section~\ref{sec:vocdoni-protocol:circuits:verifier}) verifies the voter's proof; the \emph{aggregation circuit} (Section~\ref{sec:vocdoni-protocol:circuits:aggregation}) combines multiple authenticated votes into a single proof; the \emph{state transition circuit} (Section~\ref{sec:vocdoni-protocol:circuits:state-transition}) updates the global state root and produces the \ac{ZK-SNARK} proof that is verified on-chain; and the \textit{results circuit} (Section~\ref{sec:vocdoni-protocol:circuits:results}) proves that the election results were computed correctly. The flow of these circuits and their interactions is shown in Fig.~\ref{fig:circuits-flow}. \begin{figure}[h] \centerline{\includegraphics[width=\linewidth,draft=false]{\figs/circuits-flow.pdf}} \caption{ Flow of the voter and sequencers circuits.} \label{fig:circuits-flow} \end{figure} \begin{remark} For clarity, the circuits are described in this section with their full set of public inputs explicitly listed. In the actual implementation, however, we apply an optimization: rather than exposing all public inputs $\publicinputs$ individually, we compute a single commitment $h = \hlget{\Poseidon}(\publicinputs)$ and use $h$ as the only public input. The proof verifier then checks that $\hlget{\Poseidon}(\publicinputs) = h$, ensuring that the original public inputs are consistent while reducing both proof size and verification cost. Note that this optimization does not alter the semantics of the circuits but significantly reduces verifier complexity and on-chain verification costs. Other implementation aspects such as the exact number of constraints and the proving frameworks used are deferred to Section~\ref{sec:analysis:implementation}. \end{remark} % Old text: By structuring the process this way, we ensure that voting can be performed from any device-including smartphones and web browsers-while keeping the sequencer's computational requirements within the capabilities of accessible, CPU-based machines with 64 GiB of memory. \subsubsection{Ballot circuit} \label{sec:vocdoni-protocol:circuits:ballot} The ballot circuit (\hlset{\ballotcircuit}), illustrated in Fig.~\ref{fig:circuit-ballot}, is generated locally by the voter at the time of casting a ballot. Its purpose is twofold: first, to prove that the encrypted ballot is valid and complies with the protocol rules defined by the organizer; and second, to prove that the vote identifier (\voteid) has been correctly derived. The correctness of this circuit is attested by a \ac{ZK} proof generated using the \ac{ZK-SNARK} protocol described in Appendix~\ref{sec:cryptographic-primitives:zkp}, instantiated over the BN254 curve. We call the resulting proof \textit{ballot proof} and denote it as $\hlset{\ballotproof}$. We detail below the inputs and constraints of the ballot circuit. %\begin{spacing}{1.25} \vspace{0.3cm} \noi \textbf{Public inputs} \begin{itemize} \item $\public$ $\processid$: election identifier. \item $\public$ $\ballotmode$: ballot protocol configuration. \item $\public$ $\epk$: encryption public key. \item $\public$ $\address$: voter's address. \item $\public$ $\weight$: voter's weight. \item $\public$ $\encryptedballot$: encrypted ballot. \item $\public$ $\voteid$: vote's unique identifier. \end{itemize} \textbf{Private inputs} \begin{itemize} \item \private $\ballot$: voter's voting choice. \item \private $k$: random scalar. \end{itemize} \textbf{Constraints} \begin{itemize} \item \emph{Vote encryption}. Correct encryption of the ballot: \[\encryptedballot = \hlget{\Enc}_{\epk}(\ballot; k).\] \item \emph{Protocol rules compliance}. The voter's ballot meets the protocol rules (see Section~\ref{sec:ballot-protocol}): \[\text{protocolRulesCompliance}(\ballotmode, \weight, \ballot) = \true.\] \item \emph{Vote identifier}. The vote's identifier is correctly computed (by default, $N= 2^{63}$, see Section~\ref{sec:vocdoni-protocol:state-tree}): % \[\voteid = \text{Hash} (\processid \conc \address \conc k).\] \[\voteid = N + \bigl(\hlget{\Poseidon}(\processid,\address,k) \bmod N\bigr).\] \end{itemize} \vspace{-0.3cm} %\end{spacing} \begin{figure}[H] \centerline{\includegraphics[width=380pt,draft=false]{\figs/circuit1.pdf}} \caption{Ballot circuit. All public values are framed in green.} \label{fig:circuit-ballot} \end{figure} \subsubsection{Verifier circuit} \label{sec:vocdoni-protocol:circuits:verifier} The verifier circuit (\hlset{\verifiercircuit}), illustrated in Fig.~\ref{fig:circuit-verifier}, is generated by the sequencer when processing a vote. This circuit verifies the ballot's proof generated by the voter and the correctness of their digital signature. The correctness of this circuit is attested by a ZK proof generated using the ZK-SNARK protocol described in Section~\ref{sec:cryptographic-primitives:zkp}, instantiated over the BLS12-377 curve. We call the resulting proof the \textit{authentication proof} and denote it as $\hlset{\authenticationproof}$. We detail below the inputs and constraints of this circuit. %\begin{spacing}{1.25} \vspace{0.3cm} \noi \textbf{Public inputs} \begin{itemize} \item \public $\processid$: election identifier. \item \public $\ballotmode$: ballot protocol configuration. \item \public $\epk$: encryption public key. \item \public $\encryptedballot$: encrypted ballot. \item \public $\voteid$: vote's unique identifier. \item \public $\address$: voter's address. \item \public $\weight$: voter's weight. \end{itemize} % \pagebreak \textbf{Private inputs} \begin{itemize} \item \private $\pk$: voter's public key. \item \private $\signature$: voter's signature. \item \private $\ballotproof$: voter's ballot proof. \end{itemize} \textbf{Constraints} \begin{itemize} \item \emph{Authentication + non-malleability.} The voter submitted and signed their vote. \begin{itemize} \renewcommand{\labelitemii}{$\circ$} \item The signature of the vote's identifier is valid for the given public key: $$ \hlget{\SVer}_{\pk}(\voteid, \signature) = \true. $$ \item The address is correctly derived from the user's public key: $$\address = \hlget{\Keccak}(\pk).$$ \end{itemize} \item \emph{Voter's proof verification.} The voter's submitted proof is valid for the inputs provided. \begin{itemize} \renewcommand{\labelitemii}{$\circ$} \item Set public inputs: \begin{align*} \publicinputs = (\processid, \ballotmode, \epk, \encryptedballot, \voteid, \weight, \address). \end{align*} \item Verify proof: $$\hlget{\PVerify}(\ballotproof, \publicinputs) = \true.$$ \end{itemize} \end{itemize} \vspace{-0.3cm} %\end{spacing} \begin{figure}[H] \centerline{\includegraphics[width=450pt,draft=false]{\figs/circuit2.pdf}} \caption{Authentication circuit. All public values are framed in green.} \label{fig:circuit-verifier} \end{figure} \subsubsection{Aggregation circuit} \label{sec:vocdoni-protocol:circuits:aggregation} The aggregation circuit (\hlset{\aggregationcircuit}), illustrated in Fig.~\ref{fig:circuit-aggregate}, is generated by the sequencer to combine multiple authenticated votes into a single proof. Its purpose is to reduce verification overhead by recursively aggregating individual authentication proofs, while ensuring that all aggregated votes belong to the same election. The batch size ($\batchsize$), i.e., the maximum number of proofs aggregated in a single execution, is a fixed parameter (currently set to 60). If fewer proofs are available, the sequencer pads the batch with dummy proofs so that the circuit always operates on a fixed-size input. The correctness of this circuit is attested by a ZK proof generated using the \ac{ZK-SNARK} protocol described in Appendix~\ref{sec:cryptographic-primitives:zkp}, instantiated over the BW6-761 curve. We call the resulting proof the \textit{aggregation proof} and denote it as $\hlset{\aggregationproof}$. We detail below the inputs and constraints of the aggregation circuit. %\begin{spacing}{1.25} \vspace{0.3cm} \noi \textbf{Public inputs} \begin{itemize} \item \public $\{\encryptedballot_i\}_{i=1}^{\batchsize}$: set of voters' encrypted ballots. \item \public $\{\voteid_i\}_{i=1}^{\batchsize}$: set of vote identifiers. \item \public $\{\address_i\}_{i=1}^{\batchsize}$: set of voters' addresses. \item \public $\processid$: election identifier. \item \public $\ballotmode$: ballot protocol configuration. \item \public $\epk$: encryption public key. \end{itemize} \textbf{Private inputs} \begin{itemize} \item \private $\{\authenticationproof_i\}_{i=1}^{\batchsize}$: set of authentication proofs. \end{itemize} \textbf{Constraints} \\ \vspace{-0.4cm} \begin{itemize} \item \emph{Votes aggregation.} The accumulated authentication proofs are valid. For every $i\in\{1,\dots,\batchsize\}$: \begin{itemize} \renewcommand{\labelitemii}{$\circ$} \item Set public inputs: \begin{align*} \publicinputs = (\encryptedballot_i, \voteid_i, \address_i, \weight_i, \processid, \ballotmode, \epk). \end{align*} \item Verify proof: $$\hlget{\PVerify}(\authenticationproof_i, \publicinputs) = \true.$$ \end{itemize} \item \emph{Shared public inputs.} All authentication proofs are verified using the same public inputs \processid, \ballotmode, and \epk. \end{itemize} \vspace{-0.3cm} %\end{spacing} \begin{figure}[h] \centerline{\includegraphics[width=400pt,draft=false]{\figs/circuit3.pdf}} \caption{Aggregation circuit. All public values are framed in green.} \label{fig:circuit-aggregate} \end{figure} \vspace{-0.5cm} \subsubsection{State transition circuit} \label{sec:vocdoni-protocol:circuits:state-transition} The state transition circuit (\hlset{\statetransitioncircuit}), illustrated in Fig.~\ref{fig:circuit-state-transition-v2}, is generated by the sequencer to update the global state of the election. Its purpose is to verify that a batch of aggregated votes has been correctly incorporated into the state Merkle tree, that overwrites and vote identifiers are handled consistently, that the accumulators of encrypted results are updated accordingly, that each included vote corresponds to an eligible voter included in the census, and that the state transition data used by the sequencer matches the data made available through Ethereum data blobs. The correctness of this circuit is attested by a \ac{ZK} proof generated using the \ac{ZK-SNARK} protocol described in Appendix~\ref{sec:cryptographic-primitives:zkp}, instantiated over the BN254 curve, which is supported by Ethereum’s native precompiles for proof verification. We call the resulting proof the \textit{state proof} and denote it as $\hlset{\stateproof}$. It is submitted on-chain and verified by the process management smart contract, ensuring that every accepted state transition complies with the protocol rules. To formalize the setting, let the sequencer collect a batch of $N$ votes ($N\leq60$), of which $n$ are new vote submissions and $m = N-n$ are overwrites of previously cast ballots. Without loss of generality, we assume that the batch is ordered such that the first $n$ votes correspond to new submissions, and the remaining $m$ votes correspond to overwrites. In the following, we describe the inputs and constraints of the state transition circuit in detail. %\begin{spacing}{1.25} \vspace{0.3cm} \noi \textbf{Public inputs} \begin{itemize} \item \public $\censusroot$: Merkle root of the census tree. \item \public $\stateroot^\old$: current Merkle root of the state tree. \item \public $\stateroot^\new$: new tree root after all state transitions are applied. \item \public $\numoverwrites^\old$: current number of overwrites. \item \public $\numoverwrites^\new$: number of overwrites after all state transitions are applied. \item \public $\numvotes^\old$: current number of votes. \item \public $\numvotes^\new$: total number of votes after all state transitions are applied. \item \public $C$: commitment to the data blob. \end{itemize} \textbf{Private inputs} \begin{itemize} \item \private $\processid$: election identifier. \item \private $\censusorigin$: census origin parameter. \item \private $\ballotmode$: ballot protocol configuration. \item \private $\epk$: encryption public key. \item \private $\encresults^\old$: current accumulator of votes (before transitions are applied). \\ % \item \private $\substractaccumulator^\old$: current accumulator of votes that have been overwritten (before transitions). \\ % \item \private $\{\aggregationproof_i\}_{i = 1}^{N}$: set of aggregation proofs. \item \private $\{\censuspf_i\}_{i = 1}^N$: census membership proofs. % \item \private $\{\voteid_i\}_{i = 1}^{N}$: set of vote's identifiers. \item \private $\{\encryptedballot_i\}_{i = 1}^{N}$: set of voters' encrypted ballots. \item \private $\{\encryptedballot_i^\old\}_{i = n+1}^{N}$: set of all old encrypted ballots that will be overwritten. \item \private $\{\address_i\}_{i = 1}^{N}$: list of voters' addresses. \item \private $\{\weight_i\}_{i = 1}^{N}$: list of voters' weights. \\ % \item \private $\merkleInclusionPf^{\processid}$: proof that $\processid$ is stored in leaf $\texttt{0x0}$ of the state tree. \item \private $\merkleInclusionPf^{\ballotmode}$: proof that $\ballotmode$ is stored in leaf $\texttt{0x2}$ of the state tree. \item \private $\merkleInclusionPf^{\epk}$: proof that $\epk$ is stored in leaf $\texttt{0x3}$ of the state tree. \item \private $\merkleInclusionPf^{\encresults}$: proof that $\encresults^\old$ is in leaf $\texttt{0x4}$ of the state tree. \item \private $\merkleInclusionPf^{\censusorigin}$: proof that $\censusorigin$ is stored in leaf $\texttt{0x6}$ of the tree.\\ % \item \private $\{\merkleNInclusionPf^{\encryptedballot}_i\}_{i = 1}^{n}$: proof that the leaf corresponding to a voter's $\address_i$ that submits a new vote is empty. \item \private $\{\merkleInclusionPf^{\encryptedballot}_i\}_{i = n+1}^{N}$: proof that the vote $\encryptedballot_i^\old$ is stored in the leaf corresponding to a voter's $\address$ that submits the vote overwrite $\encryptedballot_i$. \item \private $\{\merkleNInclusionPf^{\voteid}_i\}_{i= 1}^{N}$: non-membership proofs of vote identifiers.\\ % \item \private $k$: random scalar. \item \private $\openproof$: KZG opening proof. \end{itemize} \textbf{Constraints} \\ \vspace{-0.4cm} \begin{itemize} \item \emph{Aggregation verification.} The accumulated authentication proofs are valid. For every $i\in\{1,\dots,N\}$: \begin{itemize} \renewcommand{\labelitemii}{$\circ$} \item Set public inputs: \begin{align*} \publicinputs = (\weight_i, \address_i, \encryptedballot_i, \voteid_i, \ballotmode, \epk, \processid). \end{align*} \item Verify proof: $$\hlget{\PVerify}(\aggregationproof_i, \publicinputs) = \true.$$ \end{itemize} \item \emph{Census membership.} Each processed vote must correspond to an eligible voter, according to the census configuration specified by the parameter \texttt{censusOrigin}. \begin{itemize} \item If \texttt{censusOrigin} = CSP, then verify a signature issued by the CSP. Concretely, for all $i \in \{1,\dots,N\}$: \[ \hlget{\SVer}_{\censusroot}\big((\processid, \idx_i, \address_i, \weight_i), \censuspf_i\big) = \true, \] where \(\censusroot\) contains the CSP public key and \(\censuspf_i\) is the eligibility signature attesting that voter \(i\) belongs to the census with the given weight. \item Otherwise, if the census is represented by an \ac{IMT}, the circuit verifies a Merkle membership proof showing that the pair \((\address_i, \weight_i)\) is included in the committed census. For all $i \in \{1,\dots,N\}$: \[ \hlget{\censusTree}.\hlget{\MTVerify}\big((\address_i, \weight_i), \idx_i, \censuspf_i, \censusroot\big) = \true. \] \end{itemize} % \item \emph{Transition verification.} Verify that the initial state and the state transition updates are applied correctly. \begin{itemize} \renewcommand{\labelitemii}{$\circ$} \item Verify that the inputs $\processid$, $\ballotmode$, $\epk$, $\encresults^\old$, and $\censusorigin$ correspond to the content of the first state tree leaves. \begin{align*} &\hlget{\stateTree}.\hlget{\MTVerify}(\processid, \texttt{0x0}, \merkleInclusionPf^{\processid}, \stateroot^\old). \\ &\hlget{\stateTree}.\hlget{\MTVerify}(\ballotmode, \texttt{0x2}, \merkleInclusionPf^{\ballotmode}, \stateroot^\old). \\ &\hlget{\stateTree}.\hlget{\MTVerify}(\epk, \texttt{0x3}, \merkleInclusionPf^{\epk}, \stateroot^\old). \\ &\hlget{\stateTree}.\hlget{\MTVerify}(\encresults^\old, \texttt{0x4}, \merkleInclusionPf^{\encresults}, \stateroot^\old). \\ &\hlget{\stateTree}.\hlget{\MTVerify}(\censusorigin, \texttt{0x6}, \merkleInclusionPf^{\censusorigin}, \stateroot^\old). \end{align*} \item Verify that none of the $\voteid_i$ for all $i\in\{1,\dots,N\}$ are initially part of the tree: \[\hlget{\stateTree}.\hlget{\MTVerify}(\voteid_i, \merkleNInclusionPf^{\voteid}_i, \stateroot^\old).\] \item Ensure that new votes are not part of the tree yet. For $i = 1, \dots, n$: \[\hlget{\stateTree}.\hlget{\MTVerify}(\address_i, \merkleNInclusionPf^{\encryptedballot}_i, \stateroot^\old).\] \item Ensure that overwrites do correspond to votes that were already on the tree. For $i = 1, \dots, m$: \[\hlget{\stateTree}.\hlget{\MTVerify}(\encryptedballot_i^\old, \address_i, \merkleInclusionPf^{\encryptedballot}_i, \stateroot^\old).\] \item State transitions. \begin{itemize} \item For every new vote $i = 1, \dots, n$: \begin{enumerate} \item After every use, refresh reencryption randomness: $k = \hlget{\Poseidon}(k).$ \item Reencrypt the ballot: $\encryptedballot_i = \hlget{\ReEnc}_{\epk}(\encryptedballot_i, k).$ \item Add reencrypted ballot to the tree: $\hlget{\stateTree}.\hlget{\MTInsert}(\encryptedballot_i, \address_i)$. \item Add vote identifier to the tree: $\hlget{\stateTree}.\hlget{\MTInsert}(\voteid_i)$. \item Increase votes counter: $\numvotes = \numvotes + 1$. \item Aggregate the vote to the results accumulator: $\encresults = \encresults + \encryptedballot_i$. \end{enumerate} \item For every overwritten vote $i = n+1, \dots, N$: \begin{enumerate} \item After every use, refresh reencryption randomness: $k = \hlget{\Poseidon}(k).$ \item Reencrypt the ballot: $\encryptedballot_i = \hlget{\ReEnc}_{\epk}(\encryptedballot_i, k).$ \item Overwrite the encrypted ballot: $\hlget{\stateTree}.\hlget{\MTUpdate}(\encryptedballot_i, \address_i)$. \item Add vote identifier: $\hlget{\stateTree}.\hlget{\MTInsert}(\voteid_i)$. \item Increase votes counter: $\numvotes = \numvotes + 1$. \item Increase overwrites counter: $\numoverwrites = \numoverwrites + 1$. % \item Aggregate the vote to the results accumulator: $\encresults = \encresults + \encryptedballot_i$. \item Substract the old ballot from the results accumulator and aggregate the new one:\\ $\encresults = \encresults - \encryptedballot^\old_i + \encryptedballot_i$. \end{enumerate} \end{itemize} \item After all previous state transitions are done, recompute new tree root: \[\stateroot^\new = \hlget{\stateTree}.\hlget{\MTRoot}().\] \item Reencrypt a set of old leafs from the tree: first, very their Merkle tree inclusion proofs, then reencrypt them, and finally update each leaf's content. \end{itemize} \item \emph{Data blob}. \begin{itemize} \item From all leaves that changed after the state transitions in the $\hlget{\stateTree}$ tree, construct blob $B$. %(as described in Section~{\color{blue}X}) \item Derive polynomial $p(x)$ from $B$. \item Compute evaluation point \( z = \hlget{\Poseidon}(\processid, C, \openproof) \). \item Compute evaluation \(y = p(z)\). \item Verify \(\hlget{\CVerify}(z, y, C, \openproof) = \true.\)\\ \end{itemize} \end{itemize} \vspace{-0.3cm} %\end{spacing} \begin{remark} Splitting the sequencer computation into three circuits provides an important efficiency benefit. If the global $\stateroot$ changes while a sequencer is preparing a proof, only the last circuit must be re-run to reflect the updated state, avoiding the need to recompute all previous proofs. \end{remark} \begin{landscape} \centering {\setkeys{Gin}{draft=false}%shows image even in draft mode \includegraphics[width=\linewidth]{\figs/circuit4.pdf}} \captionof{figure}{State transition circuit. All public values are framed in green.} \label{fig:circuit-state-transition-v2} \end{landscape} \subsubsection{Results circuit} \label{sec:vocdoni-protocol:circuits:results} %The results circuit (\hlset{\resultscircuit}), illustrated in Fig.~\ref{fig:circuit-results}, is The results circuit (\hlset{\resultscircuit}) is generated at the end of the election, by the organizer or a sequencer, to prove that the published tally was correctly obtained from the encrypted results committed in the final state. Crucially, the circuit does not take the decryption key as input, nor does it decrypt inside the circuit: instead, for each ballot field it verifies a proof of correct decryption against the encryption public key that is committed in the state tree. The correctness of this circuit is attested by a \ac{ZK} proof generated using the \ac{ZK-SNARK} protocol described in Appendix~\ref{sec:cryptographic-primitives:zkp}, instantiated over the BN254 curve, so that it can be verified on-chain by the \hlget{\resultsverifier}\ contract using Ethereum's native precompiles. We call the resulting proof the \textit{results proof} and denote it as $\hlset{\resultsproof}$. We detail below the inputs and constraints of the results circuit. %\begin{spacing}{1.25} \vspace{0.3cm} \noi \textbf{Public inputs} \begin{itemize} \item \public $\stateroot$: final root of the state tree. \item \public $\{\text{results}_j\}_{j=1}^{n_f}$: decrypted tally, one entry per ballot field. \end{itemize} \textbf{Private inputs} \begin{itemize} \item \private $\encresults$: encrypted results accumulator stored in the state ($n_f$ ElGamal ciphertexts). \item \private $\epk$: encryption public key. \item \private $\merkleInclusionPf^{\encresults}$: proof that $\encresults$ is stored in leaf $\texttt{0x4}$ of the state tree. \item \private $\merkleInclusionPf^{\epk}$: proof that $\epk$ is stored in leaf $\texttt{0x3}$ of the state tree. \item \private $\{\pi^{\mathrm{dec}}_j\}_{j=1}^{n_f}$: per-field proofs of correct decryption. \end{itemize} \textbf{Constraints} \begin{itemize} \item \emph{State commitment}. The encrypted results and the encryption public key match the values committed in the final state: \[\stateTree.\hlget{\MTVerify}(\encresults, \texttt{0x4}, \merkleInclusionPf^{\encresults}, \stateroot),\] \[\stateTree.\hlget{\MTVerify}(\epk, \texttt{0x3}, \merkleInclusionPf^{\epk}, \stateroot).\] \item \emph{Correct decryption}. For every ballot field $j \in \{1, \dots, n_f\}$, the public result $\text{results}_j$ is the decryption of the encrypted accumulator $\encresults_j$ under $\epk$, as attested by $\pi^{\mathrm{dec}}_j$: \[\mathsf{DecVerify}_{\epk}\bigl(\encresults_j,\ \text{results}_j,\ \pi^{\mathrm{dec}}_j\bigr) = \true.\] \item \emph{Results range}. Each result lies in the valid plaintext range: \[0 \le \text{results}_j \le t - 1, \qquad j = 1, \dots, n_f,\] where $t$ is the order of the BabyJubjub prime-order subgroup (see Appendix~\ref{sec:cryptographic-primitives:elliptic-curves}) and $n_f$ denotes the number of ballot fields (see Section~\ref{sec:ballot-protocol}). \end{itemize} \vspace{-0.3cm} %\end{spacing} % The per-field decryption proofs $\pi^{\mathrm{dec}}_j$ are produced during the tally decryption phase, where the key wardens jointly decrypt the aggregated results and attest, through a discrete-log-equality proof, that the decryption was performed correctly under the threshold key. By checking these proofs against the public key committed at leaf $\texttt{0x3}$, the circuit guarantees that the released tally corresponds exactly to the encrypted results accumulated in the final state, without ever exposing the decryption key inside the circuit. %\begin{figure}[h] % \centerline{\includegraphics[width=400pt,draft=false]{\figs/circuit5.pdf}} % \caption{Aggregation circuit. All public values are framed in green. \color{red}Circuit is not correct.} % \label{fig:circuit-results} %\end{figure}