Skip to content

Commit cb4e446

Browse files
Add #[serde(default)] to EccExtenison (allow omitting sw or te curves)
1 parent 5a88dc6 commit cb4e446

File tree

4 files changed

+11
-3
lines changed

4 files changed

+11
-3
lines changed

extensions/ecc/circuit/src/ecc_extension.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,9 @@ pub static ED25519_CONFIG: Lazy<CurveConfig<TeCurveCoeffs>> = Lazy::new(|| Curve
108108

109109
#[derive(Clone, Debug, derive_new::new, Serialize, Deserialize)]
110110
pub struct EccExtension {
111+
#[serde(default)]
111112
pub supported_sw_curves: Vec<CurveConfig<SwCurveCoeffs>>,
113+
#[serde(default)]
112114
pub supported_te_curves: Vec<CurveConfig<TeCurveCoeffs>>,
113115
}
114116

extensions/ecc/tests/programs/openvm_k256.toml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,11 @@ supported_moduli = [
88
"115792089237316195423570985008687907852837564279074904382605163141518161494337",
99
]
1010

11-
[[app_vm_config.ecc.supported_curves]]
11+
[[app_vm_config.ecc.supported_sw_curves]]
1212
struct_name = "Secp256k1Point"
1313
modulus = "115792089237316195423570985008687907853269984665640564039457584007908834671663"
1414
scalar = "115792089237316195423570985008687907852837564279074904382605163141518161494337"
15+
16+
[app_vm_config.ecc.supported_sw_curves.coeffs]
1517
a = "0"
1618
b = "7"

extensions/ecc/tests/programs/openvm_k256_keccak.toml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,11 @@ supported_moduli = [
99
"115792089237316195423570985008687907852837564279074904382605163141518161494337",
1010
]
1111

12-
[[app_vm_config.ecc.supported_curves]]
12+
[[app_vm_config.ecc.supported_sw_curves]]
1313
struct_name = "Secp256k1Point"
1414
modulus = "115792089237316195423570985008687907853269984665640564039457584007908834671663"
1515
scalar = "115792089237316195423570985008687907852837564279074904382605163141518161494337"
16+
17+
[app_vm_config.ecc.supported_sw_curves.coeffs]
1618
a = "0"
1719
b = "7"

extensions/ecc/tests/programs/openvm_p256.toml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,11 @@ supported_moduli = [
77
"115792089210356248762697446949407573529996955224135760342422259061068512044369",
88
]
99

10-
[[app_vm_config.ecc.supported_curves]]
10+
[[app_vm_config.ecc.supported_sw_curves]]
1111
struct_name = "P256Point"
1212
modulus = "115792089210356248762697446949407573530086143415290314195533631308867097853951"
1313
scalar = "115792089210356248762697446949407573529996955224135760342422259061068512044369"
14+
15+
[app_vm_config.ecc.supported_sw_curves.coeffs]
1416
a = "115792089210356248762697446949407573530086143415290314195533631308867097853948"
1517
b = "41058363725152142129326129780047268409114441015993725554835256314039467401291"

0 commit comments

Comments
 (0)