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.

145 lines
5.0 KiB

  1. \documentclass{article}
  2. \usepackage[utf8]{inputenc}
  3. \usepackage{amsfonts}
  4. \usepackage{amsthm}
  5. \usepackage{amsmath}
  6. \usepackage{enumerate}
  7. \usepackage{hyperref}
  8. \hypersetup{
  9. colorlinks,
  10. citecolor=black,
  11. filecolor=black,
  12. linkcolor=black,
  13. urlcolor=blue
  14. }
  15. \usepackage{xcolor}
  16. % prevent warnings of underfull \hbox:
  17. \usepackage{etoolbox}
  18. \apptocmd{\sloppy}{\hbadness 4000\relax}{}{}
  19. \theoremstyle{definition}
  20. \newtheorem{definition}{Def}[section]
  21. \newtheorem{theorem}[definition]{Thm}
  22. \title{Notes on Halo}
  23. \author{arnaucube}
  24. \date{July 2022}
  25. \begin{document}
  26. \maketitle
  27. \begin{abstract}
  28. Notes taken while reading Halo paper \cite{cryptoeprint:2019/1021}. 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{modified IPA (from Halo paper)}
  33. Notes taken while reading about the modified Inner Product Argument (IPA) from the Halo paper \cite{cryptoeprint:2019/1021}.
  34. \subsection{Notation}
  35. \begin{description}
  36. \item[Scalar mul] $[a]G$, where $a$ is a scalar and $G \in \mathbb{G}$
  37. \item[Inner product] $<\overrightarrow{a}, \overrightarrow{b}> = a_0 b_0 + a_1 b_1 + \ldots + a_{n-1} b_{n-1}$
  38. \item[Multiscalar mul] $<\overrightarrow{a}, \overrightarrow{b}> = [a_0] G_0 + [a_1] G_1 + \ldots [a_{n-1}] G_{n-1}$
  39. \end{description}
  40. \subsection{Transparent setup}
  41. $\overrightarrow{G} \in^r \mathbb{G}^d$, $H \in^r \mathbb{G}$
  42. Prover wants to commit to $p(x)=a_0$
  43. \subsection{Protocol}
  44. Prover:
  45. $$P=<\overrightarrow{a}, \overrightarrow{G}> + [r]H$$
  46. $$v=<\overrightarrow{a}, \{1, x, x^2, \ldots, x^{d-1} \} >$$
  47. where $\{1, x, x^2, \ldots, x^{d-1} \} = \overrightarrow{b}$.
  48. We can see that computing $v$ is the equivalent to evaluating $p(x)$ at $x$ ($p(x)=v$).
  49. We will prove:
  50. \begin{enumerate}[i.]
  51. \item polynomial $p(X) = \sum a_i X^i$\\
  52. $p(x) = v$ (that $p(X)$ evaluates $x$ to $v$).
  53. \item $deg(p(X)) \leq d-1$
  54. \end{enumerate}
  55. Both parties know $P$, point $x$ and claimed evaluation $v$. For $U \in^r \mathbb{G}$,
  56. $$P' = P + [v] U = <\overrightarrow{a}, G> + [r]H + [v] U$$
  57. Now, for $k$ rounds ($d=2^k$, from $j=k$ to $j=1$):
  58. \begin{itemize}
  59. \item random blinding factors: $l_j, r_j \in \mathbb{F}_p$
  60. \item
  61. $$L_j = < \overrightarrow{a}_{lo}, \overrightarrow{G}_{hi}> + [l_j] H + [< \overrightarrow{a}_{lo}, \overrightarrow{b}_{hi}>] U$$
  62. $$L_j = < \overrightarrow{a}_{lo}, \overrightarrow{G}_{hi}> + [l_j] H + [< \overrightarrow{a}_{lo}, \overrightarrow{b}_{hi}>] U$$
  63. \item Verifier sends random challenge $u_j \in \mathbb{I}$
  64. \item Prover computes the halved vectors for next round:
  65. $$\overrightarrow{a} \leftarrow \overrightarrow{a}_{hi} \cdot u_j^{-1} + \overrightarrow{a}_{lo} \cdot u_j$$
  66. $$\overrightarrow{b} \leftarrow \overrightarrow{b}_{lo} \cdot u_j^{-1} + \overrightarrow{b}_{hi} \cdot u_j$$
  67. $$\overrightarrow{G} \leftarrow \overrightarrow{G}_{lo} \cdot u_j^{-1} + \overrightarrow{G}_{hi} \cdot u_j$$
  68. \end{itemize}
  69. After final round, $\overrightarrow{a}, \overrightarrow{b}, \overrightarrow{G}$ are each of length 1.
  70. Verifier can compute
  71. $$G = \overrightarrow{G}_0 = < \overrightarrow{s}, \overrightarrow{G} >$$
  72. and $$b = \overrightarrow{b}_0 = < \overrightarrow{s}, \overrightarrow{b} >$$
  73. where $\overrightarrow{s}$ is the binary counting structure:
  74. \begin{align*}
  75. &s = (u_1^{-1} ~ u_2^{-1} \cdots ~u_k^{-1},\\
  76. &~~~~~~u_1 ~~~ u_2^{-1} ~\cdots ~u_k^{-1},\\
  77. &~~~~~~u_1^{-1} ~~ u_2 ~~\cdots ~u_k^{-1},\\
  78. &~~~~~~~~~~~~~~\vdots\\
  79. &~~~~~~u_1 ~~~~ u_2 ~~\cdots ~u_k)
  80. \end{align*}
  81. And verifier checks:
  82. $$[a]G + [r'] H + [ab] U == P' + \sum_{j=1}^k ( [u_j^2] L_j + [u_j^{-2}] R_j)$$
  83. where the synthetic blinding factor $r'$ is $r' = r + \sum_{j=1}^k (l_j u_j^2 + r_j u_j^{-2})$.
  84. \vspace{1cm}
  85. Unfold:
  86. $$
  87. \textcolor{brown}{[a]G} + \textcolor{cyan}{[r'] H} + \textcolor{magenta}{[ab] U}
  88. ==
  89. \textcolor{blue}{P'} + \sum_{j=1}^k ( \textcolor{violet}{[u_j^2] L_j} + \textcolor{orange}{[u_j^{-2}] R_j})
  90. $$
  91. \begin{align*}
  92. &Right~side = \textcolor{blue}{P'} + \sum_{j=1}^k ( \textcolor{violet}{[u_j^2] L_j} + \textcolor{orange}{[u_j^{-2}] R_j})\\
  93. &= \textcolor{blue}{< \overrightarrow{a}, \overrightarrow{G}> + [r] H + [v] U}\\
  94. &+ \sum_{j=1}^k (\\
  95. &\textcolor{violet}{[u_j^2] \cdot <\overrightarrow{a}_{lo}, \overrightarrow{G}_{hi}> + [l_j] H + [<\overrightarrow{a}_{lo}, \overrightarrow{b}_{hi}>] U}\\
  96. &\textcolor{orange}{+ [u_j^{-2}] \cdot <\overrightarrow{a}_{hi}, \overrightarrow{G}_{lo}> + [r_j] H + [<\overrightarrow{a}_{hi}, \overrightarrow{b}_{lo}>] U}
  97. )
  98. \end{align*}
  99. \begin{align*}
  100. &Left~side = \textcolor{brown}{[a]G} + \textcolor{cyan}{[r'] H} + \textcolor{magenta}{[ab] U}\\
  101. & = \textcolor{brown}{< \overrightarrow{a}, \overrightarrow{G} >}\\
  102. &+ \textcolor{cyan}{[r + \sum_{j=1}^k (l_j \cdot u_j^2 + r_j u_j^{-2})] \cdot H}\\
  103. &+ \textcolor{magenta}{< \overrightarrow{a}, \overrightarrow{b} > U}
  104. \end{align*}
  105. \section{Amortization Strategy}
  106. TODO
  107. \bibliography{paper-notes.bib}
  108. \bibliographystyle{unsrt}
  109. \end{document}