Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 10 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ members = [
"extensions/ecc/transpiler",
"extensions/ecc/guest",
"extensions/ecc/sw-macros",
"extensions/ecc/curve-macros",
"extensions/ecc/tests",
"extensions/pairing/circuit",
"extensions/pairing/guest",
Expand Down Expand Up @@ -168,6 +169,7 @@ openvm-ecc-circuit = { path = "extensions/ecc/circuit", default-features = false
openvm-ecc-transpiler = { path = "extensions/ecc/transpiler", default-features = false }
openvm-ecc-guest = { path = "extensions/ecc/guest", default-features = false }
openvm-ecc-sw-macros = { path = "extensions/ecc/sw-macros", default-features = false }
openvm-ecc-curve-macros = { path = "extensions/ecc/curve-macros", default-features = false }
openvm-pairing-circuit = { path = "extensions/pairing/circuit", default-features = false }
openvm-pairing-transpiler = { path = "extensions/pairing/transpiler", default-features = false }
openvm-pairing-guest = { path = "extensions/pairing/guest", default-features = false }
Expand All @@ -189,7 +191,10 @@ p3-poseidon2-air = { git = "https://github.com/Plonky3/Plonky3.git", rev = "539b
p3-symmetric = { git = "https://github.com/Plonky3/Plonky3.git", rev = "539bbc84085efb609f4f62cb03cf49588388abdb", default-features = false }

zkhash = { git = "https://github.com/HorizenLabs/poseidon2.git", rev = "bb476b9" }
snark-verifier-sdk = { version = "0.2.0", default-features = false, features = ["loader_halo2", "halo2-axiom"] }
snark-verifier-sdk = { version = "0.2.0", default-features = false, features = [
"loader_halo2",
"halo2-axiom",
] }
snark-verifier = { version = "0.2.0", default-features = false }
halo2curves-axiom = { git = "https://github.com/axiom-crypto/halo2curves.git", tag = "v0.7.2" }

Expand All @@ -204,7 +209,9 @@ clap = "4.5.23"
toml = "0.8.14"
lazy_static = "1.5.0"
derive-new = "0.6.0"
derive_more = { version = "1.0.0", features = ["display"], default-features = false }
derive_more = { version = "1.0.0", features = [
"display",
], default-features = false }
derivative = "2.2.0"
strum_macros = "0.26.4"
strum = { version = "0.26.3", features = ["derive"] }
Expand Down Expand Up @@ -251,6 +258,7 @@ num-traits = { version = "0.2.19", default-features = false }
ff = { version = "0.13.1", default-features = false }
sha2 = { version = "0.10", default-features = false }
blstrs = { version = "0.7.1", default-features = true }
pasta_curves = { version = "0.5.1", default-features = true }

# specific to CUDA and GPU
cuda-runtime-sys = "0.3.0-alpha.1"
Expand Down
1 change: 1 addition & 0 deletions benchmarks/guest/ecrecover/openvm.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ supported_moduli = [

[[app_vm_config.ecc.supported_curves]]
struct_name = "Secp256k1Point"
curve_name = "Secp256k1"
modulus = "115792089237316195423570985008687907853269984665640564039457584007908834671663"
scalar = "115792089237316195423570985008687907852837564279074904382605163141518161494337"
a = "0"
Expand Down
1 change: 1 addition & 0 deletions benchmarks/guest/ecrecover/openvm_init.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// This file is automatically generated by cargo openvm. Do not rename or edit.
openvm_algebra_guest::moduli_macros::moduli_init! { "115792089237316195423570985008687907853269984665640564039457584007908834671663", "115792089237316195423570985008687907852837564279074904382605163141518161494337" }
openvm_ecc_guest::sw_macros::sw_init! { "Secp256k1Point" }
openvm_ecc_guest::curve_macros::curve_init! { "Secp256k1" }
7 changes: 5 additions & 2 deletions benchmarks/guest/kitchen-sink/openvm.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ supported_moduli = [
"21888242871839275222246405745257275088548364400416034343698204186575808495617", # scalar
# bls12_381
"4002409555221667393417789825735904156556882819939007885332058136124031650490837864442687629129015664037894272559787", # coordinate
"52435875175126190479447740508185965837690552500527637822603658699938581184513", # scalar
"52435875175126190479447740508185965837690552500527637822603658699938581184513", # scalar
Copy link

Copilot AI Dec 6, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Inconsistent formatting: this line has excessive spacing (multiple spaces) before the # scalar comment, while other similar lines use a single space. Should maintain consistent spacing with surrounding lines.

Suggested change
"52435875175126190479447740508185965837690552500527637822603658699938581184513", # scalar
"52435875175126190479447740508185965837690552500527637822603658699938581184513", # scalar

Copilot uses AI. Check for mistakes.
# 2^61 - 1
"2305843009213693951",
"7",
Expand All @@ -41,32 +41,35 @@ supported_moduli = [

[[app_vm_config.ecc.supported_curves]]
struct_name = "Secp256k1Point"
curve_name = "Secp256k1"
modulus = "115792089237316195423570985008687907853269984665640564039457584007908834671663"
scalar = "115792089237316195423570985008687907852837564279074904382605163141518161494337"
a = "0"
b = "7"

[[app_vm_config.ecc.supported_curves]]
struct_name = "P256Point"
curve_name = "NistP256"
modulus = "115792089210356248762697446949407573530086143415290314195533631308867097853951"
scalar = "115792089210356248762697446949407573529996955224135760342422259061068512044369"
a = "115792089210356248762697446949407573530086143415290314195533631308867097853948"
b = "41058363725152142129326129780047268409114441015993725554835256314039467401291"

[[app_vm_config.ecc.supported_curves]]
struct_name = "Bn254G1Affine"
curve_name = "Bn254"
modulus = "21888242871839275222246405745257275088696311157297823662689037894645226208583"
scalar = "21888242871839275222246405745257275088548364400416034343698204186575808495617"
a = "0"
b = "3"

[[app_vm_config.ecc.supported_curves]]
struct_name = "Bls12_381G1Affine"
curve_name = "Bls12_381"
modulus = "4002409555221667393417789825735904156556882819939007885332058136124031650490837864442687629129015664037894272559787"
scalar = "52435875175126190479447740508185965837690552500527637822603658699938581184513"
a = "0"
b = "4"

[app_vm_config.pairing]
supported_curves = ["Bn254", "Bls12_381"]

1 change: 1 addition & 0 deletions benchmarks/guest/pairing/openvm.toml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ supported_curves = ["Bn254"]
# bn254 (alt bn128)
[[app_vm_config.ecc.supported_curves]]
struct_name = "Bn254G1Affine"
curve_name = "Bn254"
modulus = "21888242871839275222246405745257275088696311157297823662689037894645226208583"
scalar = "21888242871839275222246405745257275088548364400416034343698204186575808495617"
a = "0"
Expand Down
4 changes: 4 additions & 0 deletions crates/sdk/guest/little/openvm.toml
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ supported_moduli = [
# bn254 (alt bn128)
[[app_vm_config.ecc.supported_curves]]
struct_name = "Bn254G1Affine"
curve_name = "Bn254"
modulus = "21888242871839275222246405745257275088696311157297823662689037894645226208583"
scalar = "21888242871839275222246405745257275088548364400416034343698204186575808495617"
a = "0"
Expand All @@ -47,6 +48,7 @@ b = "3"
# secp256k1 (k256)
[[app_vm_config.ecc.supported_curves]]
struct_name = "Secp256k1Point"
curve_name = "Secp256k1"
modulus = "115792089237316195423570985008687907853269984665640564039457584007908834671663"
scalar = "115792089237316195423570985008687907852837564279074904382605163141518161494337"
a = "0"
Expand All @@ -55,6 +57,7 @@ b = "7"
# secp256r1 (p256)
[[app_vm_config.ecc.supported_curves]]
struct_name = "P256Point"
curve_name = "NistP256"
modulus = "115792089210356248762697446949407573530086143415290314195533631308867097853951"
scalar = "115792089210356248762697446949407573529996955224135760342422259061068512044369"
a = "115792089210356248762697446949407573530086143415290314195533631308867097853948"
Expand All @@ -63,6 +66,7 @@ b = "410583637251521421293261297800472684091144410159937255548352563140394674012
# bls12_381
[[app_vm_config.ecc.supported_curves]]
struct_name = "Bls12_381G1Affine"
curve_name = "Bls12_381"
modulus = "4002409555221667393417789825735904156556882819939007885332058136124031650490837864442687629129015664037894272559787"
scalar = "52435875175126190479447740508185965837690552500527637822603658699938581184513"
a = "0"
Expand Down
4 changes: 4 additions & 0 deletions crates/sdk/guest/p256/openvm.toml
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ supported_moduli = [
# bn254 (alt bn128)
[[app_vm_config.ecc.supported_curves]]
struct_name = "Bn254G1Affine"
curve_name = "Bn254"
modulus = "21888242871839275222246405745257275088696311157297823662689037894645226208583"
scalar = "21888242871839275222246405745257275088548364400416034343698204186575808495617"
a = "0"
Expand All @@ -47,6 +48,7 @@ b = "3"
# secp256k1 (k256)
[[app_vm_config.ecc.supported_curves]]
struct_name = "Secp256k1Point"
curve_name = "Secp256k1"
modulus = "115792089237316195423570985008687907853269984665640564039457584007908834671663"
scalar = "115792089237316195423570985008687907852837564279074904382605163141518161494337"
a = "0"
Expand All @@ -55,6 +57,7 @@ b = "7"
# secp256r1 (p256)
[[app_vm_config.ecc.supported_curves]]
struct_name = "P256Point"
curve_name = "NistP256"
modulus = "115792089210356248762697446949407573530086143415290314195533631308867097853951"
scalar = "115792089210356248762697446949407573529996955224135760342422259061068512044369"
a = "115792089210356248762697446949407573530086143415290314195533631308867097853948"
Expand All @@ -63,6 +66,7 @@ b = "410583637251521421293261297800472684091144410159937255548352563140394674012
# bls12_381
[[app_vm_config.ecc.supported_curves]]
struct_name = "Bls12_381G1Affine"
curve_name = "Bls12_381"
modulus = "4002409555221667393417789825735904156556882819939007885332058136124031650490837864442687629129015664037894272559787"
scalar = "52435875175126190479447740508185965837690552500527637822603658699938581184513"
a = "0"
Expand Down
2 changes: 2 additions & 0 deletions crates/sdk/src/config/global.rs
Original file line number Diff line number Diff line change
Expand Up @@ -520,6 +520,8 @@ impl InitFileGenerator for SdkVmConfigInner {
if let Some(ecc_config) = &self.ecc {
contents.push_str(&ecc_config.generate_sw_init());
contents.push('\n');
contents.push_str(&ecc_config.generate_curve_init());
contents.push('\n');
}

Some(contents)
Expand Down
4 changes: 4 additions & 0 deletions crates/sdk/src/config/openvm_standard.toml
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ supported_moduli = [
# bn254 (alt bn128)
[[app_vm_config.ecc.supported_curves]]
struct_name = "Bn254G1Affine"
curve_name = "Bn254"
modulus = "21888242871839275222246405745257275088696311157297823662689037894645226208583"
scalar = "21888242871839275222246405745257275088548364400416034343698204186575808495617"
a = "0"
Expand All @@ -47,6 +48,7 @@ b = "3"
# secp256k1 (k256)
[[app_vm_config.ecc.supported_curves]]
struct_name = "Secp256k1Point"
curve_name = "Secp256k1"
modulus = "115792089237316195423570985008687907853269984665640564039457584007908834671663"
scalar = "115792089237316195423570985008687907852837564279074904382605163141518161494337"
a = "0"
Expand All @@ -55,6 +57,7 @@ b = "7"
# secp256r1 (p256)
[[app_vm_config.ecc.supported_curves]]
struct_name = "P256Point"
curve_name = "NistP256"
modulus = "115792089210356248762697446949407573530086143415290314195533631308867097853951"
scalar = "115792089210356248762697446949407573529996955224135760342422259061068512044369"
a = "115792089210356248762697446949407573530086143415290314195533631308867097853948"
Expand All @@ -63,6 +66,7 @@ b = "410583637251521421293261297800472684091144410159937255548352563140394674012
# bls12_381
[[app_vm_config.ecc.supported_curves]]
struct_name = "Bls12_381G1Affine"
curve_name = "Bls12_381"
modulus = "4002409555221667393417789825735904156556882819939007885332058136124031650490837864442687629129015664037894272559787"
scalar = "52435875175126190479447740508185965837690552500527637822603658699938581184513"
a = "0"
Expand Down
Loading
Loading