Skip to content

Commit 1574a6c

Browse files
committed
Remove unused argument from multiplyUnsafe
1 parent ea1c7b3 commit 1574a6c

2 files changed

Lines changed: 4 additions & 3 deletions

File tree

src/abstract/edwards.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -542,12 +542,12 @@ export function edwards(
542542
// Keeps the same subgroup-scalar contract: 0 is allowed for public-scalar callers, but
543543
// n and larger values are rejected instead of being reduced mod n to the identity point.
544544
// Accepts optional accumulator to merge with multiply (important for sparse scalars)
545-
multiplyUnsafe(scalar: bigint, acc = Point.ZERO): Point {
545+
multiplyUnsafe(scalar: bigint): Point {
546546
// 0 <= scalar < L
547547
if (!Fn.isValid(scalar)) throw new RangeError('invalid scalar: expected 0 <= sc < curve.n');
548548
if (scalar === _0n) return Point.ZERO;
549549
if (this.is0() || scalar === _1n) return this;
550-
return wnaf.unsafe(this, scalar, (p) => normalizeZ(Point, p), acc);
550+
return wnaf.unsafe(this, scalar, (p) => normalizeZ(Point, p));
551551
}
552552

553553
// Checks if point is of small order.

src/abstract/weierstrass.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1093,9 +1093,10 @@ export function weierstrass<T>(
10931093
* It's faster, but should only be used when you don't care about
10941094
* an exposed secret key e.g. sig verification, which works over *public* keys.
10951095
*/
1096-
multiplyUnsafe(sc: bigint): Point {
1096+
multiplyUnsafe(scalar: bigint): Point {
10971097
const { endo } = extraOpts;
10981098
const p = this as Point;
1099+
const sc = scalar;
10991100
// Public-scalar callers may need 0, but n and larger values stay rejected here too.
11001101
// Reducing them mod n would turn bad caller input into an accidental identity point.
11011102
if (!Fn.isValid(sc)) throw new RangeError('invalid scalar: out of range'); // 0 is valid

0 commit comments

Comments
 (0)