Skip to content

Commit 0c7b7b2

Browse files
authored
Merge pull request #29 from AAU-Dat/danielechanges
Danielechanges
2 parents 837ab4d + 2ef9c1e commit 0c7b7b2

File tree

7 files changed

+67
-60
lines changed

7 files changed

+67
-60
lines changed

report/src/sections/00-abstract.tex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11

22
\begin{abstract}
3-
This is the abstract~\gls{zkp}~\cite{greenwade1993}.
3+
This is the abstract~\cite{greenwade1993}.
44
\end{abstract}
55

66
\begin{IEEEkeywords}

report/src/sections/02-background.tex

Lines changed: 51 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,41 @@ \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, and hence also Whisk, is a~\gls{zkp} system.
66+
It is a system that allows a prover to convince a verifier that they know a secret without revealing the secret itself.
67+
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.
68+
Whisk uses Curdleproofs to prove the validity of a shuffle.
69+
70+
\begin{definition}[Zero-Knowledge Argument of Knowledge]
71+
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.
72+
\end{definition}
73+
74+
Definitions for knowledge-soundness, completeness, and~\gls{hvzk} can be found in Appendix~\ref{sec:appendix}.
75+
76+
Also, two of three proofs that make up Curdleproofs are~\glspl{ipa}.
77+
These are also~\glspl{zkp}, and will be the focus of this paper.
78+
Hence, we provide a definition on~\glspl{ipa}.
79+
80+
\begin{definition}[Inner Product Argument]
81+
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$.
82+
The goal is to prove that $z=\mathbf{c}\times\mathbf{d}$.
83+
The argument has logarithmic communication by halving the dimensions of $\mathbf{c}$ and $\mathbf{d}$ in each iteration.
84+
\end{definition}
85+
6486
\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.
87+
Ethereum uses a~\gls{pos} consensus mechanism, which allows users to validate transactions and create new blocks by staking their~\gls{eth} tokens.
88+
The~\gls{pos} protocol works in epochs of 32 slots, where slots are 12 seconds long.
6789
In each slot a proposer is chosen to propose a block thereby allowing the network to reach consensus on the state of the blockchain.
6890

69-
The proposer~\gls{dos} attack is a type of attack that targets the block proposers making them unable to propose blocks.
91+
The proposer~\gls{dos} attack is a type of attack that targets the block proposers, making them unable to propose blocks.
7092
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.
93+
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.
7294
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.
95+
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.
7496

7597

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}.
98+
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}.
7799
Whisk works by selecting a list of 16,384 validator trackers and shuffles them over 8,192 slots ($\sim$1 day).
78100
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.
79101
This way a new list of proposers is created every day.
@@ -112,9 +134,9 @@ \subsection{Whisk}\label{subsec:related-work-whisk}
112134
\node at (2.4,4) {A=$\sigma(\mathbf{a})\times \mathbf{g}$};
113135
\node at (2.4,3.5) {$M=\sigma(1,2,\dots,\ell)\times \mathbf{g}$};
114136
\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}$};
137+
\node at (5.75,4) {$A=\mathbf{v}\times \mathbf{g}$};
138+
\node at (5.75,3.5) {$T=\mathbf{v}\times \mathbf{T}$};
139+
\node at (5.75,3) {$U=\mathbf{v}\times \mathbf{U}$};
118140
\node [font=\large] at (8.5,4.5) {SameScalar};
119141
\node at (8.5,4) {$T=k(\mathbf{a}\times \mathbf{R})$};
120142
\node at (8.5,3.5) {$U=k(\mathbf{a}\times \mathbf{S})$};
@@ -133,57 +155,37 @@ \subsection{Whisk}\label{subsec:related-work-whisk}
133155
\end{figure}
134156

