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.

146 lines
4.5 KiB

  1. \documentclass{article}
  2. \usepackage[utf8]{inputenc}
  3. \usepackage{amsfonts}
  4. \usepackage{amsthm}
  5. \usepackage{amsmath}
  6. \usepackage{mathtools}
  7. \usepackage{enumerate}
  8. \usepackage{hyperref}
  9. \usepackage{xcolor}
  10. % prevent warnings of underfull \hbox:
  11. \usepackage{etoolbox}
  12. \apptocmd{\sloppy}{\hbadness 4000\relax}{}{}
  13. \theoremstyle{definition}
  14. \newtheorem{definition}{Def}[section]
  15. \newtheorem{theorem}[definition]{Thm}
  16. % custom lemma environment to set custom numbers
  17. \newtheorem{innerlemma}{Lemma}
  18. \newenvironment{lemma}[1]
  19. {\renewcommand\theinnerlemma{#1}\innerlemma}
  20. {\endinnerlemma}
  21. \title{Notes on Nova}
  22. \author{arnaucube}
  23. \date{February 2023}
  24. \begin{document}
  25. \maketitle
  26. \begin{abstract}
  27. Notes taken while reading Nova \cite{cryptoeprint:2021/370} paper.
  28. Usually while reading papers I take handwritten notes, this document contains some of them re-written to $LaTeX$.
  29. The notes are not complete, don't include all the steps neither all the proofs.
  30. \end{abstract}
  31. \tableofcontents
  32. \section{Folding Scheme for Committed Relaxed R1CS}
  33. \subsection{R1CS modification}
  34. Want: merge 2 instances of R1CS with the same matrices into a single one. Each instance has $z_i = (W_i,~ x_i)$ (public witness, private values resp.).
  35. \paragraph{traditional R1CS}
  36. Merged instance with $z=z_1 + r z_2$, for rand $r$. But, since R1CS is not linear $\longrightarrow$ can not apply.
  37. eg.
  38. \begin{align*}
  39. Az \circ Bz &= A(z_1 + r z_2) \circ B (z_1 + r z_2)\\
  40. &= A z_1 \circ B z_1 + r(A z_1 \circ B z_2 + A z_2 \circ B z_1) + r^2 (A z_2 \circ B z_2)\\
  41. &\neq Cz
  42. \end{align*}
  43. $\longrightarrow$ introduce error vector $E \in \mathbb{F}^m$, which absorbs the cross-temrs generated by folding.
  44. $\longrightarrow$ introduce scalar $u$, which absorbs an extra factor of $r$ in $C z_1 + r^2 C z_2$ and in $z=(W, x, 1+r\cdot 1)$.
  45. \paragraph{Relaxed R1CS}
  46. \begin{align*}
  47. &u=u_1+r u_2\\
  48. &E=E_1 + r (A z_1 \circ B z_2 + A z_2 \circ B z_1 - u_1 C z_2 - u_2 C z_1) + r^2 E_2\\
  49. &Az \circ Bz = uCz + E,~~ with~ z=(W,~x,~u)
  50. \end{align*}
  51. where R1CS set $E=0,~u=1$.
  52. \begin{align*}
  53. Az \circ Bz &= A z_1 \circ B z_1 + r(A z_1 \circ B z_2 + A z_2 \circ B z_1) + r^2 (A z_2 \circ B z_2)\\
  54. &= (u_1 C z_1 + E_1) + r (A z_1 \circ B z_2 + A z_2 \circ B z_1) + r^2 (u_2 C z_2 + E_2)\\
  55. &= u_1 C z_1 + \underbrace{E_1 + r(A z_1 \circ B z_2 + A z_2 \circ B z_1) + r^2 E_2}_\text{E} + r^1 u_2 C z_2\\
  56. &= u_1 C z_1 + r^2 u_2 C z_2 + E\\
  57. &= (u_1 + r u_2) \cdot C \cdot (z_1 + r z_2) + E\\
  58. &= uCz + E
  59. \end{align*}
  60. For R1CS matrices $(A,~B,~C)$, the folded witness $W$ is a satisfying witness for the folded instance $(E,~u,~x)$.
  61. \vspace{20px}
  62. Problem: not non-trivial, and not zero-knowledge. Solution: use polynomial commitment with hiding, binding, succintness and additively homomorphic properties.
  63. \paragraph{Committed Relaxed R1CS}
  64. Instance for a Committed Relaxed R1CS\\
  65. $(\overline{E}, u, \overline{W}, x)$, satisfyied by a witness $(E, r_E, W, r_W)$ such that
  66. \begin{align*}
  67. &\overline{E} = Com(E, r_E)\\
  68. &\overline{W} = Com(E, r_W)\\
  69. &Az \circ Bz = uCz+E,~~ where~z=(W, x, u)
  70. \end{align*}
  71. \subsection{Folding protocol}
  72. V and P take two \emph{committed relaxed R1CS} instances
  73. \begin{align*}
  74. \varphi_1&=(\overline{E}_1, u_1, \overline{W}_1, x_1)\\
  75. \varphi_2&=(\overline{E}_2, u_2, \overline{W}_2, x_2)
  76. \end{align*}
  77. P additionally takes witnesses to both instances
  78. \begin{align*}
  79. (E_1, r_{E_1}, W_1, r_{W_1})\\
  80. (E_2, r_{E_2}, W_2, r_{W_2})
  81. \end{align*}
  82. Let $Z_1 = (W_1, x_1, u_1)$ and $Z_2 = (W_2, x_2, u_2)$.
  83. % \paragraph{Protocol}
  84. \begin{enumerate}
  85. \item P send $\overline{T} = Com(T, r_T)$,\\
  86. where $T=A z_1 \circ B z_1 + A z_2 \circ B z_2 - u_1 C z_2 - u_2 C z_2$\\
  87. and rand $r_T \in \mathbb{F}$
  88. \item V sample random challenge $r \in \mathbb{F}$
  89. \item V, P output the folded instance $\varphi = (\overline{E}, u, \overline{W}, x)$
  90. \begin{align*}
  91. &\overline{E}=\overline{E}_1 + r \overline{T} + r^2 \overline{E}_2\\
  92. &u = u_1 + r u_2\\
  93. &\overline{W} = \overline{W}_1 + r \overline{W}_2\\
  94. &x = x_1 + r x_2
  95. \end{align*}
  96. \item P outputs the folded witness $(E, r_E, W, r_W)$
  97. \begin{align*}
  98. &E = E_1 + r T + r^2 E_2\\
  99. &r_E = r_{E_1} + r \cdot r_T + r^2 r_{E_2}\\
  100. &W=W_1 + r W_2\\
  101. &r_W = r_{W_1} + r \cdot r_{W_2}
  102. \end{align*}
  103. \end{enumerate}
  104. P uses a zkSNARK showing that knows the valid witness $(E, r_E, W, r_W)$ for the committed relaxed R1CS without revealing its value.
  105. Then, vie Fiat-Shamir transform we achieve non-interactivity.
  106. \section{IVC proofs}
  107. \textbf{WIP}
  108. \bibliography{paper-notes.bib}
  109. \bibliographystyle{unsrt}
  110. \end{document}