From a6badba32f318e2290897f0ce657c31df7797598 Mon Sep 17 00:00:00 2001 From: Daira Hopwood Date: Tue, 27 Jul 2021 01:56:56 +0100 Subject: [PATCH] [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 --- book/src/design/circuit/gadgets/ecc/var-base-scalar-mul.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/book/src/design/circuit/gadgets/ecc/var-base-scalar-mul.md b/book/src/design/circuit/gadgets/ecc/var-base-scalar-mul.md index edc72d4c..9d193db1 100644 --- a/book/src/design/circuit/gadgets/ecc/var-base-scalar-mul.md +++ b/book/src/design/circuit/gadgets/ecc/var-base-scalar-mul.md @@ -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}) \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} -(0, 0), &\text{ if } \mathbf{k_0} = 1,\\ +(0, 0), &\text{ if } \mathbf{k_0} = 1, \\ (x_T, -y_T), &\text{ otherwise.} \end{cases}$