Skip to content

Commit

Permalink
docs(baby-jubjub): added resource of Montgomery Ladder
Browse files Browse the repository at this point in the history
  • Loading branch information
ChinoCribioli committed Sep 12, 2024
1 parent 8127d10 commit 3c122c5
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions packages/baby-jubjub/src/baby-jubjub.ts
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ export function addPoint(p1: Point<bigint>, p2: Point<bigint>): Point<bigint> {
/**
* Performs a scalar multiplication by starting from the 'base' point and 'adding'
* it to itself 'e' times.
* This algorithm is called 'Montgomery Ladder'. See {@link https://en.wikipedia.org/wiki/Elliptic_curve_point_multiplication#Montgomery_ladder}
* 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 most significant bits of e. If the upcoming bit is a 0, we just have to
Expand Down

0 comments on commit 3c122c5

Please sign in to comment.