File tree 4 files changed +7
-3
lines changed
4 files changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -7,4 +7,7 @@ supported_modulus = ["1157920892373161954235709850086879078532699846656405640394
7
7
[[app_vm_config .ecc .supported_curves ]]
8
8
modulus = " 115792089237316195423570985008687907853269984665640564039457584007908834671663"
9
9
scalar = " 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 {
37
37
#[ serde_as( as = "DisplayFromStr" ) ]
38
38
pub scalar : BigUint ,
39
39
// curve-specific coefficients
40
+ #[ serde_as( as = "_" ) ]
40
41
pub coeffs : CurveCoeffs ,
41
42
}
42
43
Original file line number Diff line number Diff line change @@ -115,8 +115,8 @@ pub fn te_declare(input: TokenStream) -> TokenStream {
115
115
let y1y2 = p1. y( ) * p2. y( ) ;
116
116
let dx1x2y1y2 = Self :: CURVE_D * x1x2 * y1y2;
117
117
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) ;
120
120
121
121
#struct_name { x: x3, y: y3 }
122
122
}
You can’t perform that action at this time.
0 commit comments