You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The shuffle method proposed by Larsen et al.~\cite{cryptoeprint:2022/560} that was used in curdleproofs is based on the idea of shuffling a list of proposers over a set of slots.
210
-
The shuffle itself however is not too complex.
211
-
A formal definition of the shuffle is given in~\autoref{fig:shuffle}.
The shuffle method proposed by Larsen et al.~\cite{cryptoeprint:2022/560} that was used in Curdleproofs is based on the idea of shuffling a list of proposers over a set of slots.
210
+
The shuffle itself, however, is not too complex.
211
+
A formal definition of the shuffle is given in~\autoref{fig:shuffle}~\cite{cryptoeprint:2022/560}.
Here the set $(c_1, \ldots, c_n)$ is a set of ciphertexts that are shuffled over $T$ slots.
233
-
In each slot $t$, a subset of the ciphertexts ${i_1, \ldots, i_k}$ is chosen randomly and shuffled and added back to the list of ciphertexts.
234
-
It is then encrypts the ciphertexts again and publishes them.
233
+
In each slot $t$, a subset of the ciphertexts ${i_1, \ldots, i_k}$ is chosen randomly, shuffled, and added back to the list of ciphertexts.
234
+
The shuffler then re-encrypts the ciphertexts and publishes them.
235
235
This process is repeated for $T$ slots and the shuffle is complete.
236
-
During the $T$ shuffles some of the shufflers may be adversarial.
237
-
This means that whenever the shuffling process is taking place a part of the shuffles may be adversarial which can be seen as not being shuffled.
238
-
Therefore the amount of honest shuffles that happen during the shuffle process is $T_H = T - \alpha$.
239
-
Where $\alpha$ is the amount of adversarial shufflers.
236
+
During the $T$ shuffles, some shufflers may be adversarial.
237
+
This means that whenever the shuffling process is taking place, a part of the shuffles may be adversarial, which can be seen as not being shuffled.
238
+
Therefore, the number of honest shuffles that happen during the shuffle process is $T_H = T - \alpha$, where $\alpha$ is the number of adversarial tracked ciphertexts.
240
239
241
-
The Shuffle is secure if none of these two events occur.
240
+
The shuffle is secure if none of the following two events occur.
242
241
The first event is a short backtracking, where an adversary can find the original ciphertexts from the shuffled ciphertexts.
243
-
Since the subsets of ciphertexts are chosen randomly in each shuffle, if is enough adversarial shufflers in a row to end the process, then a shot backtrack is possible.
242
+
Since the subsets of ciphertexts are chosen randomly in each shuffle, if there are enough adversarial shufflers in a row to end the process, then a short backtracking is possible.
244
243
245
-
The second event that can occur is that since every shuffle distributes the possibility of a certain ciphertext to be in a certain slot.
246
-
Then if a shuffle contains a lot of ciphertext with a larger than average chance of containing a certain ciphertext, then that would imply that there is a higher chance of that ciphertext being in that slot.
244
+
The second event that can occur is related to the fact that every shuffle distributes the possibility of a certain ciphertext to be in a certain slot.
245
+
So, if a shuffle contains a lot of ciphertexts with a larger than average chance of containing a certain ciphertext, then that would imply that there is a higher chance of that ciphertext being in that slot.
247
246
248
-
It is theoretically possible to find a shuffle size and a number of shuffles given an amount of adversarial shufflers to guarantee that the shuffle is secure.
247
+
It is theoretically possible to find a number of shuffles, given the shuffle size, and a number of adversarial shufflers, to guarantee that the shuffle is secure.
249
248
For any $0 < \delta < 1/3$, if $T \geq20 n / k \ln(n/\delta) + \beta$ and $ k \geq256\ln^2(n/\delta)(1 - \alpha/n)^{-2}$.
250
249
If $T$ and $k$ are chosen such that the above two conditions are met, then the protocol is an $(\epsilon , \delta)$-secure $(T,n,k)$-shuffle in the presence of a $(\alpha, \beta)$-adversary where $\epsilon = 2/(n-\alpha)$.
251
250
252
251
This formula is the lowest theoretically proven bound for $T$ and $k$.
253
-
It is however possible to find lower secure values for $T$ and $k$ but this has to be done experimentally.
252
+
Plotting numbers relevant to Whisk will show that this theoretical bound is too large to use for argumentation of security.
253
+
It is, however, possible to find lower secure values for $T$ and $k$, but this has to be done experimentally.
Implementing the above-explained CAAUrdleproofs protocol introduced some optimizations required to have the code run as fast as possible.
258
+
These are explained in the following with a focus on how CAAUrdleproofs differentiates itself from Curdleproofs.
259
+
Both our implementation of CAAUrdleproofs and the experiment involving the security of the shuffle are publicly available on GitHub~\footnote{\href{https://github.com/AAU-Dat/curdleproofsplus/tree/SIPA}{https://github.com/AAU-Dat/curdleproofsplus/tree/SIPA}}.
260
+
The implementation of CAAUrdleproofs is a fork of and builds directly on the already existing Curdleproofs code.
261
+
\subsubsection{CAAUdleproofs}
262
+
The protocol in Curdleproofs~\cite{Curdleproofs} introduces a lot of multiscalar multiplications.
263
+
As such, CAAUrdleproofs also introduces these multiplications.
264
+
This allows for checking calculations of the form:
As explained by Curdleproofs, the verifier computation can be significantly optimized by checking the multiscalar multiplications as a single check at the end of the protocol instead.
269
+
270
+
CAAUrdleproofs introduced a slight difference on this topic in regard to the~\glspl{ipa}, \texttt{sameperm} and \texttt{same multiscalar}.
271
+
In each recursive round, both the folded vectors and the commitments are being multiplied by verification scalars, $\gamma_j$.
272
+
To keep track of which elements of the vectors are multiplied by each $\gamma_j$, a function called \texttt{get\_verification\_scalars\_bitstring} is used.
273
+
The output of this function is a list of length $\ell$, each element with a list corresponding to the rounds in which $\gamma_j$ was multiplied to the element.
274
+
Curdleproofs' implementation is simpler than CAAUrdleproofs' in this case.
275
+
As Curdleproofs works on powers of two, it is always the right half of the vectors in each round that are multiplied by the challenge.
276
+
277
+
The multiplication of challenges are not as easily trackable in the CAAUrdleproofs protocol.
278
+
Here, it is necessary to simulate a run though the recursive protocol.
279
+
Though, this should not have a big impact on performance, as it is run over vectors of small integers, and never actually has to do any multiplications.
\caption{Optimized verifier computation for CAAU-IPA in CAAUrdleproofs}
338
+
\label{fig:ipa-verifier-optimized}
339
+
\end{figure}
340
+
341
+
The protocol used in the implementation can be seen in~\autoref{fig:ipa-verifier-optimized}.
342
+
A list, \texttt{ActivePos}, keeps track of the original index placement and its position after each fold.
343
+
Doing this, we can run the recursion and find the correct challenges for each index, while still knowing what the original index was.
344
+
A bit matrix,~$b_{i,j}$, is constructed as in Curdleproofs, such that the vector, $\mathbf{s}$, is made in the same way for both protocols.
345
+
346
+
The vector, $\mathbf{u}$, is used for optimization in the grand product argument rather than $\mathbf{G'}$, and the \texttt{AccumulateCheck} function is used for the multiscalar multiplication optimization.
347
+
For a thorough explanation of these, we refer to Curdleproofs~\cite{Curdleproofs}.
348
+
349
+
In Curdleproofs, both the \texttt{SamePerm} and \texttt{SameMultiscalar} proof are recursive~\glspl{ipa}.
350
+
So, the modifications and optimization used on the \texttt{SamePerm} argument are also used on the \texttt{SameMultiscalar} argument.
351
+
This includes the split into set $T$ and $S$ before recursion, and the construction of the bit matrix, $b_{i,j}$, to keep track of multiplications on individual elements.
352
+
353
+
354
+
\subsubsection{Shuffle Security}
355
+
As mentioned in~\autoref{subsec:approach-shuffle-security}, the theoretically proven bound, on the necessary number of shuffles to ensure security is too high.
356
+
Hence, as also done in~\cite{cryptoeprint:2022/560}, we implement an experiment to find the bounds, where the shuffle is secure.
357
+
The goal of the experimental code is to find the number of honest shuffles required for security.
358
+
359
+
We inherit the authors of the shuffle's terminology, and interpret each ciphertext as a cup that can contain water.
360
+
Each cup contains an amount of water between 0 and 1.
361
+
362
+
An experiment run starts with the first cup being full and the rest being empty.
363
+
As mentioned, $\alpha$ cups are tracked by an adversary, the first $n-\alpha$ cups are called active cups, while the last $\alpha$ cups are tracked.
364
+
So, at each shuffle, the shuffler randomly picks $k$ ciphertexts and shuffles them, also randomly.
365
+
Meanwhile, an average of the water between the active indices of the $k$-shuffle is found.
366
+
All active indices are given this amount of water.
367
+
368
+
Now, after each shuffle, if any cup has more than $\frac{2}{n-\alpha}$ water, its position can be predicted by the adversary, hence the shuffle is insecure~\cite{cryptoeprint:2022/560}.
369
+
If a position can be predicted, another round of shuffling is performed.
370
+
This method is used until no cup exceeds the threshold, after which the shuffle is deemed secure.
371
+
372
+
The experiment denotes how many rounds it took before the shuffle was secure.
257
373
374
+
By repeating this experiment for several runs, one can experimentally say, when a shuffle with given parameters is secure.
0 commit comments