-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathzksummit12.tex
272 lines (244 loc) · 10 KB
/
zksummit12.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
\documentclass[shadesubsections,compress,14pt,mathserif]{beamer}
\usepackage[danish]{babel}
\usepackage{tikz,circuitikz}
\usetikzlibrary{shapes, positioning}
\usenavigationsymbolstemplate{}
\usepackage{xcolor,pgfplots}
\usepackage[absolute,overlay]{textpos}
\usepackage{amsthm,amsfonts}
%\usepackage[T1]{fontenc}
% \usepackage{fullpage}
% Dokumentets sprog
%\usepackage{mathtools}
%\usepackage{pxfonts}
\usepackage{eulervm}
\usepackage[export]{adjustbox}
\everymath{\color{purple}}
\definecolor{darkred}{rgb}{0.75, 0, 0.25}
% Class options include: notes, notesonly, handout, trans,
% hidesubsections, shadesubsections,
% inrow, blue, red, grey, brown
% Theme for beamer presentation.
%\usepackage{beamertheme}
% Other themes include: beamerthemebars, beamerthemelined,
% beamerthemetree, beamerthemetreebars
\newcommand{\minus}{\scalebox{0.5}[1.0]{\( - \)}}
\newcommand{\adv}{\ensuremath{\mathcal A}}
\newcommand{\F}{\ensuremath{{\mathbb F}}}
\newcommand{\G}{\ensuremath{{\mathbb G}}}
\renewcommand{\P}{\ensuremath{{\mathbb P}}}
\newcommand{\Z}{\ensuremath{{\mathbb Z}}\xspace}
\newcommand{\Fclosure}{\ensuremath{{\overline{\mathbb{F}}}_p}}
\newcommand{\set}[1]{\ensuremath{\left\{#1\right\}}}
\newcommand{\bin}{\ensuremath{\set{0,1}}}
\newcommand{\cube}{\ensuremath{\bin^n}}
\newcommand{\sett}[2]{\ensuremath{\left\{#1\right\}_{#2}}}
\newcommand{\enc}[1]{\ensuremath{\left[#1\right ]}}
% \newcommand{\kzg}[1]{\ensuremath{\enc{#1(x)}}}
\newcommand{\cm}{\ensuremath{\mathsf{cm}}}
\newcommand{\kzg}[1]{\cm(#1)}
\newcommand{\open}[1]{\ensuremath{\mathsf{open}(#1)}}
\newcommand{\verify}[1]{\ensuremath{\mathsf{verify}(#1)}}
\newcommand{\defeq}{\ensuremath{:=}}
\newcommand{\helper}{\ensuremath{\mathcal{H}}}
\newcommand{\ver}{\ensuremath{\mathcal{V}}}
\newcommand{\prv}{\ensuremath{\mathcal{P}}}
\newcommand{\polysofdeg}[1]{\F_{< #1}[X]}
% \newcommand{\endoss}{\ensuremath{\mathrm{END}_E}}
\newcommand{\hl}[1]{\textbf{\textit{#1}}}
\newcommand{\polys}{\F[X]}
\newcommand{\acc}{{\mathbf{acc}}}
\newcommand{\rej}{{\mathbf{rej}}}
\newcommand{\ideal}{\mathbf{I}}
\newcommand{\gen}{\alpha}
\newcommand{\spac}{\\ \vspace{0.2in} \noindent}
\newcommand{\polylog}{\ensuremath{\mathsf{polylog}}\xspace}
% \renewcommand{\bf}{\begin{frame}}
% \newcommand{\ef}{\end{frame}}
%\setbeamersize{text margin left=3mm,text margin right=3mm}
\newcommand{\nl}{\\ \pause \vspace{0.2in}}
\newcommand{\nlnp}{\\ \vspace{0.2in}}
\newcommand{\stitle}[1]{{\large{\textcolor{purple}{\emph{#1}}}}}
\DeclareMathAlphabet{\mathpgoth}{OT1}{pgoth}{m}{n}
\newcommand{\cq}{\mathpgoth{cq} }
\newcommand{\cqstar}{\ensuremath{\mathpgoth{cq^{\mathbf{*}} }}\xspace}
\newcommand{\flookup}{\ensuremath{\mathsf{\mathpgoth{Flookup}}}\xspace}
\newcommand{\baloo}{\ensuremath{\mathrm{ba}\mathit{loo}}\xspace}
% \newcommand{\caulkp}{\ensuremath{\mathsf{\mathrel{Caulk}\mathrel{\scriptstyle{+}}}}\xspace}
\newcommand{\caulk}{\ensuremath{\mathsf{Caulk}}\xspace}
\newcommand{\plookup}{\ensuremath{\mathpgoth{plookup}}\xspace}
\newcommand{\srs}{\ensuremath{\mathsf{srs}}}
\newcommand{\tablegroup}{\ensuremath{\mathbb{H}}\xspace}
\newcommand{\V}{\ensuremath{\mathbf{V} }\xspace}
\newcommand{\zfin}{\ensuremath{z_{\mathrm{final}}}}
\newcommand{\rel}{\ensuremath{\mathcal{R}}}
\newcommand{\vk}{\ensuremath{\mathrm{vk} }}
\newcommand{\repr}{\ensuremath{\mathrm{repr} }}
\newcommand{\numreads}{\ensuremath{\mathbf{numreads} }}
\newcommand{\add}{\ensuremath{\mathbf{add} }}
\newcommand{\adds}{\ensuremath{\mathbf{adds} }}
\newcommand{\cnt}{\ensuremath{\mathpgoth{t} }}
\newcommand{\addcount}{\ensuremath{\mathpgoth{at} }}
\renewcommand{\read}{\ensuremath{\mathbf{read} }}
\newcommand{\reads}{\ensuremath{\mathbf{reads} }}
\renewcommand{\note}{\ensuremath{\mathfrak{n} }}
\newcommand{\vknext}{\ensuremath{\mathrm{vk_{next}} }}
\newcommand{\vkcur}{\ensuremath{\mathrm{vk_{cur}} }}
\newcommand{\args}{\ensuremath{\mathrm{args} }}
\newcommand{\stack}{\ensuremath{\mathsf{stack} }}
\newcommand{\argscur}{\ensuremath{\mathrm{args_{cur}} }}
\newcommand{\argsnext}{\ensuremath{\mathrm{args_{next}} }}
% \newcommand{\caulk}{{\mathsf{Caulk}}}
% \newcommand{\caulkp}{{\mathsf{\mathrel{Caulk}\mathrel{\scriptstyle{+}}}}}
\newcommand{\bigspace}{\ensuremath{\mathbb{V}}}
%\setbeamersize{text margin left=3mm,text margin right=3mm}
\title{\large{From IVCs to RCGs}} % Enter your title between curly braces
\author{\small{Ariel Gabizon}\\ % Enter your name between curly braces
\tt{\footnotesize{Aztec Labs} } } % Enter your institute name between curly braces
\date{} % Enter the date or \today between curly braces
%\usefonttheme{professionalfonts}
%\usefonttheme[onlymath]{serif}
\begin{document}
\boldmath
% Creates title page of slide show using above information
\begin{frame}
\titlepage
\end{frame}
\begin{frame}
\frametitle{Outline}
\begin{itemize}
\item The Aztec Smart Contract system
\item RCG
\item Global state via log derivative
\item A theoretical issue
\end{itemize}
\end{frame}
\begin{frame}
\frametitle{The Aztec Private Smart Contract System}
A \emph{contract} has functions - represented by \emph{verification keys} .\nlnp
$A - \vk_A$\\
$B - \vk_B$\nl
Function contracts can
\begin{itemize}
\item call other functions in same/other contract
\end{itemize}
\end{frame}
\begin{frame}
\frametitle{How do circuits ``call each other''?}\pause
\textbf{Example:} Want to prove execution of\nlnp
$A(\args_A)\{$\\
\;\;\;\;..\\
\;\;\;\;..\\
\;\;\;\;$B(\args_B);$\\
\;\;\;\;..\\
\;\;\;\;..\\
$\}$\pause
\textit{Idea: $A$'s public input will contain $\vk_B$ and $\args_B$}
\end{frame}
\begin{frame}
\frametitle{How do circuits ``call each other''?}
% \textit{Idea: $A$'s public input will contain $\vk_B$ and $\args_B$}\\
% $x_A=(\args_A,\vk_B,\args_B)$\\
% $x_B=(\args_B)$\nl
Construct proofs -
\begin{itemize}
\item$\pi_A$ for $A$ with public input $x_A=(\args_A,\vk_B,\args_B)$\pause
\item$\pi_B$ for $B$ with public input $x_B=(\args_B)$\nl
\end{itemize}
$\ver$ checks
\begin{itemize}
\item
$(x_A,\pi_A)$ with $\vk_A$\\
\item $(x_B,\pi_B)$ with $\vk_B$\nl
\end{itemize}
\emph{As $\ver$ enforces $\args_B,\vk_B$ used are \emph{the same} in both checks - corresponds to $A$ ``calling'' $B$. }
\end{frame}
\begin{frame}
\frametitle{Casting as IVC of a fixed function:}
$\underline{F(\vkcur,x=(\argscur,\vknext,\argsnext),\pi,\stack)}:$\pause
\begin{enumerate}
\item Check $(\vkcur,\argscur)$ is top element in $\stack$ and pop it off.\pause
\item Check that $\ver(\vkcur,x,\pi)=\acc$.\pause
\item Push $(\vknext,\argsnext)$ to top of \stack.
\end{enumerate}
\end{frame}
\begin{frame}
\frametitle{ But we forgot global state! }
A \emph{contract} has functions - represented by \emph{verification keys} .\nlnp
$A - \vk_A$\\
$B - \vk_B$\nlnp
{\textcolor{red}{and \emph{notes} representing its state:}}\\
$\note_1$\\
$\note_2$\nl
Function contracts can
\begin{itemize}
\item call other functions in same/other contract
\item \textcolor{red}{add/read/delete contract notes}
\end{itemize}
\end{frame}
\begin{frame}
\frametitle{Global State}
We add the note operations \emph{with time stamps} to the public inputs:
\begin{itemize}
\item $x_A=(\args_A,\vk_B,\args_B,[\read,\note,8])$
\item $x_B=(\vk_B,\args_B,[\add,\note,3])$\nl
\end{itemize}
\emph{Problem:} When verifying proof for $A$ we don't know whether in a future IVC iteration we'll see $\note$ created with earlier timestamp.\nl
{\fontfamily{garamond}\selectfont ``Order of proving is different than order of execution''}
\end{frame}
\begin{frame}
\frametitle{RCG - Repeated Computation with Global state}
Like IVC...but\pause
\begin{itemize}
\item Computation ends before proving starts.\pause
\item Prover memory allowed to depend on size of global state in addition to memory for one iteration.
\end{itemize}
\end{frame}
\begin{frame}
\frametitle{RCG - Simplified dfn}\pause
\noindent
\begin{itemize}
\item \emph{Transition predicate:} $F\to \{\acc,\rej\}$.
\item \emph{Final predicate:} $f\to \set{\acc,\rej}$.\pause
\end{itemize}
The RCG relation $\rel_{F,f}$ consists of pairs $(X,W)$
$X=(\zfin,n),W=(z=(z_0,\ldots,z_n),$ $w=(w_1\ldots,w_n),s=(s_1,\ldots,s_n))$ such that\pause
\begin{itemize}
\item $z_n=\zfin$.\pause
\item For each $i\in [n]$, $F(z_{i-1},w_i,z_i,s_i)=\acc$.\pause
\item $f(s_1,\ldots,s_n)=\acc$.\pause
\end{itemize}
We say a zk-SNARK for $\rel_{F,f}$ is \emph{space-efficient} if $\prv$ requires space $\sim$ $O(|F|+|s|)$.
\end{frame}
\begin{frame}
\frametitle{ D\'ej\`a vu from previous talk: Memory checks with log-derivative {\small [Eagen22, Hab{\"{o}}ck22]}}
In $\add$ op, add the number of times $\note$ is read
$a=(\add,\note,\cnt,\numreads)$\nl
In $\read$ op, add the timestamp $\addcount$ of $\note$'s addition.
$r=(\read,\note,\addcount,\cnt)$.\nl
\begin{itemize}
\item For each read $r$ we check that $\addcount<\cnt$.\pause
\item Prover hashes note operations from all function calls to get challenge $\beta\in \F$.\pause
\item Final predicate will check that
\[\textcolor{darkred}{\sum_{r\in \reads} \frac{1}{\note + \beta \cdot \addcount} = \sum _{a\in \adds}\frac{\numreads}{\note+\beta \cdot \cnt}} \]
\end{itemize}
\end{frame}
\begin{frame}
\frametitle{Theoretical interlude - The recursive Algebraic Model {\small [LS23]}}
AGM{\small [FKL]} - Given SRS $v\in \G^n$,
when $\adv$ outputs $a\in \G$ it must output
$c\in \F^n$ such that $a=\sum_{i=1}^n c_i v_i$.\nl
Fix in advance $\repr:\G\to \F^2$.\nl
What if for some $i<n$, $(c_i,c_{i+1}) = \repr(b)$ for some $b\in \G$?\\ \pause
Then a \emph{recursive algebraic adversary} must also output $c'\in \F^n$ with
$b=\sum_{i=1}^n c'_i v_i$.\nl
\textbf{Is this legit?}
\end{frame}
\begin{frame}
For more details see:
\begin{figure}
\includegraphics[width=260pt]{stackproofs.png}
\end{figure}
\end{frame}
%
\end{document}