From 8127d10867d05768099a81413b7a4ce6a2f77b3d Mon Sep 17 00:00:00 2001 From: ChinoCribioli Date: Wed, 11 Sep 2024 16:56:40 -0300 Subject: [PATCH] docs(baby-jubjub): fixed documentation re #324 --- packages/baby-jubjub/src/baby-jubjub.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/baby-jubjub/src/baby-jubjub.ts b/packages/baby-jubjub/src/baby-jubjub.ts index ed209198b..f17c0b919 100644 --- a/packages/baby-jubjub/src/baby-jubjub.ts +++ b/packages/baby-jubjub/src/baby-jubjub.ts @@ -67,8 +67,8 @@ export function addPoint(p1: Point, p2: Point): Point { * it to itself 'e' times. * This works given the following invariant: At each step, R0 will be r_0*base where r_0 is the prefix of e * written in binary and R1 will be (r_0+1)*base. In other words: at iteration i of the loop, r_0's binary - * representation will be the first i+1 bits of e. If the upcoming bit is a 0, we just have to double R0 - * and add R0 to R1 to maintain the invariant. If it is a 1, we have to double R0 and add 1*base + * representation will be the first i+1 most significant bits of e. If the upcoming bit is a 0, we just have to + * double R0 and add R0 to R1 to maintain the invariant. If it is a 1, we have to double R0 and add 1*base * (or add R1, which is the same as (r_0+1)*base), and double R1 to maintain the invariant. * @param base The base point used as a starting point. * @param e A secret number representing the private key.