mirror of https://github.com/zcash/halo2.git
[book] src/design/circuit/gadgets/ecc/var-base-scalar-mul.md: we always do addition (possibly of the zero point) at the end of variable-base scalar mul.
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
This commit is contained in:
parent
7895a2a082
commit
a6badba32f
|
@ -142,10 +142,10 @@ $\begin{array}{l}
|
||||||
\hspace{1.5em} (x_{A,i-1}, y_{A,i-1}) = \left((x_{A,i}, y_{A,i}) + (x_T, y_T)\right) + (x_{A,i}, y_{A,i})
|
\hspace{1.5em} (x_{A,i-1}, y_{A,i-1}) = \left((x_{A,i}, y_{A,i}) + (x_T, y_T)\right) + (x_{A,i}, y_{A,i})
|
||||||
\end{array}$
|
\end{array}$
|
||||||
|
|
||||||
If the least significant bit is set $\mathbf{k_0} = 1,$ we return the accumulator $A$. Else, if $\mathbf{k_0} = 0,$ we return $A - T$ (also using complete addition).
|
If the least significant bit $\mathbf{k_0} = 1,$ we set $B = \mathcal{O},$ otherwise we set ${B = -T}$. Then we return ${A + B}$ using complete addition.
|
||||||
|
|
||||||
Let $B = \begin{cases}
|
Let $B = \begin{cases}
|
||||||
(0, 0), &\text{ if } \mathbf{k_0} = 1,\\
|
(0, 0), &\text{ if } \mathbf{k_0} = 1, \\
|
||||||
(x_T, -y_T), &\text{ otherwise.}
|
(x_T, -y_T), &\text{ otherwise.}
|
||||||
\end{cases}$
|
\end{cases}$
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue