Skip to content

Commit 9100d36

Browse files
committed
Daniele's changes for background done
1 parent 22d2e02 commit 9100d36

File tree

1 file changed

+50
-49
lines changed

1 file changed

+50
-49
lines changed

report/src/sections/02-background.tex

Lines changed: 50 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
\section{Background}\label{sec:background}
2-
In this section, we provide the necessary background information on Ethereum and a specific attack it is vulnerable to, the Curdleproofs protocol~\cite{Curdleproofs}, and the Whisk protocol~\cite{Whisk2024}
2+
In this section, we provide the necessary background information on Ethereum and a specific attack it is vulnerable to, the Whisk protocol~\cite{Whisk2024}, and the Curdleproofs protocol~\cite{Curdleproofs} used in Whisk.
33

44
The notation used throughout this paper can be seen in~\autoref{tab:notation}.
55
\begin{table*}[!htb]
@@ -30,13 +30,13 @@ \section{Background}\label{sec:background}
3030
$\mathbf{a}\times \mathbf{b}=\sum_{i=1}^n a_i\cdot b_i$
3131
& Inner product of $\mathbf{a},\mathbf{b}\in\mathbb{F}^n$ \\
3232
\hline
33-
$\mathbf{G}=(g_1,\dots,g_n)\in\mathbb{G}^n,\mathbf{G'}=(g'_1,\dots,g'_n)\in\mathbb{G}^n$
33+
$\mathbf{g}=(g_1,\dots,g_n)\in\mathbb{G}^n,\mathbf{g'}=(g'_1,\dots,g'_n)\in\mathbb{G}^n$
3434
& Vectors of generators (for Pedersen commitments) \\
3535
\hline
3636
$A=a\times G=\sum_{i=1}^n a_i\cdot G_i$
3737
& Binding (but not hiding) commitment to $a\in\mathbb{Z}_p^n\in $ \\
3838
\hline
39-
$\mathbf{r}_A\in\mathbb{Z}^n$ & Blinding factors, e.g.\ $A=\mathbf{a}\times\mathbf{G} + \mathbf{r}_A \times \mathbf{G}$ is a Pedersen commitment to $\mathbf{a}$ \\
39+
$\mathbf{r}_A\in\mathbb{Z}^n$ & Blinding factors, e.g.\ $A=\mathbf{a}\times\mathbf{g} + \mathbf{r}_A \times \mathbf{g}$ is a Pedersen commitment to $\mathbf{a}$ \\
4040
\hline
4141
$\mathbf{a}\parallel \mathbf{b}\in\mathbb{Z}_p^{n+m}$
4242
& Concatenation: if $\mathbf{a}\in\mathbb{Z}_p^n$, $\mathbf{b}\in\mathbb{Z}_p^m$, then $\mathbf{a}\parallel \mathbf{b}\in\mathbb{Z}_p^{n+m}$ \\
@@ -61,19 +61,40 @@ \section{Background}\label{sec:background}
6161
Given a finite, multiplicative cyclic group $\mathbb{G}$ of prime order $p$, the decisional Diffie-Hellman problem is defined as follows: Given $(g^a,g^b,g^c)\in\mathbb{G}$, where $g$ is a generator of $\mathbb{G}$ and $a,b,c\in\mathbb{Z}_p$, decide whether $c=ab$.
6262
\end{definition}
6363

64+
\subsection{Zero-knowledge proofs}\label{sec:background-zkps}
65+
Before explaining the protocol, we must mention that Curdleproofs is a~\gls{zkp} system, which is a system that allows a prover to convince a verifier that they know a secret without revealing the secret itself.
66+
Within the context of Ethereum, it could be the ability to convince someone that a transaction is valid without revealing information about the transaction such as the value of it.
67+
In Whisk, it uses Curdleproofs to prove the validity of a shuffle.
68+
69+
\begin{definition}[Zero-Knowledge Argument of Knowledge]
70+
An argument $(Setup, P, V)$ is a zero-knowledge argument of knowledge of a relation $\mathbb{R}$ if it satisfies completeness, knowledge-soundness and is honest-verifier zero-knowledge.
71+
\end{definition}
72+
73+
Definitions for knowledge-soundness, completeness, and~\gls{hvzk} can be found in Appendix~\autoref{app:definitions}.
74+
75+
Also, two of three proofs that make up Curdleproofs are~\glspl{ipa}.
76+
These are also~\glspl{zkp}, and will be the focus of this paper.
77+
Hence, we provide a definition on~\glspl{ipa}.
78+
79+
\begin{definition}[Inner Product Argument]
80+
The argument takes as input two binding vector commitments $C=\mathbf{c}\times\mathbf{g}\in\mathbb{G}$ and $D=\mathbf{d}\times\mathbf{g'}\in\mathbb{G}$ to the vectors $\mathbf{c},\mathbf{d}\in\mathbb{Z}_p^n$ and $z\in\mathbb{Z}_p$.
81+
The goal is to prove that $z=\mathbf{c}\times\mathbf{d}$.
82+
The argument has logarithmic communication by halving the dimensions of $\mathbf{c}$ and $\mathbf{d}$ in each iteration.
83+
\end{definition}
84+
6485
\subsection{Whisk}\label{subsec:related-work-whisk}
65-
Ethereum uses a proof-of-stake consensus mechanism, which allows users to validate transactions and create new blocks by staking their Ether (ETH) tokens.
66-
The Proof-of stake protocol works in epochs of 32 slots, where each slot is 12 seconds long.
86+
Ethereum uses a~\gls{pos} consensus mechanism, which allows users to validate transactions and create new blocks by staking their~\gls{eth} tokens.
87+
The~\gls{pos} protocol works in epochs of 32 slots, where slots are 12 seconds long.
6788
In each slot a proposer is chosen to propose a block thereby allowing the network to reach consensus on the state of the blockchain.
6889

69-
The proposer~\gls{dos} attack is a type of attack that targets the block proposers making them unable to propose blocks.
90+
The proposer~\gls{dos} attack is a type of attack that targets the block proposers, making them unable to propose blocks.
7091
An adversary can use the proposer~\gls{dos} attack to prevent a proposer from receiving rewards, gotten from proposing a block, and increase their own rewards~\cite{EthereumSSLE2024}.
71-
As a response to the proposer~\gls{dos} attack, Ethereum has proposed a new protocol called Whisk~\cite{Whisk2024} as an attempt to mitigate the attack.
92+
As a response to the proposer~\gls{dos} attack, Ethereum proposed a new protocol called Whisk~\cite{Whisk2024} as an attempt to mitigate the attack.
7293
An attack on the Ethereum network that was discovered by Heimbach et al.~\cite{heimbach2024deanonymizingethereumvalidatorsp2p} is the deanonymization attack on validators.
73-
In our preliminary work~\cite{ouroldpaper}, we have shown that the attack is still possible to perform on the Ethereum network, and using the attack, a proposer~\gls{dos} can be performed.
94+
In our preliminary work~\cite{ouroldpaper}, we show that the attack is still possible to perform on the Ethereum network, and using the attack, a proposer~\gls{dos} can be performed.
7495

7596

76-
Whisk is a~\gls{zk}~\gls{ssle} system that uses a~\gls{zk} argument called Curdleproofs~\cite{Curdleproofs} to verify the correctness of a shuffle without revealing the input or output~\cite{10.1145/3419614.3423258}.
97+
Whisk is a~\gls{zk}~\gls{ssle} system that uses a~\gls{zk} argument called Curdleproofs~\cite{Curdleproofs} to verify the correctness of a shuffle with size $\ell$ without revealing the input or output~\cite{10.1145/3419614.3423258}.
7798
Whisk works by selecting a list of 16,384 validator trackers and shuffles them over 8,192 slots ($\sim$1 day).
7899
Then 8,192 proposers are selected from the shuffled list to propose blocks for the next 8,192 slots while a new list is being shuffled.
79100
This way a new list of proposers is created every day.
@@ -112,9 +133,9 @@ \subsection{Whisk}\label{subsec:related-work-whisk}
112133
\node at (2.4,4) {A=$\sigma(\mathbf{a})\times \mathbf{g}$};
113134
\node at (2.4,3.5) {$M=\sigma(1,2,\dots,\ell)\times \mathbf{g}$};
114135
\node [font=\large] at (5.75,4.5) {SameMSM};
115-
\node at (5.75,4) {$A=\mathbf{c}\times \mathbf{g}$};
116-
\node at (5.75,3.5) {$T=\mathbf{c}\times \mathbf{T}$};
117-
\node at (5.75,3) {$U=\mathbf{c}\times \mathbf{U}$};
136+
\node at (5.75,4) {$A=\mathbf{v}\times \mathbf{g}$};
137+
\node at (5.75,3.5) {$T=\mathbf{v}\times \mathbf{T}$};
138+
\node at (5.75,3) {$U=\mathbf{v}\times \mathbf{U}$};
118139
\node [font=\large] at (8.5,4.5) {SameScalar};
119140
\node at (8.5,4) {$T=k(\mathbf{a}\times \mathbf{R})$};
120141
\node at (8.5,3.5) {$U=k(\mathbf{a}\times \mathbf{S})$};
@@ -133,57 +154,37 @@ \subsection{Whisk}\label{subsec:related-work-whisk}
133154
\end{figure}
134155

135156
The first proof is the~\gls{sameperm} proof.
136-
The prover first constructs a commitment to the permutation, $\sigma()$, by saying $M=\sigma(1,2,\dots,\ell)\times\mathbf{g}$.
137-
Then, using the Fiat-Shamir transformation, a challenge, $\mathbf{a}$, from public inputs is constructed, and a new commitment is made from that, $A=\sigma(\mathbf{a})\times\mathbf{g}$.
138-
The~\gls{sameperm} proof now consists of convincing the verifier that the same permutation was used for constructing commitment $A$ and $M$.
157+
The prover first constructs a commitment to the permutation,~$\sigma()$, by saying $M=\sigma(1,2,\dots,\ell)\times\mathbf{g}$, where~$\ell$ is the number of shuffled trackers, and $\mathbf{g}$ is a vector of cryptographic generators.
158+
Then, using the Fiat-Shamir transformation, a challenge,~$\mathbf{a}$, from public inputs is constructed, and a new commitment is made from that, $A=\sigma(\mathbf{a})\times\mathbf{g}$.
159+
The~\gls{sameperm} proof consists of convincing the verifier that the same permutation was used for constructing the commitments $A$ and $M$.
139160
To do this, the two commitments are used to construct a polynomial equation.
140161
Then Neff's trick~\cite{10.1145/501983.502000} is used, which observes that two polynomials are equal iff.\ their roots are the same up to permutation.
141162

142-
To prove that, the protocol makes use of a grand product argument.
143-
To prove that argument, Curdleproofs compiles it down to an~\gls{ipa} by expressing each multiplication of the grand product as its own equation.
144-
This~\gls{ipa} stems from the protocol originally proposed by Bootle et al.~\cite{cryptoeprint:2016/263,Curdleproofs}
163+
In order to show this, the protocol makes use of a~\gls{grandprod} argument.
164+
To prove that argument, Curdleproofs compiles it down to a~\gls{dlipa} by expressing each multiplication of the grand product as its own equation.
165+
This~\gls{dlipa} stems from the protocol originally proposed by Bootle et al.~\cite{cryptoeprint:2016/263,Curdleproofs}
145166

146-
Hence, the~\gls{sameperm} proof is done if the prover can prove the~\gls{ipa}.
167+
Hence, the~\gls{sameperm} proof is done if the prover can prove the~\gls{dlipa}.
147168

148169

149170
The second proof is a~\gls{samemsm} argument.
150-
The prover should by now have proven the existence of the permutation.
151-
Now, the goal of the~\gls{samemsm} argument is to prove that the output ciphertext set was constructed with the same permutation, here called multiscalar, committed to in commitment $A$.
152-
As the multiscalar is a vector this argument is an~\gls{ipa} by nature, contrary to the~\gls{sameperm} argument.
171+
The prover has proven the existence of the permutation.
172+
Now, the goal of the~\gls{samemsm} argument is to prove that the output ciphertext set was constructed with the same permutation, $\sigma$, here called multiscalar $\mathbf{v}$\footnote{Denoted as $\mathbf{c}$ in the Curdleproofs paper but changed for readability}, committed to in commitment $A$.
173+
Note, therefore, that $A$ in~\gls{sameperm} and~\gls{samemsm} is the same commitment, where $\mathbf{v}=\sigma(\mathbf{a})$
174+
As the multiscalar is a vector, this argument is an~\gls{ipa} by nature, contrary to the~\gls{sameperm} argument.
153175

154176
The third proof is a Same Scalar argument.
155177
To mask the ciphertexts, each prover, besides permuting the set, multiplies all ciphertexts by a scalar, $k$.
156178
This is for randomization purposes, making it harder for adversaries to track the ciphertexts~\cite{Whisk2024}.
157179
Also, all validators are still able to open their commitments if they are chosen as block proposers, even after several randomizations.
158-
So, the goal of the Same Scalar argument is to prove the existence of the scalar,~$k$, such that the commitment of the permuted set is equal to the commitment of the pre-permuted set multiplied by $k$.
180+
Therefore, the goal of the Same Scalar argument is to prove the existence of the scalar,~$k$, such that the commitment of the permuted set is equal to the commitment of the pre-permuted set multiplied by $k$.
159181

160182

161-
162-
\subsection{Zero-knowledge proofs}\label{sec:background-zkps}
163-
Curdleproofs is a~\gls{zkp} system, which means that it allows a prover to convince a verifier that they know a secret without revealing the secret itself.
164-
Within the context of Ethereum, it could be the ability to convince someone that a transaction is valid without revealing information about the transaction such as the value of it.
165-
In Whisk, it uses Curdleproofs to prove the validity of a shuffle.
166-
167-
\begin{definition}[Zero-Knowledge Argument of Knowledge]
168-
An argument $(Setup, P, V)$ is a zero-knowledge argument of knowledge of a relation $\mathbb{R}$ if it satisfies completeness, knowledge-soundness and is honest-verifier zero-knowledge.
169-
\end{definition}
170-
171-
Definitions for knowledge-soundness, completeness, and~\gls{hvzk} can be found in~\autoref{sec:appendix}.
172-
173-
Two of the three proofs in Curdleproofs are~\glspl{ipa}.
174-
These are also~\glspl{zkp}, and will be the focus of this paper.
175-
Hence, we provide a definition on~\glspl{ipa}.
176-
177-
\begin{definition}[Inner Product Argument]
178-
Takes as input two binding vector commitments $C=\mathbf{c}\times\mathbf{G}\in\mathbb{G}$ and $D=\mathbf{d}\times\mathbf{G'}\in\mathbb{G}$ to the vectors $\mathbf{c},\mathbf{d}\in\mathbb{Z}_p^n$ and $z\in\mathbb{Z}_p$.
179-
The goal is to prove that $z=\mathbf{c}\times\mathbf{d}$.
180-
The argument has logarithmic communication by halving the dimensions of $\mathbf{c}$ and $\mathbf{d}$ in each iteration.
181-
\end{definition}
183+
In Chapter 6 of Curdleproofs~\cite{Curdleproofs} they explain that the proof has size~$18+10 \log(\ell+4)\mathbb{G}$, $7\mathbb{F}$, where $\mathbb{G}$ is a cryptographic group point, and $\mathbb{F}$ is a field element.
182184

183185
\subsection{Problem definition}\label{subsec:problem-definition}
184-
In Chapter 6 of Curdleproofs~\cite{Curdleproofs}, they explain the efficiency of the protocol, including also the size of the proof.
185-
They specifically mention that the proof has size~$18+10 \log(\ell+4)\mathbb{G}$, $7\mathbb{F}$.
186-
As the proof size is dependent on the size of the shuffle,~$\ell$, an interest in the possibility of reducing this parameter arises.
187-
The current proposal of Curdleproofs only works on shuffles, where the size is a power of 2.
188-
The reason is that the underlying proofs, such as the~\gls{ipa}, need to fold recursively down to 1, by halving the size in every round.
186+
The current proposal of Curdleproofs only works when the shuffle size of Whisk is set to a power of 2.
187+
The reason is that the underlying proofs,~\gls{dlipa} in~\gls{sameperm} and~\gls{samemsm}, need to fold recursively down to 1, by halving the size in every round.
188+
With the current shuffling size being 128, being able to choose the size more flexibly could lead to both performance and size gains.
189+
The problem we study in this article is therefore how to extend Curdleproofs to~$\ell$ values that are not a power of 2.
189190

0 commit comments

Comments
 (0)