math/hypernova-multifolding-slides.tex
hypernova-multifolding-slides.texRaw
1\documentclass{beamer}
2
3\mode<presentation>
4{
5 \usetheme{Frankfurt}
6 \usecolortheme{dove} %% grey scale
7 \useinnertheme{circles}
8 \setbeamercovered{transparent}
9}
10
11\hypersetup{
12 colorlinks,
13 citecolor=black,
14 filecolor=black,
15 linkcolor=black,
16 urlcolor=blue
17}
18\usepackage{graphicx}
19\usepackage{pgf-umlsd} % diagrams
20
21\setbeamertemplate{itemize}{$\circ$}
22\setbeamertemplate{itemize items}{$\circ$}
23
24\beamertemplatenavigationsymbolsempty %% no navigation bar
25
26\setbeamertemplate{footline}{\hspace*{.1cm}\scriptsize{
27\hspace*{50pt} \hfill\insertframenumber/\inserttotalframenumber\hspace*{.1cm}\vspace*{.1cm}}}
28
29\setbeamertemplate{caption}[numbered]
30\setbeamerfont{caption}{size=\tiny}
31
32% message between threads. From https://tex.stackexchange.com/a/174765
33% Example:
34% \bloodymess[delay]{sender}{message content}{receiver}{DIR}{start note}{end note}
35\newcommand{\bloodymess}[7][0]{
36 \stepcounter{seqlevel}
37 \path
38 (#2)+(0,-\theseqlevel*\unitfactor-0.7*\unitfactor) node (mess from) {};
39 \addtocounter{seqlevel}{#1}
40 \path
41 (#4)+(0,-\theseqlevel*\unitfactor-0.7*\unitfactor) node (mess to) {};
42 \draw[->,>=angle 60] (mess from) -- (mess to) node[midway, above]
43 {#3};
44
45 \if R#5
46 \node (\detokenize{#3} from) at (mess from) {\llap{#6~}};
47 \node (\detokenize{#3} to) at (mess to) {\rlap{~#7}};
48 \else\if L#5
49 \node (\detokenize{#3} from) at (mess from) {\rlap{~#6}};
50 \node (\detokenize{#3} to) at (mess to) {\llap{#7~}};
51 \else
52 \node (\detokenize{#3} from) at (mess from) {#6};
53 \node (\detokenize{#3} to) at (mess to) {#7};
54 \fi
55 \fi
56}
57
58
59
60%Information to be included in the title page:
61\title{HyperNova's multifolding overview}
62\author{}
63\date{\scriptsize{2023-06-22\\\href{https://0xparc.org}{0xPARC} Novi team}}
64
65\begin{document}
66
67\frame{\titlepage}
68
69\section[Overview]{Overview}
70
71\begin{frame}{Multifolding - Overview}
72
73 \begin{tiny}
74 \begin{enumerate}
75 \item[1.] $V \rightarrow P: \gamma \in^R \mathbb{F},~ \beta \in^R \mathbb{F}^s$
76 \item[2.] $V: r_x' \in^R \mathbb{F}^s$
77 \item[3.] $V \leftrightarrow P$: sum-check protocol:
78 $c \leftarrow \langle P, V(r_x') \rangle (g, s, d+1, \underbrace{\sum_{j \in [t]} \gamma^j \cdot v_j}_\text{T})$, where:
79 \begin{align*}
80 g(x) &:= \underbrace{\left( \sum_{j \in [t]} \gamma^j \cdot L_j(x) \right)}_\text{LCCCS check} + \underbrace{\gamma^{t+1} \cdot Q(x)}_\text{CCCS check}\\
81 L_j(x) &:= \widetilde{eq}(r_x, x) \cdot \left(
82 \underbrace{\sum_{y \in \{0,1\}^{s'}} \widetilde{M}_j(x, y) \cdot \widetilde{z}_1(y)}_\text{LCCCS check}
83 \right)\\
84 Q(x) := &\widetilde{eq}(\beta, x) \cdot \left(
85 \underbrace{ \sum_{i=1}^q c_i \cdot \prod_{j \in S_i} \left( \sum_{y \in \{0, 1\}^{s'}} \widetilde{M}_j(x, y) \cdot \widetilde{z}_2(y) \right) }_\text{CCCS check}
86 \right)
87 \end{align*}
88 \end{enumerate}
89 \end{tiny}
90
91\end{frame}
92
93\begin{frame}{Multifolding - Overview}
94
95 \begin{tiny}
96 \begin{enumerate}
97 \item[4.] $P \rightarrow V$: $\left( (\sigma_1, \ldots, \sigma_t), (\theta_1, \ldots, \theta_t) \right)$, where $\forall j \in [t]$,
98 $$\sigma_j = \sum_{y \in \{0,1\}^{s'}} \widetilde{M}_j(r_x', y) \cdot \widetilde{z}_1(y)$$
99 $$\theta_j = \sum_{y \in \{0, 1\}^{s'}} \widetilde{M}_j(r_x', y) \cdot \widetilde{z}_2(y)$$
100 \item[5.] V: $e_1 \leftarrow \widetilde{eq}(r_x, r_x')$, $e_2 \leftarrow \widetilde{eq}(\beta, r_x')$\\
101 check:
102 $$c = \left(\sum_{j \in [t]} \gamma^j \cdot e_1 \cdot \sigma_j \right) + \gamma^{t+1} \cdot e_2 \cdot \left( \sum_{i=1}^q c_i \cdot \prod_{j \in S_i} \theta_j \right)$$
103 \item[6.] $V \rightarrow P: \rho \in^R \mathbb{F}$
104 \item[7.] $V, P$: output the folded LCCCS instance $(C', u', \mathsf{x}', r_x', v_1', \ldots, v_t')$, where $\forall i \in [t]$:
105 \begin{align*}
106 C' &\leftarrow C_1 + \rho \cdot C_2\\
107 u' &\leftarrow u + \rho \cdot 1\\
108 \mathsf{x}' &\leftarrow \mathsf{x}_1 + \rho \cdot \mathsf{x}_2\\
109 v_i' &\leftarrow \sigma_i + \rho \cdot \theta_i
110 \end{align*}
111 \item[8.] $P$: output folded witness and the folded $r_w'$:
112 \begin{align*}
113 \widetilde{w}' &\leftarrow \widetilde{w}_1 + \rho \cdot \widetilde{w}_2\\
114 r_w' &\leftarrow r_{w_1} + \rho \cdot r_{w_2}
115 \end{align*}
116 \end{enumerate}
117 \end{tiny}
118
119\end{frame}
120
121
122
123\begin{frame}{Multifolding - Overview}
124 \begin{tiny}
125\begin{center}
126 \begin{sequencediagram}
127 \newinst[1]{p}{Prover}
128 \newinst[3]{v}{Verifier}
129
130 \bloodymess[1]{v}{$\gamma,~\beta,~r_x'$}{p}{L}{
131 \shortstack{
132 $\gamma \in \mathbb{F},~ \beta \in \mathbb{F}^s$\\
133 $r_x' \in \mathbb{F}^s$
134 }
135 }{}
136 \bloodymess[1]{p}{$c,~ \pi_{SC}$}{v}{R}{sum-check prove}{sum-check verify}
137 \bloodymess[1]{p}{$\{\sigma_j\},~\{\theta_j\}$}{v}{R}{compute $\{\sigma_j\}, \{\theta_j\}~ \forall j \in [t]$}{verify $c$ with $\{\sigma_j\}, \{\theta_j\}$ relation}
138 \bloodymess[1]{v}{$\rho$}{p}{L}{$\rho \in^R \mathbb{F}$}{}
139 \callself[0]{p}{fold LCCCS instance}{p}
140 \prelevel
141 \callself[0]{v}{fold LCCCS instance}{v}
142 \callself[0]{p}{fold $\widetilde{w}, r_w$}{p}
143 \end{sequencediagram}
144\end{center}
145 \end{tiny}
146\end{frame}
147
148
149\section[Checks]{Checks}
150
151\begin{tiny}
152\begin{frame}{LCCCS checks}
153$$
154\color{gray}{g(x) :=}
155\color{black}{\underbrace{\left( \sum_{j \in [t]} \gamma^j \cdot L_j(x) \right)}_\text{LCCCS} }
156\color{gray}{+ \gamma^{t+1} \cdot Q(x)}
157$$
158$$
159L_j(x) := \widetilde{eq}(r_x, x) \cdot \left(
160\underbrace{\sum_{y \in \{0,1\}^{s'}} \widetilde{M}_j(x, y) \cdot \widetilde{z}_1(y)}_\text{LCCCS check}
161\right)
162$$
163
164
165Notice that, $v_j$ from LCCCS relation check
166
167\begin{align*}
168v_j &= \sum_{y \in \{0,1\}^{s'}} \widetilde{M}_j(r_x, y) \cdot \widetilde{z}_1(y)\\
169 &= \sum_{x \in \{0,1\}^s}
170 \widetilde{eq}(r_x, x) \cdot \left( \sum_{y \in \{0,1\}^{s'}} \widetilde{M}_j(x, y) \cdot \widetilde{z}_1(y) \right)\\
171 &= \sum_{x \in \{0,1\}^s} L_j(x)
172\end{align*}
173
174\end{frame}
175\begin{frame}{CCCS checks}
176 $$
177 \color{gray}{g(x) := \left( \sum_{j \in [t]} \gamma^j \cdot L_j(x) \right) +}
178 \color{black}{\underbrace{\gamma^{t+1} \cdot Q(x)}_\text{CCCS}}
179 $$
180$$Q(x) := \widetilde{eq}(\beta, x) \cdot \left(
181 \underbrace{ \sum_{i=1}^q c_i \cdot \prod_{j \in S_i} \left( \sum_{y \in \{0, 1\}^{s'}} \widetilde{M}_j(x, y) \cdot \widetilde{z}_2(y) \right) }_\text{CCCS check}
182 \right)$$
183
184 Recall that Spartan's $\widetilde{F}_{io}(x)$ here is $q(x)$, so we're doing the same Spartan check:
185
186$$
1870 =G(\beta) = \sum_{x \in \{0,1\}^s} Q(x) = \sum_{x \in \{0,1\}^s} eq(\beta, x) \cdot q(x)$$
188$$= \sum_{x \in \{0,1\}^s}
189 \underbrace{\widetilde{eq}(\beta , x) \cdot
190 \overbrace{
191 \sum_{i=1}^q c_i \cdot \prod_{j \in S_i} \left( \sum_{y \in \{0, 1\}^{s'}} \widetilde{M}_j(x, y) \cdot \widetilde{z}_2(y) \right)
192 }^{q(x)}
193}_{Q(x)}
194$$
195
196\end{frame}
197
198
199\begin{frame}{Verifier checks}
200 \textcolor{gray}{
201Recall:
202$$g(x) := \left( \sum_{j \in [t]} \gamma^j \cdot L_j(x) \right) + \gamma^{t+1} \cdot Q(x)$$
203$$c = \left(\sum_{j \in [t]} \gamma^j \cdot e_1 \cdot \sigma_j \right) + \gamma^{t+1} \cdot e_2 \cdot \left( \sum_{i=1}^q c_i \cdot \prod_{j \in S_i} \theta_j \right)$$
204}
205
206We can see now that V's check in step 5,
207
208\begin{align*}
209 c &=
210\left( \sum_{j \in [t]} \gamma^j \cdot \overbrace{e_1 \cdot \sigma_j}^{L_j(r_x')} \right) + \gamma^{t+1} \cdot \overbrace{e_2 \cdot \sum_{i \in [q]} c_i \prod_{j \in S_i} \theta_j}^{Q(x)}\\
211&= \left( \sum_{j \in [t]} \gamma^j \cdot L_j(r_x') \right) + \gamma^{t+1} \cdot Q(r_x')\\
212&= g(r_x')
213\end{align*}
214
215where $e_1 = \widetilde{eq}(r_x, r_x')$, $e_2=\widetilde{eq}(\beta, r_x')$.
216\end{frame}
217\end{tiny}
218
219\section[Multiple instances]{Multiple instances}
220
221\begin{footnotesize}
222\begin{frame}{Multifolding multiple instances}
223Hypernova paper: $\mu=1, \nu=1$ \emph{(ie. 1 LCCCS instance and 1 CCCS instance)}
224
225\vspace{1cm}
226In next slides
227\begin{itemize}
228 \item example with: $\color{orange}{LCCCS: \mu = 2},~ \color{blue}{CCCS: \nu = 2}$
229 \item generalized equations for $\mu,~\nu$
230\end{itemize}
231
232Let $z_1,~ \color{orange}{z_2}$ be the two LCCCS instances, and $z_3,~ \color{blue}{z_4}$ be the two CCCS instances
233
234\end{frame}
235\end{footnotesize}
236
237\begin{tiny}
238\begin{frame}
239 In \emph{step 3},
240
241\begin{align*}
242 g(x) &:= \left( \sum_{j \in [t]} \gamma^j \cdot L_{1,j}(x) + \textcolor{orange}{\gamma^{t+j} \cdot L_{2,j}(x)} \right)
243+ \gamma^{2t+1} \cdot Q_1(x) + \textcolor{cyan}{\gamma^{2t+2} \cdot Q_2(x)} \\
244 &L_{1,j}(x) := \widetilde{eq}(r_{1,x}, x) \cdot \left(
245 \sum_{y \in \{0,1\}^{s'}} \widetilde{M}_j(x, y) \cdot \widetilde{z}_1(y)
246\right)\\
247 &\textcolor{orange}{L_{2,j}(x)} := \widetilde{eq}(\textcolor{orange}{r_{2,x}}, x) \cdot \left(
248 \sum_{y \in \{0,1\}^{s'}} \widetilde{M}_j(x, y) \cdot \textcolor{orange}{\widetilde{z}_2(y)}
249\right)\\
250 &Q_1(x) := \widetilde{eq}(\beta, x) \cdot \left(
251\sum_{i=1}^q c_i \cdot \prod_{j \in S_i} \left( \sum_{y \in \{0, 1\}^{s'}} \widetilde{M}_j(x, y) \cdot \widetilde{z}_3(y) \right)\right)\\
252 &\textcolor{cyan}{Q_2(x)} := \widetilde{eq}(\textcolor{cyan}{\beta}, x) \cdot \left(
253 \sum_{i=1}^q c_i \cdot \prod_{j \in S_i} \left( \sum_{y \in \{0, 1\}^{s'}} \widetilde{M}_j(x, y) \cdot \textcolor{cyan}{\widetilde{z}_4(y)} \right)\right)
254\end{align*}
255
256\framebox{\begin{minipage}{4.3 in}
257A generic definition of $g(x)$ for $\mu>1~\nu>1$, would be
258
259$$
260g(x) := \left( \sum_{i \in [\mu]} \left( \sum_{j \in [t]} \gamma^{i \cdot t+j} \cdot L_{i,j}(x) \right) \right)
261+ \left( \sum_{i \in [\nu]} \gamma^{\mu \cdot t + i} \cdot Q_i(x) \right)
262$$
263\end{minipage}}
264
265Recall, the original $g(x)$ definition was
266$$\textcolor{gray}{g(x) := \left( \sum_{j \in [t]} \gamma^j \cdot L_j(x) \right) + \gamma^{t+1} \cdot Q(x)}$$
267
268
269\end{frame}
270
271\begin{frame}
272 In \emph{step 4}, $P \rightarrow V$: $(\{\sigma_{1,j}\}, \textcolor{orange}{\{\sigma_{2,j}\}}, \{\theta_{1,j}\}, \textcolor{cyan}{\{\theta_{2,j}\}}),~ \text{where} ~\forall j \in [t]$,
273
274$$\sigma_{1,j} = \sum_{y \in \{0,1\}^{s'}} \widetilde{M}_j(r_x', y) \cdot \widetilde{z}_1(y)$$
275$$\textcolor{orange}{\sigma_{2,j}} = \sum_{y \in \{0,1\}^{s'}} \widetilde{M}_j(r_x', y) \cdot \textcolor{orange}{\widetilde{z}_2(y)}$$
276$$\theta_{1,j} = \sum_{y \in \{0, 1\}^{s'}} \widetilde{M}_j(r_x', y) \cdot \widetilde{z}_3(y)$$
277$$\textcolor{cyan}{\theta_{2,j}} = \sum_{y \in \{0, 1\}^{s'}} \widetilde{M}_j(r_x', y) \cdot \textcolor{cyan}{\widetilde{z}_4(y)}$$
278
279\framebox{\begin{minipage}{4.3 in}
280 so in a generic way,\\
281$P \rightarrow V$:
282$(\{\sigma_{i,j}\}, \{\theta_{k,j}\}),~ \text{where} ~\forall~ j \in [t],~ \forall~ i \in [\mu],~ \forall~ k \in [\nu]$
283where
284$$\sigma_{i,j} = \sum_{y \in \{0,1\}^{s'}} \widetilde{M}_j(r_x', y) \cdot \widetilde{z}_i(y)$$
285$$\theta_{k,j} = \sum_{y \in \{0, 1\}^{s'}} \widetilde{M}_j(r_x', y) \cdot \widetilde{z}_{\mu+k}(y)$$
286\end{minipage}}
287
288\end{frame}
289
290\begin{frame}
291 And in \emph{step 5}, $V$ checks
292
293\begin{align*}
294 c &= \left(\sum_{j \in [t]} \gamma^j \cdot e_1 \cdot \sigma_{1,j}
295~\textcolor{orange}{+ \gamma^{t+j} \cdot e_2 \cdot \sigma_{2,j}}\right)
296 + \gamma^{2t+1} \cdot e_3 \cdot \left( \sum_{i=1}^q c_i \cdot \prod_{j \in S_i} \theta_j \right)
297 + \textcolor{cyan}{\gamma^{2t+2} \cdot e_4 \cdot \left( \sum_{i=1}^q c_i \cdot \prod_{j \in S_i} \theta_j \right)}
298\end{align*}
299
300where
301$e_1 \leftarrow \widetilde{eq}(r_{1,x}, r_x'),~ e_2 \leftarrow \widetilde{eq}(r_{2,x}, r_x')$, $e_3, e_4 \leftarrow \widetilde{eq}(\beta, r_x')$.
302
303\vspace{0.5cm}
304
305\framebox{\begin{minipage}{4.3 in}
306A generic definition of the check would be
307$$
308c = \sum_{i \in [\mu]} \left(\sum_{j \in [t]} \gamma^{i \cdot t + j} \cdot e_i \cdot \sigma_{i,j} \right) \\
309+ \sum_{k \in [\nu]} \gamma^{\mu \cdot t+k} \cdot e_k \cdot \left( \sum_{i=1}^q c_i \cdot \prod_{j \in S_i} \theta_{k,j} \right)
310$$
311\end{minipage}}
312
313where the original check was\\
314$\textcolor{gray}{c = \left(\sum_{j \in [t]} \gamma^j \cdot e_1 \cdot \sigma_j \right) + \gamma^{t+1} \cdot e_2 \cdot \left( \sum_{i=1}^q c_i \cdot \prod_{j \in S_i} \theta_j \right)}$
315
316\end{frame}
317
318\begin{frame}
319And for the \emph{step 7},
320\begin{align*}
321 C' &\leftarrow C_1 + \rho \cdot C_2 + \rho^2 C_3 + \rho^3 C_4 + \ldots = \sum_{i \in [\mu + \nu]} \rho^i \cdot C_i \\
322 u' &\leftarrow \sum_{i \in [\mu]} \rho^i \cdot u_i + \sum_{i \in [\nu]} \rho^{\mu + i-1} \cdot 1\\
323 \mathsf{x}' &\leftarrow \sum_{i \in [\mu+\nu]} \rho^i \cdot \mathsf{x}_i\\
324 v_i' &\leftarrow \sum_{i \in [\mu]} \rho^i \cdot \sigma_i + \sum_{i \in [\nu]} \rho^{\mu + i-1} \cdot \theta_i\\
325\end{align*}
326
327and \emph{step 8},
328\begin{align*}
329 \widetilde{w}' &\leftarrow \sum_{i \in [\mu+\nu]} \rho^i\cdot \widetilde{w}_i\\
330 r_w' &\leftarrow \sum_{i \in [\mu+\nu]} \rho^i \cdot r_{w_i}\\
331\end{align*}
332
333\end{frame}
334
335\end{tiny}
336
337\section[Wrappup]{Wrappup}
338
339\begin{frame}
340\frametitle{Wrappup}
341\begin{itemize}
342 \item HyperNova: \href{https://eprint.iacr.org/2023/573}{https://eprint.iacr.org/2023/573}
343 \item multifolding PoC on arkworks: \href{https://github.com/privacy-scaling-explorations/multifolding-poc}{github.com/privacy-scaling-explorations/multifolding-poc}
344\end{itemize}
345
346\vspace{2cm}
347\tiny{
348 $$\text{2023-06-22}$$
349 $$\text{\href{https://0xparc.org}{0xPARC} Novi team}$$
350}
351\end{frame}
352
353\end{document}