135157
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$.
158+
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.
159+
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}$.
160+
The~\gls{sameperm} proof consists of convincing the verifier that the same permutation was used for constructing the commitments $A$ and $M$.
139161
To do this, the two commitments are used to construct a polynomial equation.
140162
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.
141163

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}
164+
In order to show this, the protocol makes use of a~\gls{grandprod} argument.
165+
To prove that argument, Curdleproofs compiles it down to a~\gls{dlipa} by expressing each multiplication of the grand product as its own equation.
166+
The proof of the~\gls{dlipa} then stems from the protocol originally proposed by Bootle et al.~\cite{cryptoeprint:2016/263,Curdleproofs}
145167

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

148170

149171
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.
172+
The prover has proven the existence of the permutation.
173+
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$.
174+
Note, therefore, that $A$ in~\gls{sameperm} and~\gls{samemsm} is the same commitment, where $\mathbf{v}=\sigma(\mathbf{a})$
175+
As the multiscalar is a vector, this argument is an~\gls{ipa} by nature, contrary to the~\gls{sameperm} argument.
153176

154177
The third proof is a Same Scalar argument.
155178
To mask the ciphertexts, each prover, besides permuting the set, multiplies all ciphertexts by a scalar, $k$.
156179
This is for randomization purposes, making it harder for adversaries to track the ciphertexts~\cite{Whisk2024}.
157180
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$.
181+
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$.
159182

160183

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}
184+
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.
182185

183186
\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.
187+
The current proposal of Curdleproofs only works when the shuffle size of Whisk is set to a power of 2.
188+
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.
189+
With the current shuffling size being 128, being able to choose the size more flexibly could lead to both performance and size gains.
190+
The problem we study in this article is therefore how to extend Curdleproofs to~$\ell$ values that are not a power of 2.
189191

report/src/sections/03-related-work.tex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ \subsection{Bulletproofs}\label{subsec:related-work-bulletproofs}
4848
One of these is Bulletproofs+~\cite{chung2022bulletproofs+} which uses a weighted inner product argument instead of the standard inner product argument to achieve a better performance.
4949
Bulletproofs+ is also a zero-knowledge proof by itself unlike the original bulletproofs.
5050
Trying to modify Curdleproofs with the weighted inner product argument introduces complications that would need larger modifications and is therefore not suitable.
51-
This can be seen in~\autoref{sec:curdleproofs-weighted-inner-product-argument-modification-attempt}
51+
This can be seen in Appendix~\ref{app:curdleproofs-weighted-inner-product-argument-modification-attempt}
5252

5353
A third version of the Bulletproofs protocol is Bulletproofs++~\cite{eagen2024bulletproofs++} which uses a new type of argument called the norm argument to achieve a better performance.
5454
This comes from the prover only needing to commit to a single vector, rather than two.

report/src/sections/04-Approach.tex

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -402,25 +402,26 @@ \subsubsection{Size reduction}
402402
If we can reduce the shuffle size used in Whisk and still prove it secure, then we expect to see some reduction in the size overhead on the blockchain.
403403

404404
We first set our focus on Curdleproofs, as this is the protocol we have modified directly.
405-
As mentioned in~\autoref{sec:background-zkps}, the size of Curdleproofs is $18+10 \log(\ell+4)\mathbb{G}$, $7\mathbb{F}$.
405+
As mentioned in~\autoref{subsec:related-work-whisk}, the size of Curdleproofs is $18+10 \log(\ell+4)\mathbb{G}$, $7\mathbb{F}$.
406406
The dependence on the $\log$ stems from the number of recursive rounds that take place in the~\gls{sameperm} and~\gls{samemsm} proofs.
407407
The addition of four elements in the $\log$ stems from the protocol needing those as blinders.
408408
Hence, at a proof of size 128, $\ell$ is 124.
409-
In the proof of theorem 1, we show CAAUrdleproofs to be $\mathcal{O}(\log n)$.
409+
In the proof of theorem 1, see Appendix~\ref{sec:appendix-thm1proof}, we show that CAAUrdleproofs is $\mathcal{O}(\log n)$, which is the same as Curdleproofs.
410+
However, as discussed in~\autoref{subsec:approach-CAAUrdleproofs}, CAAUrdleproofs'~\gls{ipa} proofs use $\lceil \log n \rceil$ recursive rounds.
410411
This means that the size of CAAUrdleproofs must be $18+10 \lceil\log(\ell+4)\rceil\mathbb{G}$, $7\mathbb{F}$.
411412

