Skip to content

Commit

Permalink
fix: use new add and double methods
Browse files Browse the repository at this point in the history
  • Loading branch information
sirasistant committed Jan 30, 2024
1 parent 5503531 commit 2badd02
Showing 1 changed file with 4 additions and 10 deletions.
14 changes: 4 additions & 10 deletions test_programs/execution_success/scalar_mul/src/main.nr
Original file line number Diff line number Diff line change
Expand Up @@ -20,18 +20,12 @@ fn main(
let res = std::scalar_mul::fixed_base_embedded_curve(priv_key, 0);
assert(res[0] == pub_x);
assert(res[1] == pub_y);
let pub_point= std::scalar_mul::EmbeddedCurvePoint {
x: pub_x,
y: pub_y
};
let pub_point= std::scalar_mul::EmbeddedCurvePoint { x: pub_x, y: pub_y };
let g1_y = 17631683881184975370165255887551781615748388533673675138860;
let g1= std::scalar_mul::EmbeddedCurvePoint {
x: 1,
y: g1_y
};
let g1= std::scalar_mul::EmbeddedCurvePoint { x: 1, y: g1_y };

let res = std::scalar_mul::embedded_curve_double(pub_point);
let double = std::scalar_mul::embedded_curve_add(g1,g1 );
let res = pub_point.double();
let double = g1.add(g1);

assert(double.x == res.x);
}

0 comments on commit 2badd02

Please sign in to comment.