Skip to content

Commit

Permalink
Adjust weierstrass error
Browse files Browse the repository at this point in the history
  • Loading branch information
paulmillr committed Dec 20, 2022
1 parent 254bb71 commit dd7b48a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/weierstrass.ts
Original file line number Diff line number Diff line change
Expand Up @@ -752,7 +752,8 @@ export function weierstrass(curveDef: CurveType): CurveFn {

// A point on curve is valid if it conforms to equation.
assertValidity(): void {
const msg = 'Point is not on curve';
// Some 3rd-party test vectors require different wording between here & `fromCompressedHex`
const msg = 'Point is not on elliptic curve';
const { x, y } = this;
if (!isValidFieldElement(x) || !isValidFieldElement(y)) throw new Error(msg);
const left = modP(y * y);
Expand Down

0 comments on commit dd7b48a

Please sign in to comment.