-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpolcom.tex
2948 lines (2686 loc) · 143 KB
/
polcom.tex
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
% !TeX spellcheck = en_UK
\documentclass[runningheads,11pt]{llncs}
\let\spvec\vec
\let\vec\accentvec
\newcommand\hmmax{0}
\newcommand\bmmax{0}
\DeclareFontFamily{U}{mathx}{\hyphenchar\font45}
\DeclareFontShape{U}{mathx}{m}{n}{<-> mathx10}{}
\DeclareSymbolFont{mathx}{U}{mathx}{m}{n}
\DeclareMathAccent{\widebar}{0}{mathx}{"73}
\let\spvec\vec
\usepackage{amssymb,amsmath}
\let\vec\spvec
\usepackage{newtxtext}
%\usepackage{newtxmath,newtxtext}
\def\vec#1{\mathchoice{\mbox{\boldmath$\displaystyle#1$}}
{\mbox{\boldmath$\textstyle#1$}} {\mbox{\boldmath$\scriptstyle#1$}}
{\mbox{\boldmath$\scriptscriptstyle#1$}}}
\usepackage{bm}
\usepackage{soulutf8} \soulregister\cite7 \soulregister\ref7
\soulregister\pageref7 \usepackage{hyperref}
\usepackage[color=yellow]{todonotes} \hypersetup{final} \usepackage{mathrsfs}
\usepackage[advantage,asymptotics,adversary,sets,keys,ff,lambda,primitives,events,operators,probability,logic,mm,complexity]{cryptocode}
\usepackage{cite}
\usepackage{booktabs}
\usepackage{paralist}
\usepackage[innerleftmargin=5pt,innerrightmargin=5pt]{mdframed}
\usepackage{caption}
\captionsetup{belowskip=0pt}
\usepackage{bm}
\usepackage{url}
%\usepackage{dirtytalk}
\newcommand{\say}[1]{\emph{``#1''}}
\usepackage[margin=0.7in,a4paper]{geometry}
\usepackage[normalem]{ulem}
\usepackage{dashbox}
\newcommand{\dboxed[1]}{\dbox{\ensuremath{#1}}}
\usepackage{hyperref}
\usepackage[capitalise]{cleveref}
\usepackage{braket} %for the \braket{} command
%\usepackage{mathptmx}
\include{macros}
\include{macros_antonio}
\title{On PHP-based zkSNARKs}
\author{}
%\iflncs{
\institute{}
\allowdisplaybreaks
\begin{document} \sloppy \maketitle
\begin{abstract}
In this paper we investigate properties of zkSNARKs obtained by
compiling a PHP proof using a polynomial commitment scheme. The question we
try to answer is \say{What polynomial commitment's properties propagate to
the resulting zkSNARK?}. The properties we focus on are:
\begin{compactenum}
\item simulation extractability,
\item SRS updatability,
\item SRS-updatable simulation extractability,
\item subversion zero knowledge.
\end{compactenum}
The research hypothesis is \say{A NIZK obtained from a simulation extractable /
SRS-updatable / SRS updatable SE / subversion zero knowledge polynomial
commitment is simulation extractable /
SRS-updatable / SRS updatable SE / subversion zero knowledge.} To be able to
show the hypothesis we need to solve a number of problems
\begin{compactenum}
\item Neither simulation extractability, SRS-updatability, SRS-updatable
simulation extractability, nor subversion zero knowledge have been defined
for a polynomial commitment scheme. Another contribution of the paper is
defining these properties.
\item Similarly, there is no definition for SRS-updatable simulation
extractable NIZKs.
\item The polynomial IOP is defined very generally, cf.~\cref{def:piop}, what
makes showing generic properties difficult. The paper would propose tighter
definitions which would emphasize more the structure of PHP,
but would not narrow a class of possible (from the practical point of view)
PHP too much, cf.~\cref{def:wepiop,def:sdwepiop}.
\michals{15.11}{Comment re PHP: it doesn't allow to efficiently check statements
like ``coefficient of $X^n$ is $0$'' what is used e.g.~in Sonic.}
\end{compactenum}
\end{abstract}
\section{Preliminaries}
\begin{definition}[Whitebox Simulation extractable NIZK]
\label{def:sepcom}
Let $NIZK = (\kgen, \prove, \verify)$ be a NIZK proof system
with a simulator $(\simgen, \simprove)$.
Let $\oracles(\srs, \td, \inp, \wit)$ be an oracle that when $(\inp, \wit)\in
\REL$, runs $\pi \gets \simprove(\srs, \td, \inp)$ internally, records $(\pi,\inp)$ in $Q$, and returns $\pi$.
We say that $NIZK$ is \emph{simulation extractable} if for any $\ppt$
adversary $\adv$ with oracle access to $\oracles$ and $\ro$ there exists extractor
$\ext_{\adv}$ such that
\[
\Pr \left[
\begin{aligned}
& \verify(\srs, \inp, \pi) = 1, \\
& \;(\inp, \wit) \neq \REL\\
& (\pi,\inp) \notin Q
\end{aligned}
\,\left|\,
\vphantom{
\begin{aligned}
& \\
& \\
& \\
&
\end{aligned}
}
\begin{aligned}
& (\srs, \td) \gets \simgen(\secparam, \REL),\\
& (\inp, \pi) \gets \adv^{\oracles,\ro}(\srs; r), \\
& \wit \gets \ext_\adv(\srs, Q_{sim}, Q_{\ro}; r)
% & z \sample \FF,\\
% & (s, o) \gets \adv^{\oracles}(\srs, z; r)
\end{aligned}
\right.\right]
\leq \negl.
\]
\end{definition}
\antonio{19/10/2021}{The definition mention $\ro$, I guess it is an error.}
\paragraph{Polynomial commitment scheme.}
\label{sec:poly_com}
In a polynomial commitment scheme $\PCOM = (\kgen, \com, \open, \verify)$ a
prover $\prover$ convinces a verifier $\verifier$ that some polynomial $\p{f}$
that $\prover$ committed to earlier evaluates to $y$ at some point $x$ chosen by
$\verifier$. The key generation algorithm $\kgen$ takes security
parameter $\secparam$ and a parameter $\maxdeg$ which determines the maximal
degree of the committed polynomial as input and produces a (structured) reference string $\srs$ as output. We assume that $\maxdeg$ can be read from
the $\srs$.
We emphasize the following properties of a secure polynomial commitment
$\PCOM$:
\begin{description}
\item[Evaluation binding:] A $\ppt$ adversary $\adv$ which outputs a commitment
$\vec{c}$ and evaluation points $\vec{x}$ has at most negligible chances to
open the commitment to two different evaluations $\vec{y}, \vec{y'}$. That is,
let $k \in \NN$ be the number of committed polynomials, $l \in \NN$ number of
evaluation points, $\vec{c} \in \GRP^k$ be the commitments,
$\vec{x} \in \FF_p^l$ be the arguments the polynomials are evaluated at,
$\vec{y},\vec{y}' \in \FF_p^{kl}$ the evaluations, and
$\vec{o},\vec{o}' \in \FF_p^l$ be the commitment openings. Then for every
$\ppt$ adversary $\adv$
\[
\Pr
\left[
\begin{aligned}
& \verify(\srs, \vec{c}, \vec{x}, \vec{y}, \vec{o}) = 1, \\
& \verify(\srs, \vec{c}, \vec{x}, \vec{y}', \vec{o}') = 1, \\
& \vec{y} \neq \vec{y}'
\end{aligned}
\,\left|\,\vphantom{\begin{aligned}
& \\
& \\
&
\end{aligned}}
\begin{aligned}
& \srs \gets \kgen(\secparam, \maxdeg),\\
& (\vec{c}, \vec{x}, \vec{y}, \vec{y}', \vec{o}, \vec{o}') \gets \adv(\srs)
\end{aligned}
\right.\right] \leq \negl\,.
\]
\end{description}
\antonio{19/10/2021}{Why do we need to use vectors to define Evaluation Binding? Does the security notion for $l=1$ imply already the notion for $l>1$?}
\begin{description}
\item[Commitment of knowledge] For every $\ppt$ adversary
$\adv = (\adv_1, \adv_2)$ who produces commitment $c$, gets random evaluation
point $x$, and outputs evaluation $y$ with an opening $o$ there exists a
$\ppt$ extractor $\ext$ such that
\[
\Pr \left[
\begin{aligned}
& \verify(\srs, c, x, y, o) = 1, \\
& \p{f} = \ext_\adv(\srs, c, (r_1, r_2)),\\
& c \neq \com(\srs, \p{f}) \\
\end{aligned}
\,\left|\,
\vphantom{
\begin{aligned}
& \\
& \\
&
\end{aligned}
}
\begin{aligned}
& \srs \gets \kgen(\secparam, \maxdeg),\\
& (c, \aux) \gets \adv_1(\srs; r_1), z \sample \FF, \\
& (y, o) \gets \adv_2(\srs, \aux, c, x; r_2)
\end{aligned}
\right.\right]
\leq \negl.
\]
In that case we say that $\PCOM$ is a commitment of knowledge.
\end{description}
Intuitively when a commitment scheme is a commitment of knowledge then if an
adversary produces a (valid) commitment $c$, which it can open, then it also
knows the underlying polynomial $\p{f}$ which commits to that value.
\markulf{23/08}{Wondering if the $\verify$ condition is really needed for extraction. In the AGM, if the adversary only sees the $\srs$ it has to output group element that is a linear combination of it.}
\michals{25.08}{You may be right that it is not necessary}
\antonio{19/10/2021}{I don't understand this definition. I think something is missing here: what's the rola of
$\adv_2$? how do we use $y,o$ in the event of the probability above? Is the commitment deterministic?}
\paragraph{KZG commitments}
We recall the Kate, Zaverucha, Goldberg polynomial commitment scheme $\Kzg$ \cite{AC:KatZavGol10}, which we use to instantiate our approach.
$\Kzg.\PC = (\Kzg.\kgen, \Kzg.\com, \Kzg.\open, \Kzg.\verify)$ is defined over bilinear groups $\gk=(p,\GG_1,\allowbreak \GG_2, \allowbreak \GG_T )$ with $\GG_1 =\langle g\rangle, \GG_2 =\langle h \rangle$ as follows:
\begin{description}%[topsep=5pt]
\item[$\Kzg.\kgen(1^\secpar, n) \to \srs$:] Set keys
$\srs = \{g^{\xi^i}\}_{i=0}^{n-1}, h^\xi$.
\item[$\Kzg.\CM(\srs; f(X)) \to c$:] For
$f(X) = \sum_{i=0}^{n-1} f_i X^i$, computes
$c=\prod _{i=0}^{n-1} g^{f_i \xi^i} = g^{f(\xi)} $.
\item[$\Kzg.\open(\srs; c, x, y; f(X)) \to o$:] For an evaluation point
$x$, a value $y$, compute the quotient polynomial
$q(X) = \displaystyle\frac{f(X) -y }{X-x}$ and output a proof
$o = \Kzg.\CM(\srs; q(X)) $.
\item[$\Kzg.\verify(\srs, c, x, y, o) \to 1/0$:] Check if
$e(c \cdot g^{-y}, h)=e(o , h^{\xi}\cdot h^{-x})$.
\end{description}
We also define new property for a polynomial commitment scheme,
\emph{binding}. Intuitively, a polynomial commitment scheme is binding if no
$\ppt$ adversary $\adv$ can produce a commitment $c$ and later show a pair
$(f, x, y, o)$, $(f', x, y', o')$ such that $f \neq f'$, $y = f(x)$ and $y' =
f'(x)$ and $o$, $o'$ are valid openings. That is, for all $\ppt$ adversaries
$\adv$
\[
\Pr\left[
\begin{aligned}
& \deg(f), \deg(f') \leq \maxdeg \\
&\land f(x) = y \land f'(x) = y' \land f
\neq f' \\
& \land \verify(\srs, c, x, y, o) = \verify(\srs, c, x, y', o') = 1
\end{aligned}
\,\left|\,
\begin{aligned}
& \srs \sample \kgen(\secparam), \\
& ((c, f, x, y, o), (c, f', x, y', o')) \gets \adv^{\oraclec}
\end{aligned}
\right.\right] \leq \negl
\]
\section{Simulation extractability of polynomial commitments}
\begin{definition}[Simulation extractable polynomial commitment]
\label{def:sepcom}
Let $\PCOM = (\kgen, \com, \open, \verify)$ be a polynomial commitment
scheme with a simulator $(\simgen, \simsample, \simopen)$. Let $\maxdeg$ be a maximal degree of polynomials that can be
committed. Let $\oraclec(c)$ be an oracle that when $Q_{chal}= \bot$, samples $x$, sets $Q_{chal}=(c,x)$ and $q_{{chal}}= |Q_{{op}}|$, and returns $x$. Otherwise it returns $\bot$.
Let $\oracles$ be an oracle which on input
\begin{description}
% \item [$(\msg{commit}, f)$:] returns commitment $c = \com(f)$ and adds $(f,
% c)$ to list $Q$.
\item[$(\msg{commit})$:] Run $c \gets \simsample(\secparam)$, add $c$ to $Q_{com}$, return $c$.
\item[$(\msg{open}, c, x', y)$:] If $c \in Q_{{com}}$ and $x'\neq x$, run
$o\gets \simopen(\td,c,x',y)$, \antonio{02.09}{It's not clear
what $x$ should be}\michals{16.11}{Explained later} add $(c,x',y,o)$ to $Q_{op}$, and return $o$. Otherwise
return $\bot$.
\end{description}
$Q_{sim}= (Q_{com},Q_{op})$.
We say that $\PCOM$ is \emph{simulation extractable} if for any $\ppt$
adversary $\adv$ with oracle access to $\oracles$ and $\oraclec$ there exists extractor
$\ext_{\adv}$ such that
\[
\Pr \left[
\begin{aligned}
& \verify(\srs, c, x, y, o) = 1, \\
& \;c \neq \com(\srs, \p{f})\\
\end{aligned}
\,\left|\,
\vphantom{
\begin{aligned}
& \\
& \\
& \\
&
\end{aligned}
}
\begin{aligned}
& (\srs, \td) \gets \simgen(\secparam, \maxdeg),\\
& (y, o) \gets \adv^{\oracles,\oraclec}(\srs; r), \\
& \p{f} \gets \ext_\adv(\srs, Q_{sim}, Q_{chal}; r)
% & z \sample \FF,\\
% & (s, o) \gets \adv^{\oracles}(\srs, z; r)
\end{aligned}
\right.\right]
\leq \negl.
\]
\markulf{2.09}{in that case the extractor would also have to output the randomness}
\michals{25.08}{minor thing -- we should allow the commitment scheme to be
randomizable}
\michals{16.11}{On PCOM randomization: should we ask the extractor to extract
commitment randomness as well or maybe we just require that the commiment $c$ is in
the image $IM(\com(f))$? I think the former suits better.}
% \[
% \Pr \left[
% \begin{aligned}
% & (\p{f} = \ext_\adv(\srs, Q_{sim}, Q_{chal}; r),\\
% & \;c = \com(\srs, \p{f}))\\
% & \lor \verify(\srs, c, x, y, o) = 0
% \end{aligned}
% \,\left|\,
% \vphantom{
% \begin{aligned}
% & \\
% & \\
% & \\
% &
% \end{aligned}
% }
% \begin{aligned}
% & (\srs, td) \gets \mathsf{SimGen}(\secparam, \maxdeg),\\
% & (y, o) \gets \adv^{\oracles,\oraclec}(\srs; r), \\
% % & z \sample \FF,\\
% % & (s, o) \gets \adv^{\oracles}(\srs, z; r)
% \end{aligned}
% \right.\right]
% \geq 1 - \epsk(\secpar).
% \]
\end{definition}
Note that when $\oraclec(c)$ has not been queried, $c$ and $x$ equal $\bot$ and $\verify$ returns $0$.
\paragraph{KZG is simulation extractable}
We consider an algebraic adversary $\adv$ that outputs a matrix $K$ with coefficients $\{C_{{1i}}\},\{C_{{2i}}\}, \{C_{{3ij}}\}$ for the commitment $c$ and $\{O_{{1i}}\},\{O_{{2i}}\}, \{O_{{3ij}}\}$ for the opening proof $o$. The matrix $K$ reconstructs $c,o$ as linear combination of the group elements in $\srs$ and $Q_{sim}$. We consider a representation of the group elements in $(\srs,Q_{{sim}})$ in terms of a function $\mathsf{Tr}_{\{x_{ij},y_{ij}\}}(\tau)$ of its underlying secret discrete logarithms $\tau=(\xi,\alpha_{i})$. Where $\xi$ is the trapdoor of the $\srs$ and the $\alpha_{i}$ are the randomness of simulated proofs.
\antonio{02.09}{Why are the $C_{3ij},O_{3ij}$ labeled with two indexes (both $i$ and $j$?)}
We move toward considering a verification equation $V'$ expressed in terms of $K$ and $\mathsf{Tr}_{\{x_{ij},y_{ij}\}}$ for which we have:
$\verify(\srs,c,x,y,o) = e(c \cdot g^{-y}, h) - e(\pi , h^{\alpha}\cdot h^{-x}) = 0$ iff $\verify'_{{\xi,x,y}}(K \cdot \mathsf{Tr}_{\{x_{ij},y_{ij}\}} (\tau)) = 0$.
We say that $\verify'_{{X,x,y}}$ is satisfied symbolically, if $\verify'_{{X,x,y}}(K \cdot \mathsf{Tr}_{\{x_{ij},y_{ij}\}} (T)) = 0$ for symbolic variables $T=(X, \{A_{i}\})$.
The symbolic transcript consists of the SRS $\{[X^{i}]_{1}\}, [X]_{2}$, simulated commitments $\{[A_{i}]_{1}$, and simulated opening proofs $ [\frac{A_{ij}-y_{{ij}}}{X-x_{ij}}]\}$.
The honest verification equation is
$[f(X) - y]_1 \bullet [h]_{2} - [q(X)]_1 \bullet [X-x]_{2}=0$ while an adversary can
provide rational functions
$f(X, \{A_{i}\}) = \sum C_{1i} X^{i} + \sum C_{2i} A_{i} + \sum C_{3ij}
\frac{A_{i}-y_{ij}}{X-x_{ij}}$ and
$q(X, \{A_{i}\}) = \sum O_{1i} X^{i} + \sum O_{2i} A_{i} + \sum O_{3ij}
\frac{A_{i}- y_{ij}}{X-x_{ij}}$ computed as linear combinations of elements in the
transcript.
The security game gives us that $x$ is sampled independently from $x_{ij}$ for $j\leq q^{i}_{chal}$ and $x \neq x_{ij}$ otherwise. Here $q^{i}_{chal}$ are the number of simulated opening queries made for commitment $c_{i}$ before the challenge query.
We inline to get the following equation which we then analyze in detail,
\begin{align*}
\left[\sum C_{1i} X^{i} + \sum C_{2i} A_{i} + \sum C_{3ij} \frac{A_{i}-y_{ij}}{X-x_{ij}} - y\right]_{1} \!\!\!\bullet\! [1]_{2} - \left[\sum O_{1i} X^{i} + \sum O_{2i} A_{i} + \sum O_{3ij} \frac{A_{i}-y_{ij}}{X-x_{ij}}\right]_{1} \!\!\!\bullet\! [X-x]_{2} = 0
\end{align*}
We now look at different (rational) monomials in $T$ of this equation to derive constraints on $C_{1i}, C_{{2i}},C_{{3ij}}$ and $O_{1i},O_{2i},O_{3ij}$ imposed by the verification equation:
\begin{itemize}
\item[$A_{i}X$:] We have that for all $i$, $O_{2i}=0$ as $O_{2i} A_{i} X = 0$.
\item[$\frac{A_{i}-y_{ij}}{X-x_{ij}}, j>q^{i}_{chal}$:] $C_{3ij}=0$ as $\adv$ did not yet see them when it computes the commitment.
\end{itemize}
To obtain a simplified verificaton equation, we express the equation in the exponent and write $C_{1}(X)$ for $\sum C_{1i} X^{i}$ and $O_{1}(X)$ for $\sum O_{1i} X^{i}$.
Furthermore, we let $x_{ij}= x+\delta_{ij}$ and replace $x$ with $x_{ij}-\delta_{ij}$
\antonio{02.09}{Minor: maybe better say "we let $\delta_{ij}:=x_{ij}-x$".}
\begin{align*}
C_{1}(X) - y - O_{i}(X)(X-x) + \sum C_{2i} A_{i} + \sum C_{3ij} \frac{A_{i}-y_{ij}}{X-x_{ij}} - O_{3ij} \frac{A_{i}-y_{ij}}{X-x_{ij}} (X-x_{ij}+\delta_{ij}) = 0\\
C_{1}(X) - y - O_{i}(X)(X-x) + \sum C_{2i} A_{i} + \sum C_{3ij} \frac{A_{i}-y_{ij}}{X-x_{ij}} - O_{3ij} \frac{A_{i}-y_{ij}}{X-x_{ij}} (X-x_{ij}) - O_{3ij} \frac{A_{i}-y_{ij}}{X-x_{ij}} \delta_{ij} = 0
\end{align*}
\markulf{2.09}{We require that $\delta_{ij} \neq 0$}
\begin{itemize}
\item[$\frac{A_{i}-y_{ij}}{X-x_{ij}}$:] $C_{3ij} \frac{A_{i}-y_{ij}}{X-x_{ij}} - O_{{3ij}}\delta_{ij} \frac{A_{i}-y_{ij}}{X-x_{ij}}=0$. As
$C_{3ij}=0$ for $j>q^{i}_{chal}$, it follows that $O_{{3ij}}=0$ for $j>q^{i}_{chal}$. Otherwise, we have $O_{3ij}= C_{3ij}/\delta_{ij}$.
\item[$A_{i}$:] $C_{2i} A_{i} - \sum O_{3ij} A_{i}=0$.
\end{itemize}
Informal step. $C_{2i}- \sum \frac{C_{3ij}}{x_{ij}-x} =0$ is a rational equation system in $x$. If $x_{ij}\neq x_{ij'}$, then the probability of randomly picking a solution $x$ is small unless all the $C_{2i}$, $C_{3ij}$ are $0$. Thus we also have $O_{{3ij}}=0$.
If $x_{ij} = x_{ij'}$ then the adversary requested openings on the same value for the same commitment (potentially for different $y_{ij}$) multiple times. This is something we want to exclude.
\begin{itemize}
\item[$X^{i}, i\geq 0$:] $C_{1}(X) - y - O_{1}(X)(X-x) + \sum \sum O_{3ij} y_{ij} = 0$, as $O_{3ij}=0$ we are back to the honest verification equation.
\end{itemize}
\begin{definition}[Vectored simulation extractable polynomial commitment]
\label{def:sepcom}
Let $\PCOM = (\kgen, \com, \open, \verify)$ be a polynomial commitment
scheme with a simulator $(\simgen, \simsample, \simopen)$. Let $\maxdeg$ be a maximal degree of polynomials that can be
committed.
We consider the same $\oracles$ and $Q_{sim}= (Q_{com},Q_{op})$ but an adversary that provides vectors of commitments and openings $\vec{c}, \vec{y}, \vec{o}$.
Let $\oraclec(\vec{c})$ be an oracle that when $Q_{chal}= \bot$, samples $x$, sets $Q_{chal}=(\vec{c},x)$ and $q_{{chal}}= |Q_{{op}}|$, and returns $x$. Otherwise it returns $\bot$
We say that $\PCOM$ is \emph{vector simulation extractable} if for any $\ppt$
adversary $\adv$ with oracle access to $\oracles$ and $\oraclec$ there exists extractor
$\ext_{\adv}$ such that
\[
\Pr \left[
\begin{aligned}
& \verify(\srs, \vec{c}, x, \vec{y}, \vec{o}) = 1, \\
& \;\vec{c} \neq \com(\srs, \vec{\p{f}})\\
\end{aligned}
\,\left|\,
\vphantom{
\begin{aligned}
& \\
& \\
& \\
&
\end{aligned}
}
\begin{aligned}
& (\srs, \td) \gets \simgen(\secparam, \maxdeg),\\
& (\vec{y}, \vec{o}) \gets \adv^{\oracles,\oraclec}(\srs; r), \\
& \vec{\p{f}} \gets \ext_\adv(\srs, Q_{sim}, Q_{chal}; r)
% & z \sample \FF,\\
% & (s, o) \gets \adv^{\oracles}(\srs, z; r)
\end{aligned}
\right.\right]
\leq \negl.
\]
\end{definition}
\paragraph{A simulation extractable polynomial commitment is also vectored SE.}
From $(\vec{y}, \vec{o}) \gets \adv^{\oracles,\oraclec}(\srs; r)$ we build $(y_{i}, o_{i}) \gets \adv_{i}^{\oracles,\oraclec'}(\srs; r)$ that output only the $i$th opening evaluation and opening proof.
On the same $r$ and $x$, whenever $\adv$ passes verification, $\adv_{i}$ passes verification. Thus by Definition 1 there exist extractors $\Ext_{\adv_{i}}$ that succeeds to extract for most $r$, $x$ and $\oracles$ randomness.
We build $\Ext_{\adv}(\srs, Q_{sim}, Q_{chal}; r)$ by parsing $Q_{chal}$ as $((c_{1},\dots, c_{k}), x)$ and running all $\Ext_{\adv_{i}}$ as $\p{f}_{i}\gets \Ext_{\adv_{i}}(\srs,Q_{sim},(c_{i},x); r)$ to return $(\p{f}_{1},\dots,\p{f}_{k})$.
\antonio{02.09}{I failed to understand the definition below :( }
\begin{definition}[Vectored $\ro_{aux}$ simulation extractable polynomial commitment]
\label{def:sepcom}
Let $\PCOM = (\kgen, \com, \open, \verify)$ be a polynomial commitment
scheme with a simulator $(\simgen, \simsample, \simopen)$. Let $\maxdeg$ be a maximal degree of polynomials that can be
committed.
We consider the same $\oracles$ and $Q_{sim}= (Q_{com},Q_{op})$ but an adversary that provides vectors of commitments and openings $\vec{c}, \vec{y}, \vec{o}$.
Let $\ro_{aux}(\vec{c},aux)$ be an oracle that when $Q_{\ro}[\vec{c},aux] = \bot$, samples $x$, sets $Q_{\ro}[\vec{c},aux]=x$ and $q_{{chal}}= |Q_{{op}}|$. In all cases, it returns $Q_{\ro}[\vec{c},aux]$.
We say that $\PCOM$ is \emph{vector $\ro_{aux}$ simulation extractable} if for any $\ppt$
adversary $\adv$ with oracle access to $\oracles$ and $\ro_{aux}$ there exists extractor
$\ext_{\adv}$ such that
\[
\Pr \left[
\begin{aligned}
& x \gets \ro_{aux}(\vec{c},aux), \\
& \verify(\srs, \vec{c}, x, \vec{y}, \vec{o}) = 1, \\
& \;\vec{c} \neq \com(\srs, \vec{\p{f}})\\
\end{aligned}
\,\left|\,
\vphantom{
\begin{aligned}
& \\
& \\
& \\
&
\end{aligned}
}
\begin{aligned}
& (\srs, \td) \gets \simgen(\secparam, \maxdeg),\\
& (aux,\vec{c},\vec{y}, \vec{o}) \gets \adv^{\oracles,\ro_{aux}}(\srs; r), \\
& \vec{\p{f}} \gets \ext_\adv(\srs, Q_{sim}, Q_{\ro}; r)
% & z \sample \FF,\\
% & (s, o) \gets \adv^{\oracles}(\srs, z; r)
\end{aligned}
\right.\right]
\leq \negl.
\]
\end{definition}
\paragraph{A vectored simulation extractable polynomial commitment is also vectored $\ro_{aux}$ SE.}
From $(aux, \vec{c}, \vec{y}, \vec{o}) \gets \adv^{\oracles,\ro_{aux}}(\srs; r)$ we build $(\vec{y},\vec{o}) \gets \adv_{i}^{\oracles,\oraclec}(\srs; r\|(Q_{\ro}\setminus x_{i}))$ that simulates $\ro_{aux}$ on the $i$th query using the value $x_{i}$ returned by $\oraclec$ and using its extended random tape otherwise.
On the same $r$ and $x$, whenever $\adv$ passes verification using $\vec{c},aux$ that were passed in the $i$th query to $\ro_{aux}$, then $\adv_{i}$ passes verification. Thus by Definition 2 there exist extractors $\Ext_{\adv_{i}}$ that succeeds to extract for most $r$, $x$ and $\oracles$ randomness under that condition.
We build $\Ext_{\adv}(\srs, Q_{sim}, Q_{\ro}; r)$ by running both $\adv$
internally by simulating $\oracles$ and $\ro_{aux}$ using $Q_{sim}$ and
$Q_{\ro}$, and by running all $\Ext_{\adv_{i}}$ as $\p{f}_{i}\gets
\Ext_{\adv_{i}}(\srs,Q_{sim},Q_{chal_{i}}; r\|(Q_{\ro}\setminus x_{i}))$ by
splitting $Q_{\ro}$ into $Q_{chal_{i}}$ and $Q_{\ro}\setminus x_{i}$ to return
$\p{f}_{i}$ whenever $\adv$ passed $\vec{c},aux$ in the $i$th query to
$\ro_{aux}$.
\iffalse
\begin{definition}[Simulation extractable polynomial commitment]
\label{def:sepcom}
Let $\PCOM = (\kgen, \com, \open, \verify)$ be a polynomial commitment
scheme. Let $\maxdeg$ be a maximal degree of polynomials that can be
committed, $H$ be a set of $\maxdeg + 1$ elements in $\FF$ and
$\van{H}$ is a vanishing polynomial for $H$.
Let $\oracles$ be an oracle which on input
\begin{description}
% \item [$(\msg{commit}, f)$:] returns commitment $c = \com(f)$ and adds $(f,
% c)$ to list $Q$.
\item[$(\msg{commit}, f, d)$:] for $\deg(f) = d'$, $d' \leq d \leq \maxdeg$,
picks $d - d'$ random elements $r_1, \ldots, r_{d - d'}$, sets
polynomial $g(X) = f(X) + \van{H}(r_1 X^{d' + 1} + \ldots + r_{d - d'} X^{d})$, returns
commitment $c = \com(g)$ and adds $(g, c)$ to list $\Qcom$.
\item[$(\msg{evaluate}, c, z)$:] returns $f(z)$ where $f$ is a polynomial
which commitment is $c$ and $(f, c) \in \Qcom$; add $z$ to $\Qev$.
\item[$(\msg{open}, c, x, y)$:] returns an opening $o$ for commitment $c$
assuring that for some polynomial $f$, such that $c \in \image(\com(f))$,
holds $f(x) = y$.
\end{description}
We say that $\PCOM$ is \emph{simulation extractable} if for any $\ppt$
adversary $\adv = (\adv_1, \adv_2)$ with oracle access to $\oracles$ there
exists extractor $\ext$ such that
\[
\Pr \left[
\begin{aligned}
& \p{f} = \ext_\adv(\srs, Q_{\adv}, (r_1, z, r_2)),\\
& c = \com(\srs, \p{f}),\\
& \verify(\srs, c, z, s, o) = 1,
\end{aligned}
\,\left|\,
\vphantom{
\begin{aligned}
& \\
& \\
& \\
&
\end{aligned}
}
\begin{aligned}
& \srs \gets \kgen(\secparam, \maxdeg),\\
& (c, \state) \gets \adv_1^{\oracles}(\srs; r_1), \\
& z \sample \FF, \\
& (s, o) \gets \adv_2^{\oracles}(\srs, c, z; \state, r_2)
\end{aligned}
\right.\right]
\geq 1 - \epsk(\secpar).
\]
\michals{23.04}{Can $\ext$ ask $\adv$ to give evaluations of the committed
polynomial? That is how $\ext$ in a proof system works -- it evaluates
polynomials submitted by the adversary on multiple challenges.}
\end{definition}
\markulf{17.08}{We can represent $\adv_{1}$ and $\adv_{2}$ using a single adversary $\adv_{\mathsf{chal}}$ with an additional oracle $\oraclec$ that on input $c$ returns $z$ on its single allowed call. The winning condition takes $c,z$ directly from that oracle call.}
\begin{definition}[$(k, \eps)$-aux-simulation extractable polynomial commitment]
\label{def:sepcom}
Let $\PCOM = (\kgen, \com, \open, \verify)$ be a polynomial commitment
scheme. Let $\maxdeg$ be a maximal degree of polynomials that can be
committed, $H$ be a set of $\maxdeg + 1$ elements in $\FF$ and
$\van{H}$ is a vanishing polynomial for $H$.
Let $\oracles$ be an oracle which on input
\begin{description}
\item[$(\msg{commit}, f, d)$:] for $\deg(f) = d'$, $d' \leq d \leq \maxdeg$,
picks $d - d'$ random elements $r_1, \ldots, r_{d - d'}$, sets
polynomial $g(X) = f(X) + \van{H}(r_1 X^{d' + 1} + \ldots + r_{d - d'} X^{d})$, returns
commitment $c = \com(g)$ and adds $(g, c)$ to list $\Qcom$.
\item[$(\msg{commit}, rand, d)$:] picks a random polynomial $f$ of degree $d$ and
outputs commitment $c = \com(f)$ and adds $(f, c)$ to the list $\Qcom$.
\item[$(\msg{evaluate}, c, z)$:] returns $f(z)$ where $f$ is a polynomial
which commitment is $c$ and $(f, c) \in \Qcom$; add $z$ to $\Qev$.
\item[$(\msg{open}, c, z, y)$:] returns an opening $o$ for commitment $c$
assuring that for some polynomial $f$, such that $c \in \image(\com(f))$,
holds $f(z) = y$.
\end{description}
We say that $\PCOM$ is \emph{$(k, \eps)$-aux-simulation extractable} if for
any $\ppt$ adversary $\adv$ with oracle access to
$\oracles$ and random oracle $\ro$ there exists extractor $\ext$ such that
\[
\Pr \left[
\begin{aligned}
& \p{f_1}, \ldots, \p{f_k} = \ext_\adv(\srs, Q_{\adv}, Q_{\ro}, r),\\
& c_i = \com(\srs, \p{f_i}),\\
& \verify(\srs, c_i, z_i, s_i o_i) = 1, \text{ for } i \in \range{1}{k}\\
& z = \ro((c_1,\dots, c_{k}),\aux)
\end{aligned}
\,\left|\,
\vphantom{
\begin{aligned}
& \\
& \\
& \\
&
\end{aligned}
}
\begin{aligned}
& \srs \gets \kgen(\secparam, \maxdeg),\\
& ((c_1, \ldots, c_k), \aux, z, (s_1, \ldots, s_k),\\
& \qquad \qquad (o_1, \ldots, o_k)) \gets \adv^{\oracles, \ro}(\srs, r), \\
\end{aligned}
\right.\right]
\geq 1 - \eps(\secpar).
\]
\end{definition}
\markulf{17.08}{
We show how to construct $ \ext_\adv$ from $|Q_{H}|$ extractors $\ext_{\bdv_{i}}$ obtained from adversaries $\bdv_{i}$ that run $\adv$ by simulating the random oracle internally using its random tape. Only for the $i$th $\ro$ query, does $\bdv_{i}$ submit the challenge $c$ to $\oraclec$ to learn $z$. As $\bdv_{i}$ is a valid $\adv_{\mathsf{chal}}$ adversary, by $k$ simulation extractability of the polynomial commitment scheme $\ext_{\bdv_{i}}$ exists. $\ext_{\adv}$ runs all $\ext_{\bdv_{i}}$ and thus does not occure an extraction loss for guessing $i$.
}
\fi
\iffalse
\begin{definition}[One-to-many openable\hl{Good name needed}]
We call a commitment scheme $\PCOM$ one-to-many openable \hl{good name
needed} if for any $\adv$ who outputs commitments $c_1, \ldots, c_k$,
evaluation point $z$, evaluations $s_1, \ldots, s_k$ and batch opening $o$,
which certifies that polynomials $f_i$ evaluates at $z$ to $s_i$ and
$c_i \in \image(\com(f_i))$, there exists $\ppt$ algorithm $\bdv$ that
produces valid openings $o_i$ for each triple $(c_i, z, s_i)$.
\end{definition}
Intuitively, we say that a polynomial commitment is one-to-many openable if we
can deduce that adversary who successfully batch opens a number of polynomial
commitments could also successfully open each of the commitments separately.
\michals{23.06}{That's easy for KZG batched as in Plonk (with minor difference)
-- just get a number of batch openings and do Gaussian elimination.}
\fi
\begin{definition}
\hl{The proof system and the polynomial commitment scheme use virtually the same
SRS. (Both SRS could differ in some efficiency related elements, but computation
of these don't require any secret knowledge)}
\michals{12.07}{Check how it is done in Lunar}
\antonio{29.07}{I think you might want to look at Pag 71 of Lunar's manuscript, Definition 20.}
\end{definition}
\subsection{Polynomial IOP}
\begin{definition}[Polynomial Holomorphic Proof System (PHP)]
\label{def:php}
Let $\REL$ be an indexed relation with a corresponding language $\LANG$, $\FF$
some finite field, $\maxdeg$ a degree bound, $\vereq_{\cdot}(X) \in \FF[X]$ a
verification equation, and $\eps, \noofp$ parameters.
\michals{12.07}{Continue}
\end{definition}
\begin{definition}[Witness encoding PHP (WEPHP)]
\label{def:wephp}
Let $\PS$ be a PHP. We say that $\PS$ is \emph{witness encoding} if there is
a function $\decode$ and set $\encset \in [\noofp]$ such that for any
$(\inp, \wit) \in \REL$ and polynomials $\smallset{f_i}_{i \in [\noofp]}$ sent by an
honest prover, $\decode(\smallset{f_i}_{i \in \encset}) = \wit$. We call $\encset$ the
\emph{encoding set}.
\end{definition}
In other words, PHP is witness encoding if for any valid proof for a statement
$\inp$ in the language, the corresponding witness can be read from the
polynomial coefficients. We note that this is the case for virtually all
PHPs. \michals{28.04}{Check!}
\antonio{27.07}{This definition reminded me that in Lunar we define straight-line extractability for PHP.
The straight-line extractability def is stronger than def above but I think that every "natural" PHP should
also be straight-line extractable. I copy-paste the definition below:}
%
\begin{definition}[PHPs with straight-line extractor]
\label{def:knownsound_wc_poly}
A $\PS$ is $\eps$-knowledge-sound with straight-line extractor if there exists an
extractor $\ext$ such that for any prover $\prover^*$, every field $\FF \in \Fam$,
relation $\REL$, and instance $\inp$:
\[ \Prob{ (\REL, \inp, \ext(\tuple\pora{\nprv})) \in \RELGEN}
\geq \Prob{ \brak{ \prover^*,\verifier^{\indexer(\FF, \REL)}(\FF, \inp) } = 1} - \eps
\]
where $\tuple\pora{\nprv}$ are the polynomials output by $\prover^*$ in an execution of
$\brak{\prover^*, \verifier^{\indexer(\FF, \REL)}(\FF, \inp)}$.
\end{definition}
\subsection{Simulation extractable NIZKs from simulation extractable polynomial
commitments}
\michals{25.08}{this section is old. Probably need to rewrite it after we are
sure that a similar result for Plonk holds.}
\begin{theorem}
Let $\PHP = (\PHP.\prover, \PHP.\verifier, \PHP.\simulator)$ be a ZK PHP
for $\REL$ with knowledge soundness error $\epsks$ where the prover sends up
to $\noofp$ polynomials. Let $\PCOM$ be $\eps(\secpar)$-sufficiently
simulatable polynomial commitment scheme for $\PS$ with extraction error
$\epsext$. Let $\PS = (\PS.\prover, \PS.\verifier, \PS.\simulator)$ be a proof system such
that
\begin{enumerate}
\item $\PS.\prover$ acts as $\PHP.\prover$, except
\begin{itemize}
\item when $\PHP.\prover$ sets up a polynomial oracle $\oracleo_f$,
$\PS.\prover$ sends commitment $c = \com(f)$;
\item when $\PS.\verifier$ asks $\PS.\prover$ to open a commitment
$c = \com(f)$ at $z$ it returns $f(z)$ and a proof $o$ of correctness of
the opening.
\end{itemize}
\item $\PS.\verifier$ acts as $\PHP.\verifier$, except when $\PHP.\verifier$
asks oracle $\oracleo_f$ for an evaluation of $f$ at $z$, $\PS.\verifier$
sends $z$ to $\PS.\prover$ and expects $f(z)$ in return.
\item $\PS.\simulator$ acts as $\PHP.\simulator$, except
\begin{itemize}
\item when $\PHP.\simulator$ sets up a polynomial oracle $\oracleo_f$,
$\PS.\simulator$ sends commitment $c = \com(f)$;
\item when $\PS.\verifier$ asks $\PS.\simulator$ to open a commitment
$c = \com(f)$ at $z$ it returns $f(z)$ and a proof $o$ of correctness of
the opening.
\end{itemize}
\end{enumerate}
Then $\PS$ is simulation extractable with extraction error at most \hl{...}.
\end{theorem}
\begin{proof}
From the simulation extractability of $\PCOM$ we will derive simulation
extractability of $\PS$ by constructing a $\PS$ extractor $\ext^{\PS}$ using
$\PCOM$ extractor $\ext^{\PCOM}$.
Let $\adv(\srs)$ be a $\PS$ adversary with oracle access to a $\PS$ simulator
$\simulator$. We show construction of an extractor $\ext^{\PS}$ which from
acceptable proof $\zkproof$ for instance $\inp$ output by $\adv$ produces
witness $\wit$ such that $\REL(\inp, \wit) = 1$. We proceed by game hoping.
\ngame{1} Let $\ext^{\PS}_\adv$ be an extractor for adversary $\adv$. In this
game the adversary is given oracle $\oraclesps$ and produces an instance
$\inp$ and proof $\zkproof$. $\adv$ wins if $\ext_\adv$ does not output the
corresponding witness $\wit$.
\ngame{2} In this game $\adv$'s access to $\oraclesps$ is substituted by
access to $\bdv^\oraclespcom$ which simulates $\oraclesps$.
Since $\PCOM$ is sufficiently simulatable for $\PS$, probability that $\adv$
wins in Game $\game{1}$ but not in $\game{2}$ (or vice-versa) is at most
$\eps(\secpar)$.
\medskip\noindent We now analyze the probability that $\adv$ wins in Game
$\game{2}$. Since $\PCOM$ is simulation extractable, there exists an extractor
$\ext_\bdv$ which extracts, for $i \in \range{1}{\noofp}$, polynomials $f_i$
if $\bdv$ output
\begin{inparaenum}[(1)]
\item commitment $c_i$ and $c_i \in \image(\com(f_i))$;
\item evaluations $s_i$ for evaluation points $z_i$ provided by the $\PS.\verifier$;
\item openings $o_i$;
\end{inparaenum}
\michals{28.06}{Stopped here -- we need more details of PHP to argue about
$\bdv$ returning a valid opening of commitment. Further we want to state
that if the proof was accepted then the commitments have been opened
successfully. If the proof system allow for batch opening, then still we can
open every single commitment.}
\end{proof}
\section{Simulation extractable NIZK from a simulation extractable polynomial
commitment and polynomial protocol}
Here we show that given a simulation extractable polynomial commitment scheme
and polynomial protocol one can use the polynomial protocol-to-NIZK compiler
from \cite{EPRINT:GabWilCio19} to get a simulation extractable NIZK. The idea of
the construction is following. First we observe that since the polynomial
commitment is simulation extractable then for every adversary $\bdv$ who, given
access to a polynomial commitment simulator oracle $\oraclespcom$, outputs a
vector of commitments $\vec{c} = (c_1, \ldots, c_\ell)$ and its valid opening $\vec{o}$ at random points
$\vec{z}$, there exists an
extractor $\ext_\bdv$ which, given
\begin{itemize}
\item $\bdv$'s code,
\item its randomness $r_\bdv$, and
\item auxiliary input $\aux_\bdv$, where $\aux_\bdv$ consists of all
$\oraclespcom$'s responses for $\bdv$ queries
\end{itemize}
outputs $\vec{f}$ such that $c_i \in \image(\com(f_i))$, for
$i \in \range{1}{\ell}$. Then we take a simulation-extractability adversary for
the compiled NIZK $\adv$ and build its corresponding extractor $\ext_\adv$ using
$\bdv$ and $\ext_\bdv$.
More precisely, we show that $\adv$'s access to $\oraclesps$ can be substituted
with some \emph{deterministic} algorithm $\bdv$ and $\oraclespcom$. We then
build $\ext_\adv$ using $\bdv$ and $\ext_\bdv$. To do that we need
to ``translate'' $\ext_\adv$'s inputs as $\ext_\bdv$'s inputs. From a high level
perspective this is achieved as follows:
\begin{description}
\item[$\bdv$'s code:] $\bdv$ code compounds of two elements: a subroutine that
runs $\adv$ and an overlay $\cdv$ that is responsible for providing $\adv$ with
simulated proofs using its access to $\oraclespcom$. More precisely on
$\adv$'s query to $\oraclesps$ $\cdv$ parses it as a set of $\oraclespcom$
queries, then it parses oracle's responeses to make a $\PS$ proof out of
them. Such proof is send back to $\adv$. Hence, $\bdv$'s code composes of code
of $\adv$ and some (publicly known and universal, i.e.~one for all $\adv$'s)
code of algorithm $\cdv$.
\item[$\bdv$'s randomness:] Since $\cdv$ is deterministic, we have
$r_\adv = r_\bdv$.
\item[Auxiliary input $\aux_\bdv$:] Since the simulated proofs from $\oraclesps$
collected in $\aux_\adv$ compounds of polynomial commitments, their evaluation
and openings, they can be naturally translated to a number of $\oraclespcom$
calls.
\end{description}
After the extractor $\ext_\bdv$ produces an output -- a vector of polynomials --
$\ext_\adv$ needs to parse it to its needs. To that end, it makes $\PS$'s proofs
out of them.
\begin{lemma}[Trapdoor-free simulatability of polynomial protocols.]
Let $\PS$ be a polynomial protocol with verification equation
\[
\vereq := G(X, h_1(v_1(X)), \ldots, h_\ell(v_\ell (X))) = 0.
\]
Assume that for all $i, j, k, l \in \range{1}{\ell}$, $a_j, a_{k, l} \in \FF$ holds
\[
h_i(v_i(X)) \neq a_j h_j(v_j(X)) + \sum_{k, l} a_{k, l} h_k(v_k (X)) h_l (v_l (X)),
\]
additionaly assume uber assumption \cite{}.
Then there exists simulator $\simulator$ such that for any $\ppt$ adversary
$\adv$
\[
\text{no polynomial adversary can distinguish the proofs -- computational ZK}
\]
\end{lemma}
\begin{proof}[draft]
The simulation idea is similar to the one presented in
\cite{EPRINT:CFFQR20}. When $\prover$ sends a polynomial commitment $c$ to
some polynomial $f$, the simulator picks a random commitment
$c_\simulator$. When all commitments have been submitted, the simulator
computes $ G(X, h_1(v_1(X)), \ldots, h_\ell(v_\ell (X)))$ and finds its root
$\chz$. Then it programs the random oracle to return $\chz$ as the polynomial
protocol challenge.
First, since the uber assumption holds, no $\ppt$ algorithm can tell
commitment to a randomly picked $f$ from a real one. \michals{28.07}{Here we
assume that $\PCOM$ is the KZG scheme but it should be generalizable to any
polynomial commitment.} Also, relaying on the same assumption, no $\ppt$
algorithm can tell evaluation of $f$ at a random point from an evaluation of a
random polynomial.
Furthermore, since the simulator picks $\chz$ such that verification equation
holds, the verifier accepts such proof. \michals{28.07}{Probably need to argue
that $\chz$, which the simulator picks also ``looks random''.}
\qed
\end{proof}
\begin{theorem}[From simulation extractable $\PCOM$ to simulation extractable $\nizk$.]
\end{theorem}
\begin{proof}
\qed
\end{proof}
\bibliographystyle{alpha}
\bibliography{cryptobib/abbrev1,cryptobib/crypto}
\appendix
\section{Additional assumptions}
\subsection{On uber assumption}
% \begin{definition}[$(F^1, \ldots, F^m)$-independent polynomial]
% Let $F^i = \smallset{f^i_1, \ldots, f^i_{k_i}}$, $i \in \range{1}{m}$, be
% families of polynomials. We say that $g$ is \emph{$2$-independent from
% $(F^1, \ldots, F^m)$} if
% \[
% a_g g(X) = \sum_{i = 1}^{m} \sum_{j_i = 1}^{k_i} a_{j_i} f_{j_i} + %
% \sum_{i = 1}^{m} \sum_{j_i, i_2}^{k_i, k_j} a_{i_1, i_2} f_{i_1} f_{i_2} +
% \ldots \sum_{i_1, \ldots, i_m}^{k, \ldots, k} a_{i_1, \ldots, i_m} f_{i_1}
% \ldots f_{i_m},
% \]
% only iff all coefficients $a_h$, $a_{i_1}$, $a_{i_1, i_2}$, \ldots, $a_{i_1},
% \ldots, a_{i_m}$ are zero.
% \end{definition}
% In this paper we consider only case of $m = 2$. For that case we ``fine tune''
% the definition above and allow two different families of polynomials that $h$ is
% independent from. That is,
\begin{definition}[$(F, G)$-independent polynomial]
Let $F = \smallset{f_1, \ldots, f_k}$, $G = \smallset{g_1, \ldots, g_l}$ be
families of polynomials. We say that $h$ is \emph{$(2, F, G)$-independent} if
\[
a_h h(X) = \sum_{i = 1}^{k} a_{i} f_{i} + \sum_{i}^l b_{i} g_i + \sum_{i, j}^{k, l} c_{i, j}
f_{i} g_{j},
\]
only iff all coefficients $a_h$, $a_{i}$, $b_i$, $c_{i, j}$ are zero.
\end{definition}
This definition is equivalen to definition of independent polynomials from
\cite{PAIRING:Boyen08}.
\begin{definition}[$2$-independent proof system]
Let $\PHP$ be a PHP proof system, and $F = \brak{f_1, \ldots, f_l}$
polynomials sent by the prover. Denote by
$F_{\neg i} = \brak{f_1, \ldots, f_{i - 1}, f_{i + 1}, \ldots, f_l}$. We say
that $\PHP$ is \emph{2-independent} \michals{25.08}{good name needed} if for all
$f_i \in F$, $f_i$ is $(F_{\neg i}, F_{\neg i})$-independent.
\end{definition}
For a family of polynomials $F = \smallset{f_1, \ldots, f_k}$ where each $f_i
\in \FF[X]$ we write $F(x)$ to denote $\smallset{f_1(x), \ldots, f_k(x)}$.
\begin{definition}[$(F, G)$-uber assumption, \cite{PAIRING:Boyen08}]
Let $h(X)$ be an
$(F = \smallset{f_1, \ldots, f_k}, G = \smallset{g_1, \ldots,
g_l})$-independent polynomial of degree $d$, and $r$ be a random polynomial
from $\FF^d[X]$. Then for any $\ppt$ adversary $\adv$
\begin{multline}
% \begin{split}
\Pr\left[ \adv(F(x), G(x), F \otimes G (x), r(x)) = 1 \,\left|\, x \sample \FF
\right.\right] \approx
\Pr\left[ \adv(F(x), G(x), F \otimes G (x), h(x)) = 1 \,\left|\, x \sample \FF
\right.\right].
% \end{split}
\end{multline}
\end{definition}
\michals{25.08}{Focus on a single ver eq, work later on multi ver eq case.}
\begin{lemma}[Simulatability of $2$-independent proof systems]
Let $\PHP$ \michals{25.08}{$\PHP$ or $\PS$?} be a $2$-independent proof system
\hl{...} Let $\pf_1(X), \ldots, \pf_k(X)$ be the polynomials that the prover
sends and $\vereq_i(X) = G_i(X, h_1(v_1(X)), \ldots, h_\ell (v_\ell(X)))$, for
$i \in \range{1}{m}$, be the set of verification equations \hl{...}
\end{lemma}
\begin{proof}
For a verification equation $\vereq_i(X)$ denote by $\p{F}_i$ all polynomials
that are required to compute $\vereq_i(X)$ and by $\pf_{j_i}$ the last
polynomial in $\p{F}_i$ send by the prover. Set
$L = \smallset{\pf_{j_1}, \ldots, \pf_{j_m}}$. \michals{25.08}{Need to adjust
in case some polynomial is ``last'' for more than one verification equation}
Assume $\pf_{j_i} = \pf_{j_{i'}}$, that is, there is some polynomial that is
the last polynomial for more than one verification equation. Assume
$\pf_{j_i}$ is sent by the prover no later than $\pf_{j_{i'}}$ then pick the
last polynomial from $\p{F}_{i} \setminus \smallset{\pf_{j_i}}$ and add it to
$L$. Continue till there is no The simulator proceeds as follows: If
$\pf_i \not\in L$ then $\simulator$ picks a random polynomial $\pf'_i(X)$ ans
sends it as $\pf_i$. Alternatively, if $\pf_{j_i} \in L$, then the simulator
computes
\[
\vereq_i(X)
\]
\end{proof}
\section{Additional definitions and results we may need at some point}
\begin{definition}[Somehow deterministic WEPHP]
\label{def:sdwephp}
Let $\PS$ be a WEPHP for $\REL$. For each polynomial $f_i$ sent by the prover
denote by $A_i$ the set of challenges sent by the verifier and by $F_i$ the
set of polynomials sent by the prover \emph{before} the prover sends
$f_i$. Let $\encset$ be an encoding set. We say that $\PS$ is \emph{somehow
deterministic} (SD) if for any $(\inp, \wit) \in \REL$, polynomials
$\smallset{f_i}_{i \in [\noofp]}$ send by the prover, and encoding set
$\encset \neq [\noofp]$ each polynomial
$f_j \in \smallset{f_i}_{i \in [\noofp] \setminus \encset}$ is determined by
\begin{itemize}
\item polynomials $F_j$, and
\item the verifier's challenges $A_i$, and
\item the witness $\wit$.
\end{itemize}
\end{definition}
Intuitively, we say that WEPHP is somehow deterministic if the only
non-deterministic messages send by the prover are polynomials encoding the
witness, and all other messages are determined by the previous one, witness, and
verifier's challenges.
\subsection{From PHP to zkPHP}
\michals{24.06}{Need to show how to get a ZK PHP from PHP}
\begin{theorem}[From WEPHP to ZK WEPHP]
Let $\PHP = (\prover, \verifier)$ be a WEPHP and $E$ its encoding set,
$\maxdeg$ be a maximal degree of polynomials sent by the prover; and
let $\PHP = (\prover', \verifier')$ be a WEPHP such that
\begin{itemize}
\item Both parties get as input a set of $\FF$ elements $H$, such that
$\abs{H} = \maxdeg + 1$. Denote the vanishing polynomial for $H$ by $\van{H}$.
\item $\prover'$ acts as $\prover$ except for $f_i(X) \in E$. Let $k_i$ be a
number of queries $\verifier$ makes to the oracle $\oracleo_{f_i}$ and
$d_i = \deg(f_i)$, then $\prover'$ computes
\[
g_i(X) = f_i(X) + \van{H}\left(X^{d_i + 1} b_1 + \ldots
X^{d_i + k_i + 1} b_{k_i + 1}\right)
\]
for random $b_1, \ldots, b_{k + 1}$ and sets oracle $\oracleo_{g_i}$.
\item $\verifier'$ acts as $\verifier$. \michals{28.06}{We don't want to
change the verifier and its equations -- that's why we have $\van{H}$.}
\end{itemize}
\end{theorem}
\antonio{29.07}{How can we choose the set $H$? In other words, how do we select an $H$ that
does not mess with the completeness or the soundness of the PHP?
Can we just say that if the original PHP checks $G(X,h_1(v_1(X)),...)=0$ then the new PHP
checks $G(X,h'_1(v_1(X)),\dots)$ where $h'_i(X)=h'_i(X)+V_H(X)r_i(X)$ for some randomly
chosen $r_i$? ($V_H$ is the vanishing poly at $H$) I guess completeness would hold for any
$H$ but not sure about soundness, right?}
\michals{18.08}{$H$ is given. Need to think about the second part of your question.}
\begin{proof}
\ncase{Completeness}
\ncase{Soundness}
\ncase{Zero-knowledge} To show the property we construct a simulator
$\simulator$ and argue that it produces proofs indistinguishable from proofs
of a real prover. The simulator behaves as real prover, except for
witness-encoding polynomials in $\smallset{f_i}_{i \in E}$. For
$f_j \in \smallset{f_i}_{i \in E}$, where it
\begin{itemize}
\item Picks randomizers $b_1, \ldots, b_{\noofq_j}$ and computes polynomial
$g_i(X) = \van{H}(b_1 X + \ldots b_{\noofq_j} X^{\noofq_j})$.
\item \michals{28.06}{The simulator can open the commitment to any value, but
he need to know *which* value}
\end{itemize}
\end{proof}