@@ -24,17 +24,17 @@ \subsection{Springproofs}\label{sec:approach-springproofs}
24
24
The computation is for finding the set, $ T$ .
25
25
26
26
\begin {figure }[!htb]
27
- \ begin{lstlisting} [language=Python,mathescape=true,label={lst:schemefunc},numbers=right ,caption={Scheme function \textbf{\textit{f}} used in CAAUrdleproofs},captionpos=b,frame=single]
27
+ \ begin{lstlisting} [language=Python,mathescape=true,label={lst:schemefunc},numbers=left ,caption={Scheme function \textbf{\textit{f}} used in CAAUrdleproofs},captionpos=b,frame=single]
28
28
input: $n$, where $n>0$
29
29
30
30
$\{n\}\gets n$
31
31
$N\gets 2^{\lceil\log n\rceil-1}$
32
32
$i_h \gets \lfloor (2N-n)/2\rfloor+1$
33
33
$i_t=\lfloor n/2\rfloor$
34
- if $n\neq N$:
34
+ if $n\neq N$: #Not power of 2
35
35
$\{T\}\gets(i_h:i_t)\cup(N+1:n)$
36
- else if $n=N$:
37
- $\{T\}\gets(1:n)$
36
+ else if $n=N$: #Power of 2
37
+ $\{T\}\gets(1:n)$ #Meaning S is empty
38
38
$\{S\}\gets\{n\}-\{T\}$
39
39
\end {lstlisting }
40
40
\label {fig:schemefunc }
@@ -67,42 +67,42 @@ \subsubsection*{Prover computation}
67
67
The construction can be seen in~\autoref {lst:ipa-prover }.
68
68
69
69
\begin {figure }[!htb]
70
- \ begin{lstlisting} [language=Python,mathescape=true,label={lst:ipa-prover},numbers=right ,caption={Prover computation for CAAU-IPA in CAAUrdleproofs},captionpos=b,frame=single]
71
- $\textbf{Step 1:}$
70
+ \ begin{lstlisting} [language=Python,mathescape=true,label={lst:ipa-prover},numbers=left ,caption={Prover computation for CAAU-IPA in CAAUrdleproofs},captionpos=b,frame=single]
71
+ $\textbf{Step 1:}$ #Setup phase
72
72
$(\textbf{G},\textbf{G}',H)\gets$parse$(crs_{dl_{inner}})$
73
- $\textbf{r}_C,\textbf{r}_D\overset{\$}{\leftarrow}\mathbb{F}^n$
73
+ $\textbf{r}_C,\textbf{r}_D\overset{\$}{\leftarrow}\mathbb{F}^n$ #Vector blinders
74
74
where $(\textbf{r}_C\times \textbf{d} + \textbf{r}_D\times \textbf{c})=0\text{ and }\textbf{r}_C\times \textbf{r}_D=0$
75
- $B_C\gets \textbf{r}_C\times \textbf{G}$
75
+ $B_C\gets \textbf{r}_C\times \textbf{G}$ #Blinder commitments
76
76
$B_D\gets \textbf{r}_D\times \textbf{G}'$
77
- $\alpha,\beta\gets$Hash$(C,D,z,B_C,B_C)$
78
- $\textbf{c}\gets \textbf{r}_C+\alpha \textbf{c}$
77
+ $\alpha,\beta\gets$Hash$(C,D,z,B_C,B_C)$ #FS challenges
78
+ $\textbf{c}\gets \textbf{r}_C+\alpha \textbf{c}$ #Blinded vectors
79
79
$\textbf{d}\gets \textbf{r}_D+\alpha \textbf{d}$
80
80
$H\gets\beta H$
81
- $\textbf{Step 2:}$
81
+ $\textbf{Step 2:}$ #Recursive protocol
82
82
$m\gets \lceil \log n\rceil$
83
83
while $1\leq j\leq m:$
84
- $T,S\gets \textbf{\textit{f(}}n\textbf{\textit{)}}$
84
+ $T,S\gets \textbf{\textit{f(}}n\textbf{\textit{)}}$ #Scheme function
85
85
$n\gets \frac{|T|}{2}$
86
- $\textbf{c}\gets\textbf{c}_T$, $\textbf{cS}\gets\textbf{c}_S$
86
+ $\textbf{c}\gets\textbf{c}_T$, $\textbf{cS}\gets\textbf{c}_S$ #Vector splitting
87
87
$\textbf{d}\gets\textbf{d}_T$, $\textbf{dS}\gets\textbf{d}_S$
88
88
$\textbf{G}\gets\textbf{G}_T$, $\textbf{GS}\gets\textbf{G}_S$
89
89
$\textbf{G}'\gets\textbf{G}'_T$, $\textbf{GS}'\gets\textbf{G}'_T$
90
- $L_{C,j}\gets\textbf{c}_{[:n]}\times\textbf{G}_{[n:]}+(\textbf{c}_{[:n]}\times\textbf{d}_{[n:]})H$
90
+ $L_{C,j}\gets\textbf{c}_{[:n]}\times\textbf{G}_{[n:]}+(\textbf{c}_{[:n]}\times\textbf{d}_{[n:]})H$ #Cross-comm
91
91
$L_{D,j}\gets\textbf{d}_{[n:]}\times\textbf{G}'_{[:n]}$
92
92
$R_{C,j}\gets\textbf{c}_{[n:]}\times\textbf{G}_{[:n]}+(\textbf{c}_{[n:]}\times\textbf{d}_{[:n]})H$
93
93
$R_{D,j}\gets\textbf{d}_{[:n]}\times\textbf{G}'_{[n:]}$
94
- $\pi_j\gets(L_{C,j},L_{D,j},R_{C,j},R_{D,j})$
95
- $\gamma_j\gets Hash(\pi_j)$
96
- $\textbf{c}\gets\textbf{cS}\|\textbf{c}_{[:n]}+\gamma_j^{-1}\textbf{c}_{[n:]}$
94
+ $\pi_j\gets(L_{C,j},L_{D,j},R_{C,j},R_{D,j})$ #Proof elements
95
+ $\gamma_j\gets Hash(\pi_j)$ #Folding challenges
96
+ $\textbf{c}\gets\textbf{cS}\|\textbf{c}_{[:n]}+\gamma_j^{-1}\textbf{c}_{[n:]}$ #Next round vectors
97
97
$\textbf{d}\gets\textbf{dS}\|\textbf{d}_{[:n]}+\gamma_j\textbf{d}_{[n:]}$
98
98
$\textbf{G}\gets\textbf{GS}\|\textbf{G}_{[:n]}+\gamma_j\textbf{G}_{[n:]}$
99
99
$\textbf{G}'\gets\textbf{GS}'\|\textbf{G}'_{[:n]}+\gamma_j^{-1}\textbf{G}'_{[n:]}$
100
100
$n\gets len(c)$
101
- $\textbf{Step 3:}$
101
+ $\textbf{Step 3:}$ #Final proof element
102
102
$c\gets c_1$
103
103
$d\gets d_1$
104
104
105
- return $(B_C,B_D,\mathbf{\pi},c,d)$
105
+ return $(B_C,B_D,\mathbf{\pi},c,d)$ # Elements for verifier
106
106
\end {lstlisting }
107
107
\label {fig:ipa-prover }
108
108
\end {figure }
@@ -149,33 +149,33 @@ \subsubsection*{Verifier computation}
149
149
Again, the originally proposed verifying protocol has been modified according to Springproofs, which is seen in~\autoref {lst:ipa-verifier }.
150
150
151
151
\begin {figure }[!htb]
152
- \ begin{lstlisting} [language=Python,mathescape=true,label={lst:ipa-verifier},numbers=left ,caption={Verifier computation for CAAU-IPA in CAAUrdleproofs},captionpos=b,frame=single]
153
- $\textbf{Step 1:}$
152
+ \ begin{lstlisting} [language=Python,mathescape=true,label={lst:ipa-verifier},numbers=right ,caption={Verifier computation for CAAU-IPA in CAAUrdleproofs},captionpos=b,frame=single]
153
+ $\textbf{Step 1:}$ #Setup phase
154
154
$(\textbf{G},\textbf{G}',H)\gets$parse$(crs_{dl_{inner}})$
155
- $(C,D,z)\gets$parse$(\phi_{dl_{inner}})$
156
- $(B_C,B_D,\mathbf{\pi},c,d)\gets$parse$(\pi_{dl_{inner}})$
157
- $\alpha,\beta\gets$Hash$(C,D,z,B_C,B_D)$
155
+ $(C,D,z)\gets$parse$(\phi_{dl_{inner}})$ #Public input
156
+ $(B_C,B_D,\mathbf{\pi},c,d)\gets$parse$(\pi_{dl_{inner}})$ #From prover
157
+ $\alpha,\beta\gets$Hash$(C,D,z,B_C,B_D)$ #FS challenges
158
158
$H\gets \beta H$
159
- $C\gets B_C+\alpha C+(\alpha^2z)H$
159
+ $C\gets B_C+\alpha C+(\alpha^2z)H$ #Blinded commitments
160
160
$D\gets B_D+\alpha D$
161
161
162
- $\textbf{Step 2:}$
162
+ $\textbf{Step 2:}$ #Recursive round
163
163
$m\gets \lceil\log n\rceil$
164
164
for $1\leq j\leq m$
165
- $T,S\gets \textbf{\textit{f(}}n\textbf{\textit{)}}$
165
+ $T,S\gets \textbf{\textit{f(}}n\textbf{\textit{)}}$ #Scheme function
166
166
$n\gets \frac{|T|}{2}$
167
- $\textbf{G}=\textbf{G}_T$, $\textbf{GS}=\textbf{G}_S$
167
+ $\textbf{G}=\textbf{G}_T$, $\textbf{GS}=\textbf{G}_S$ #Vector splitting
168
168
$\textbf{G}'=\textbf{G}'_T$, $\textbf{GS}'=\textbf{G}'_T$
169
- $(L_{C,j},L_{D,j},R_{C,j},R_{D,j})\gets$parse$(\pi_j)$
170
- $\gamma_j\gets$Hash$(\pi_j)$
171
- $C\gets\gamma_j L_{C,j}+C+\gamma_j^{-1}R_{C,j}$
169
+ $(L_{C,j},L_{D,j},R_{C,j},R_{D,j})\gets$parse$(\pi_j)$ #Proof elem
170
+ $\gamma_j\gets$Hash$(\pi_j)$ #Folding challenges
171
+ $C\gets\gamma_j L_{C,j}+C+\gamma_j^{-1}R_{C,j}$ #Update comms
172
172
$D\gets\gamma_j L_{D,j}+D+\gamma_j^{-1}R_{D,j}$
173
- $\textbf{G}\gets\textbf{GS}\|\textbf{G}_{[:n]}+\gamma_j\textbf{G}_{[n:]}$
173
+ $\textbf{G}\gets\textbf{GS}\|\textbf{G}_{[:n]}+\gamma_j\textbf{G}_{[n:]}$ #Next round vectors
174
174
$\textbf{G}'\gets\textbf{GS}'\|\textbf{G}'_{[:n]}+\gamma_j^{-1}\textbf{G}'_{[n:]}$
175
175
$n\gets\text{len}(\textbf{G})$
176
176
177
- $\textbf{Step 3:}$
178
- Check $C=c\times G_1+cdH$
177
+ $\textbf{Step 3:}$ #Final check
178
+ Check $C=c\times G_1+cdH$ #Initial ?= Folded
179
179
Check $D=d\times G'_1$
180
180
return 1 $\text{if both checks pass, else}$ return 0
181
181
\end {lstlisting }
@@ -304,23 +304,23 @@ \subsubsection{CAAUdleproofs}
304
304
305
305
\begin {figure }[!htb]
306
306
\ begin{lstlisting} [language=Python,mathescape=true,label={lst:ipa-verifier-optimized},numbers=left,caption={Optimized verifier computation for CAAU-IPA in CAAUrdleproofs},captionpos=b,frame=single]
307
- $\textbf{Step 1:}$
307
+ $\textbf{Step 1:}$ #Setup phase
308
308
$(\textbf{G},H)\gets$parse$(crs_{dl_{inner}})$
309
309
$(C,D,z,\mathbf{u})\gets$parse$(\phi_{dl_{inner}})$
310
310
$(B_C,B_D,\mathbf{\pi},c,d)\gets$parse$(\pi_{dl_{inner}})$
311
- $\alpha,\beta\gets$Hash$(C,D,z,B_C,B_D)$
311
+ $\alpha,\beta\gets$Hash$(C,D,z,B_C,B_D)$ #FS challenges
312
312
313
- $\textbf{Step 2:}$
313
+ $\textbf{Step 2:}$ #Recursive phase
314
314
$m\gets \lceil\log n\rceil$
315
315
for $1\leq j\leq m$
316
- $T,S\gets \textbf{\textit{f(}}n\textbf{\textit{)}}$
316
+ $T,S\gets \textbf{\textit{f(}}n\textbf{\textit{)}}$ #Scheme function
317
317
$n\gets \frac{|T|}{2}$
318
- $(L_{C,j},L_{D,j},R_{C,j},R_{D,j})\gets$parse$(\pi_j)$
319
- $\gamma_j\gets$Hash$(\pi_j)$
318
+ $(L_{C,j},L_{D,j},R_{C,j},R_{D,j})\gets$parse$(\pi_j)$ #Proof elem
319
+ $\gamma_j\gets$Hash$(\pi_j)$ #Folding challenges
320
320
$n\gets n+\text{len}(S)$
321
321
322
- $\textbf{Step 3:}$
323
- $\mathbf{CP}\text{: }\mathbf{\gamma}\gets(\gamma_m,...,\gamma_1)$
322
+ $\textbf{Step 3:}$ # Accumulated checking phase
323
+ $\mathbf{CP}\text{: }\mathbf{\gamma}\gets(\gamma_m,...,\gamma_1)$ #Construction difference
324
324
$\mathbf{CAAUP}\text{: }\mathbf{\gamma}\gets(\gamma_1,...,\gamma_m)$
325
325
$\textit{Compute }\mathbf{s}\textit{: see below for difference}$
326
326
@@ -331,27 +331,27 @@ \subsubsection{CAAUdleproofs}
331
331
$\text{return 1}$
332
332
333
333
$\textbf{s-step Curdleproofs:}$
334
- for $1\leq j\leq n$:
334
+ for $1\leq j\leq n$: Simulate halving each round
335
335
$s_i=\sum_{j=1}^m\delta_j^{b_{i,j}}\text{, }b_{i,j}\in\{0,1\}\text{ s.t. }i=\sum_{j=1}^mb_{i,j}2^j$
336
336
$s'_i=\sum_{j=1}^m\delta_j^{-b_{i,j}}$
337
337
$\textbf{s-step CAAUrdleproofs:}$
338
- $ActivePos\gets[(i,i)\text{, }i=1,\dots,n]$
338
+ $ActivePos\gets[(i,i)\text{, }i=1,\dots,n]$ #Pos after round
339
339
for $1\leq j\leq m:$
340
340
$h\gets\frac{2^{\lceil\log n\rceil}}{2}$
341
341
$f\gets n-h$
342
342
$nf\gets h-f$
343
343
$fs\gets \frac{nf}{2}$
344
344
for $(i,k)$ in $ActivePos$:
345
- if $k\geq h:$
345
+ if $k\geq h:$ #Elem has challenge j
346
346
$b_{i,j}\gets1$
347
347
$newPos=k-h-fs$
348
- else:
348
+ else: #Elem has no challenge j
349
349
$b_{i,j}\gets0$
350
350
$newPos=k$
351
351
$nextActivePos.push((i,newPos))$
352
- $ActivePos\gets nextActivePos$
352
+ $ActivePos\gets nextActivePos$ #New positions
353
353
$n\gets h$
354
- for $1\leq j\leq n$:
354
+ for $1\leq j\leq n$: #Same as Curdleproofs
355
355
$s_i=\sum_{j=1}^m\delta_j^{b_{i,j}}$
356
356
$s'_i=\sum_{j=1}^m\delta_j^{-b_{i,j}}$
357
357
\end {lstlisting }
0 commit comments