Skip to content

Commit cd1e0ac

Browse files
[Fix] vulnerability for not verify elm in correct subgroup for extension field (#247)
* WIP * mismatch detected * fix: add subgroup check for g2 * test: ark-bn254 v consts declared here match * trivial: unit test * prune dep * test to verify the g2 mul --------- Co-authored-by: Rohit Narurkar <rohit.narurkar@protonmail.com>
1 parent b6001f6 commit cd1e0ac

3 files changed

Lines changed: 325 additions & 18 deletions

File tree

Cargo.lock

Lines changed: 6 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

crates/types/chunk/Cargo.toml

Lines changed: 20 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -12,32 +12,43 @@ alloy-primitives = { workspace = true, features = ["native-keccak"] }
1212
alloy-consensus = { workspace = true, features = ["crypto-backend"] }
1313
alloy-sol-types.workspace = true
1414
ecies.workspace = true
15+
hex-literal.workspace = true
1516
itertools.workspace = true
1617
sbv-helpers.workspace = true
1718
sbv-core = { workspace = true, features = [] }
1819
sbv-trie = { workspace = true }
19-
sbv-primitives = { workspace = true, features = ["hardforks", "evm-types", "revm-types", "reth-evm-types"] }
20+
sbv-primitives = { workspace = true, features = [
21+
"hardforks",
22+
"evm-types",
23+
"revm-types",
24+
"reth-evm-types",
25+
] }
2026
serde.workspace = true
2127
thiserror.workspace = true
2228
openvm-ecc-guest = { workspace = true }
2329
openvm-k256 = { workspace = true }
2430
openvm-p256 = { workspace = true }
2531
openvm-sha2 = { workspace = true }
2632
openvm-pairing = { workspace = true, features = ["bn254"] }
27-
28-
types-base = { path = "../base", package = "scroll-zkvm-types-base"}
33+
types-base = { path = "../base", package = "scroll-zkvm-types-base" }
2934

3035
[dev-dependencies]
31-
serde_json.workspace = true
36+
ark-bn254 = "0.5.0"
37+
ark-ff = "0.5.0"
38+
ark-serialize = "0.5.0"
39+
ark-ec = "0.5.0"
40+
openvm-pairing = { workspace = true, features = ["bn254", "halo2curves"] }
41+
openvm-pairing-guest = { workspace = true, features = ["bn254", "halo2curves"] }
42+
3243

3344
[features]
3445
default = []
3546
host = ["scroll-compress-info", "alloy-primitives/tiny-keccak"]
3647
scroll = [
37-
"sbv-core/scroll",
38-
"sbv-primitives/scroll-evm-types",
39-
"sbv-primitives/scroll-hardforks",
40-
"sbv-primitives/scroll-revm-types",
41-
"sbv-primitives/scroll-reth-evm-types"
48+
"sbv-core/scroll",
49+
"sbv-primitives/scroll-evm-types",
50+
"sbv-primitives/scroll-hardforks",
51+
"sbv-primitives/scroll-revm-types",
52+
"sbv-primitives/scroll-reth-evm-types",
4253
]
4354
scroll-compress-info = ["sbv-core/scroll-compress-info"]

0 commit comments

Comments
 (0)