412413
CAAUrdleproofs therefore has the same proof size as Curdleproofs.
413414

414415
The CAAUrdleproofs modification can still reduce the overall block size overhead, though.
415-
Using Whisk with CAAUrdleproofs has a block size of $16.656$ KB, when the shuffle size is 128\cite{Whisk2024}.
416+
By using the overhead calculation described by Whisk on CAAUrdleproofs, it measures a block overhead of $16.656$ KB, when the shuffle size is 128~\cite{Whisk2024}.
416417
Note that this is the same size as Curdleproofs, as the shuffle size is a power of 2.
417-
The calculation of the block size comes from the following, where $\mathbb{G}=48$ bytes and $\mathbb{F}=32$ bytes\footnote{\text{As noted in the code on the Curdleproofs GitHub repository: }\\ \href{https://github.com/asn-d6/curdleproofs/blob/main/src/whisk.rs}{https://github.com/asn-d6/curdleproofs/blob/main/src/whisk.rs}. Accessed: 26/05/2025}:
418+
The provided calculation of the block overhead is provided as the following, where $\mathbb{G}=48$ bytes and $\mathbb{F}=32$ bytes\footnote{\text{As noted in the code on the Curdleproofs GitHub repository: }\\ \href{https://github.com/asn-d6/curdleproofs/blob/main/src/whisk.rs}{https://github.com/asn-d6/curdleproofs/blob/main/src/whisk.rs}. Accessed: 26/05/2025}:
418419
\begin{itemize}
419420
\item List of shuffled trackers ($\ell\cdot96\Rightarrow\text{eg. }124\cdot96=11,904$ bytes).
420421
\item Shuffle proof ($18+10 \lceil\log(\ell+4)\rceil\mathbb{G}$, $7\mathbb{F}\Rightarrow\text{eg. }(18+10\lceil\log(124+4)\rceil)\cdot48+7\cdot32=4,448$ bytes).
421422
\item A fresh tracker (two BLS G1 points $\Rightarrow48\cdot2=96$ bytes).
422423
\item A new commitment $com(k)$ to the proposer's tracker (one BLS G1 point $\Rightarrow48$ bytes).
423424
\item A Discrete Logarithm Equivalence Proof on the ownership of the elected proposer commitment (two G1 points, two Fr scalars $\Rightarrow2\cdot48+2\cdot32=160$ bytes).
424425
\end{itemize}
425-
The majority of the block size comes from the list of shuffled trackers.
426-
Hence, using CAAUrdleproofs could majorly decrease the block size by allowing~$\ell$ to be chosen at arbitrary length.
426+
The majority of the block overhead comes from the list of shuffled trackers.
427+
Hence, as the list size is heavily dependent on~$\ell$, using CAAUrdleproofs could majorly decrease the block overhead by allowing~$\ell$ to be more flexibly chosen as a smaller size than 128.

report/src/sections/06-results.tex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ \subsection{Proving and Verifying Times}\label{subsec:results:provingverifying}
2424
Though, this seems to not be the case, at least not as aggressively, when increasing $\ell$ from 128.
2525
We find, however, that the bump is smaller the higher $\ell$ is.
2626

27-
Additional to the proving and verifying times, the time used on shuffling is also lower for any $\ell$ that is not a power of 2; see~\autoref{sec:shuffling-results}.
27+
Additional to the proving and verifying times, the time used on shuffling is also lower for any $\ell$ that is not a power of 2; see Appendix~\ref{sec:shuffling-results}.
2828
Though, that was to be expected since CAAUrdleproofs uses the same shuffling algorithm as Curdleproofs, but does not have to add additional padding to the non-power of 2 input sizes.
2929

3030

0 commit comments

Comments
 (0)