}
}
- // ## Precomputes
- // --------------
-
+ /** Precomputes */
+ static Gpows: Point[] | undefined = undefined // precomputes for base point G
static W = 8 // W is window size
static scalarBits = 256
static pwindows = Math.ceil(this.scalarBits / this.W) + 1 // 33 for W=8, NOT 32 - see wNAF loop
}
return points
}
- static Gpows: Point[] | undefined = undefined // precomputes for base point G
// const-time negate
- static ctneg (cnd: boolean, p: Point) {
+ static ctneg (cnd: boolean, p: Point): Point {
const n = p.negate()
return cnd ? n : p
}