Skip to content

Commit 39db1c0

Browse files
fix linter errors
1 parent 7c3387a commit 39db1c0

File tree

4 files changed

+7
-3
lines changed

4 files changed

+7
-3
lines changed

examples/ecc/openvm.toml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,7 @@ supported_modulus = ["1157920892373161954235709850086879078532699846656405640394
77
[[app_vm_config.ecc.supported_curves]]
88
modulus = "115792089237316195423570985008687907853269984665640564039457584007908834671663"
99
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"

examples/ecc/openvm/app.vmexe

137 KB
Binary file not shown.

extensions/ecc/circuit/src/ecc_extension.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff 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

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff 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
}

0 commit comments

Comments
 (0)