Skip to content

Commit

Permalink
Merge pull request #1758 from o1-labs/feature/infinity-flag
Browse files Browse the repository at this point in the history
Update AffineCurve equal method to account for points at infinity
  • Loading branch information
ymekuria authored Jul 29, 2024
2 parents 0ce380a + 99082a1 commit 6afeb16
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/bindings
3 changes: 2 additions & 1 deletion src/lib/provable/gadgets/elliptic-curve.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import {
} from '../../../bindings/crypto/bigint-helpers.js';
import {
CurveAffine,
GroupAffine,
affineAdd,
affineDouble,
} from '../../../bindings/crypto/elliptic-curve.js';
Expand Down Expand Up @@ -393,7 +394,7 @@ function multiScalarMulConstant(
// TODO dedicated MSM
let s = scalars.map(Field3.toBigint);
let P = points.map(Point.toBigint);
let sum = Curve.zero;
let sum: GroupAffine = Curve.zero;
for (let i = 0; i < n; i++) {
if (useGlv) {
sum = Curve.add(sum, Curve.Endo.scale(P[i], s[i]));
Expand Down
2 changes: 1 addition & 1 deletion src/mina
Submodule mina updated 376 files

0 comments on commit 6afeb16

Please sign in to comment.