You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

354 lines
13 KiB

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