Skip to content

Commit

Permalink
Update packages/baby-jubjub/src/baby-jubjub.ts
Browse files Browse the repository at this point in the history
Co-authored-by: Chance <[email protected]>
  • Loading branch information
ChinoCribioli and chancehudson authored Sep 13, 2024
1 parent b7dec5b commit f0ad8e1
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions packages/baby-jubjub/src/baby-jubjub.ts
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,10 @@ export function addPoint(p1: Point<bigint>, p2: Point<bigint>): Point<bigint> {
*/
export function mulPointEscalar(base: Point<bigint>, e: bigint): Point<bigint> {
e %= order
// set a bit above the maximum value so that the exponent
// variable will always be 254 bits for subsequent operations
// the 254th bit should be ignored in any operations below
e += 1n << 254n

let R0: Point<bigint> = id
let R1: Point<bigint> = base
Expand Down

0 comments on commit f0ad8e1

Please sign in to comment.