Skip to content

Commit

Permalink
address feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
querolita committed Jan 28, 2025
1 parent 639625c commit 3dd6b5a
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/lib/provable/gadgets/elliptic-curve.ts
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ function add(p1: Point, p2: Point, Curve: { modulus: bigint; a: bigint }) {

assert(
Curve.modulus > l2Mask + 1n,
'Base field moduli smaller than 2^176 are not supported'
`Base field moduli smaller than ${l2Mask + 1n} are not supported`
);

// witness and range-check slope, x3, y3
Expand Down
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 @@ -81,7 +81,7 @@ function add(

assert(
Curve.modulus > l2Mask + 1n,
'Base field moduli smaller than 2^176 are not supported'
`Base field moduli smaller than ${l2Mask + 1n} are not supported`
);

// witness and range-check denominators, x3, y3
Expand Down Expand Up @@ -264,7 +264,7 @@ function assertOnCurve(
}

/**
* EC scalar multiplication, `scalar*point`
* Twisted curve scalar multiplication, `scalar*point`
*
* The result is constrained to be not zero.
*/
Expand Down
4 changes: 2 additions & 2 deletions src/lib/provable/test/twisted-curve.unit-test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,10 @@ for (let Curve of curves) {
simpleMapToCurve(x, Curve)
);

// two random points that are not equal, so are a valid input to EC addition
// two random points that are not equal, so are a valid input to twisted curve addition
let unequalPair = onlyIf(array(point, 2), ([p, q]) => !Curve.equal(p, q));

// test ec gadgets witness generation
// test twisted curve gadgets witness generation

equivalentProvable({ from: [point], to: unit, verbose: true })(
(p) => Curve.isOnCurve(p) || throwError('expect on curve'),
Expand Down

0 comments on commit 3dd6b5a

Please sign in to comment.