this.modL(r, x)\r
}\r
\r
- static unpackneg (r: Float64Array[], p: Uint8Array): -1 | 0 {\r
+ static unpackneg (r: Float64Array[], p: Uint8Array): number {\r
const t: Float64Array = new Float64Array(16)\r
const chk: Float64Array = new Float64Array(16)\r
const num: Float64Array = new Float64Array(16)\r
this.Multiply(chk, chk, den)\r
\r
// if neq is true, multiply r[0] by I, else multiply by 1 for a no-op\r
- const neq = this.neq25519(chk, num)\r
+ let neq = this.neq25519(chk, num)\r
const I = new Float64Array(this.I)\r
for (let i = 0; i < 16; i++) {\r
I[i] *= neq\r
this.Square(chk, r[0])\r
this.Multiply(chk, chk, den)\r
\r
- const result = this.neq25519(chk, num) ? -1 : 0\r
+ neq = 0 - this.neq25519(chk, num)\r
\r
this.Subtract(this.par25519(r[0]) === (p[31] >> 7) ? r[0] : new Float64Array(16), new Float64Array(16), r[0])\r
this.Multiply(r[3], r[0], r[1])\r
- return result\r
+ return neq\r
}\r
\r
static crypto_sign (sm: Uint8Array, m: Uint8Array, n: number, sk: Uint8Array, pk: Uint8Array): void {\r