Skip to content
Merged
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
36 changes: 21 additions & 15 deletions Cargo.lock

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

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ futures = "0.3.31"
aligned-sdk = { git = "https://github.com/yetanotherco/aligned_layer", rev = "c60d7eb147edbdf12bb7a7c6e92ec178d9f8da23" }
spawned-concurrency = "0.4.2"
spawned-rt = "0.4.2"
lambdaworks-crypto = "0.11.0"
lambdaworks-crypto = "0.13.0"
tui-logger = { version = "0.17.3", features = ["tracing-support"] }
crossbeam = "0.8.4"
rayon = "1.10.0"
Expand Down
16 changes: 12 additions & 4 deletions crates/l2/prover/src/guest_program/src/risc0/Cargo.lock

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

16 changes: 12 additions & 4 deletions crates/l2/prover/src/guest_program/src/sp1/Cargo.lock

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

36 changes: 21 additions & 15 deletions crates/l2/tee/quote-gen/Cargo.lock

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

2 changes: 1 addition & 1 deletion crates/vm/levm/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ p256 = { version = "0.13.2", features = [
sha2 = "0.10.8"
ripemd = "0.1.3"
malachite = "0.6.1"
lambdaworks-math = "0.11.0"
lambdaworks-math = "0.13.0"
bls12_381 = { git = "https://github.com/lambdaclass/bls12_381", branch = "expose-fp-struct", features = [
"groups",
"bits",
Expand Down
21 changes: 14 additions & 7 deletions crates/vm/levm/src/precompiles.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1057,8 +1057,10 @@ pub fn pairing_check(batch: &[(G1, G2)]) -> Result<bool, VMError> {
valid_batch.push((g1, g2));
}
let valid_batch_refs: Vec<_> = valid_batch.iter().map(|(p1, p2)| (p1, p2)).collect();
let result = BN254AtePairing::compute_batch(&valid_batch_refs)
.map_err(|PairingError::PointNotInSubgroup| PrecompileError::PointNotInSubgroup)?;
let result = BN254AtePairing::compute_batch(&valid_batch_refs).map_err(|e| match e {
PairingError::PointNotInSubgroup => PrecompileError::PointNotInSubgroup,
PairingError::DivisionByZero => PrecompileError::InvalidPoint,
})?;

Ok(result == QuadraticExtensionFieldElement::one())
}
Expand Down Expand Up @@ -1336,7 +1338,9 @@ pub fn bls12_g1add(
// equation holds since it has no solutions for an `x` coordinate where `y` is
// zero within the prime field space.
let x_squared = p0.0.square();
let s = (x_squared.double() + &x_squared + BLS12381Curve::a()) / p0.1.double();
let s = ((x_squared.double() + &x_squared + BLS12381Curve::a())
/ p0.1.double())
.map_err(|_e| VMError::Internal(InternalError::DivisionByZero))?;

let x = s.square() - p0.0.double();
let y = s * (p0.0 - &x) - p0.1;
Expand All @@ -1349,7 +1353,8 @@ pub fn bls12_g1add(
// The division may panic only when `t` has no inverse. This can only happen if
// `p0.0 == p1.0`, for which the defining equation gives us two possible values for
// `p0.1` and `p1.1`, which are 2 and -2. Both cases have already been handled before.
let l = (&p0.1 - p1.1) / (&p0.0 - &p1.0);
let l = ((&p0.1 - p1.1) / (&p0.0 - &p1.0))
.map_err(|_e| VMError::Internal(InternalError::DivisionByZero))?;

let x = l.square() - &p0.0 - p1.0;
let y = l * (p0.0 - &x) - p0.1;
Expand Down Expand Up @@ -1500,8 +1505,9 @@ pub fn bls12_g2add(
// equation holds since it has no solutions for an `x` coordinate where `y` is
// zero within the prime field space.
let x_squared = p0.0.square();
let s =
(x_squared.double() + &x_squared + BLS12381TwistCurve::a()) / p0.1.double();
let s = ((x_squared.double() + &x_squared + BLS12381TwistCurve::a())
/ p0.1.double())
.map_err(|_e| VMError::Internal(InternalError::DivisionByZero))?;

let x = s.square() - p0.0.double();
let y = s * (p0.0 - &x) - p0.1;
Expand All @@ -1514,7 +1520,8 @@ pub fn bls12_g2add(
// The division may panic only when `t` has no inverse. This can only happen if
// `p0.0 == p1.0`, for which the defining equation gives us two possible values for
// `p0.1` and `p1.1`, which are 2 and -2. Both cases have already been handled before.
let l = (&p0.1 - p1.1) / (&p0.0 - &p1.0);
let l = ((&p0.1 - p1.1) / (&p0.0 - &p1.0))
.map_err(|_e| VMError::Internal(InternalError::DivisionByZero))?;

let x = l.square() - &p0.0 - p1.0;
let y = l * (p0.0 - &x) - p0.1;
Expand Down
2 changes: 1 addition & 1 deletion tooling/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ libsql = "0.9.10"
futures = "0.3.31"
spawned-concurrency = "0.4.2"
spawned-rt = "0.4.2"
lambdaworks-crypto = "0.11.0"
lambdaworks-crypto = "0.13.0"
tui-logger = { version = "0.17.3", features = ["tracing-support"] }
crossbeam = "0.8.4"
rayon = "1.10.0"
Expand Down
Loading