forked from tornado-packages/noble-curves
edwards: use bitmask instead of exp
This commit is contained in:
parent
213796db4b
commit
16b31b9087
@ -102,7 +102,7 @@ export function twistedEdwards(curveDef: CurveType): CurveFn {
|
||||
nByteLength,
|
||||
h: cofactor,
|
||||
} = CURVE;
|
||||
const MASK = _2n ** BigInt(nByteLength * 8);
|
||||
const MASK = _2n << (BigInt(nByteLength * 8) - _1n);
|
||||
const modP = Fp.create; // Function overrides
|
||||
|
||||
// sqrt(u/v)
|
||||
|
Loading…
Reference in New Issue
Block a user