File tree Expand file tree Collapse file tree 4 files changed +7
-3
lines changed Expand file tree Collapse file tree 4 files changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -7,4 +7,7 @@ supported_modulus = ["1157920892373161954235709850086879078532699846656405640394
77[[app_vm_config .ecc .supported_curves ]]
88modulus = " 115792089237316195423570985008687907853269984665640564039457584007908834671663"
99scalar = " 115792089237316195423570985008687907852837564279074904382605163141518161494337"
10- coeffs = { type = " SwCurve" , a = " 0" , b = " 7" }
10+
11+ [[app_vm_config .ecc .supported_curves .SwCurve ]]
12+ a = " 0"
13+ b = " 7"
Original file line number Diff line number Diff line change @@ -37,6 +37,7 @@ pub struct CurveConfig {
3737 #[ serde_as( as = "DisplayFromStr" ) ]
3838 pub scalar : BigUint ,
3939 // curve-specific coefficients
40+ #[ serde_as( as = "_" ) ]
4041 pub coeffs : CurveCoeffs ,
4142}
4243
Original file line number Diff line number Diff line change @@ -115,8 +115,8 @@ pub fn te_declare(input: TokenStream) -> TokenStream {
115115 let y1y2 = p1. y( ) * p2. y( ) ;
116116 let dx1x2y1y2 = Self :: CURVE_D * x1x2 * y1y2;
117117
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) ;
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) ;
120120
121121 #struct_name { x: x3, y: y3 }
122122 }
You can’t perform that action at this time.
0 commit comments