Skip to content

Commit

Permalink
update interface for doubling
Browse files Browse the repository at this point in the history
  • Loading branch information
querolita committed Jan 10, 2025
1 parent 846e671 commit a3b4d40
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/bindings
4 changes: 2 additions & 2 deletions src/lib/provable/gadgets/twisted-curve.ts
Original file line number Diff line number Diff line change
Expand Up @@ -118,14 +118,14 @@ function add(
return { x: x3, y: y3 };
}

function double(p1: Point, Curve: { modulus: bigint; d: bigint }) {
function double(p1: Point, Curve: { modulus: bigint; a: bigint; d: bigint }) {
let { x: x1, y: y1 } = p1;
let f = Curve.modulus;
let d = Curve.d;

// constant case
if (Point.isConstant(p1)) {
let p3 = twistedDouble(Point.toBigint(p1), f, Curve.d);
let p3 = twistedDouble(Point.toBigint(p1), f, Curve.a, Curve.d);
return Point.from(p3);
}

Expand Down

0 comments on commit a3b4d40

Please sign in to comment.