File tree Expand file tree Collapse file tree 1 file changed +6
-6
lines changed
extensions/ecc/te-setup/src Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -109,14 +109,14 @@ pub fn te_declare(input: TokenStream) -> TokenStream {
109
109
{
110
110
use openvm_algebra_guest:: DivUnsafe ;
111
111
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;
117
117
118
118
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) ;
120
120
121
121
#struct_name { x: x3, y: y3 }
122
122
}
You can’t perform that action at this time.
0 commit comments