Skip to content

Commit 7bf1f13

Browse files
bugs
1 parent 963e4f7 commit 7bf1f13

File tree

1 file changed

+6
-6
lines changed
  • extensions/ecc/te-setup/src

1 file changed

+6
-6
lines changed

extensions/ecc/te-setup/src/lib.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -109,14 +109,14 @@ pub fn te_declare(input: TokenStream) -> TokenStream {
109109
{
110110
use openvm_algebra_guest::DivUnsafe;
111111

112-
let x1y2 = p1.x() * p2.y();
113-
let y1x2 = p1.y() * p2.x();
114-
let x1x2 = p1.x() * p2.x();
115-
let y1y2 = p1.y() * p2.y();
116-
let dx1x2y1y2 = Self::CURVE_D * &x1x2 * &y1y2;
112+
let x1y2 = p1.x.clone() * p2.y.clone();
113+
let y1x2 = p1.y.clone() * p2.x.clone();
114+
let x1x2 = p1.x.clone() * p2.x.clone();
115+
let y1y2 = p1.y.clone() * p2.y.clone();
116+
let dx1x2y1y2 = <Self as ::openvm_ecc_guest::edwards::TwistedEdwardsPoint>::CURVE_D * &x1x2 * &y1y2;
117117

118118
let x3 = (x1y2 + y1x2).div_unsafe(&<#intmod_type as openvm_algebra_guest::IntMod>::ONE + &dx1x2y1y2);
119-
let y3 = (y1y2 - Self::CURVE_A * x1x2).div_unsafe(&<#intmod_type as openvm_algebra_guest::IntMod>::ONE - &dx1x2y1y2);
119+
let y3 = (y1y2 - <Self as ::openvm_ecc_guest::edwards::TwistedEdwardsPoint>::CURVE_A * x1x2).div_unsafe(&<#intmod_type as openvm_algebra_guest::IntMod>::ONE - &dx1x2y1y2);
120120

121121
#struct_name { x: x3, y: y3 }
122122
}

0 commit comments

Comments
 (0)