Skip to content

Commit

Permalink
Merge branch 'dev' into umadayal/powers-of-alpha
Browse files Browse the repository at this point in the history
  • Loading branch information
umadayal committed Jan 29, 2025
2 parents f292823 + a78d2b6 commit b77740a
Show file tree
Hide file tree
Showing 27 changed files with 154 additions and 84 deletions.
48 changes: 47 additions & 1 deletion patch-testing/Cargo.lock

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

2 changes: 2 additions & 0 deletions patch-testing/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ members = [
"curve25519-dalek",
"curve25519-dalek-ng",
"rustcrypto-bigint",
"RustCrypto-rsa",
"bls12-381",
"bn", "build-host",
]
Expand Down Expand Up @@ -39,6 +40,7 @@ publish = false
sp1-zkvm = { path = "../crates/zkvm/entrypoint" }
sp1-build = { path = "../crates/build" }
sp1-sdk = { path = "../crates/sdk", default-features = false }
sp1-core-executor = { path = "../crates/core/executor" }
serde = { version = "1.0.215", features = ["derive"] }
sha2-v0-9-8 = { version = "0.9.8", package = "sha2" }
sha2-v0-10-6 = { version = "0.10.6", package = "sha2" }
Expand Down
1 change: 1 addition & 0 deletions patch-testing/RustCrypto-rsa/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ publish.workspace = true
[dependencies]
sp1-zkvm = { workspace = true }
sp1-sdk = { workspace = true }
sp1-core-executor = { workspace = true }
rand = { workspace = true }
sp1-test = { workspace = true }
rsa = { version = "0.9.7", features = ["std", "sha2", "serde"] }
Expand Down
8 changes: 4 additions & 4 deletions patch-testing/RustCrypto-rsa/program/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 patch-testing/RustCrypto-rsa/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ use rsa::{
RsaPublicKey,
};

#[sp1_test::sp1_test("rsa_test_verify_pkcs", gpu, prove)]
#[sp1_test::sp1_test("rsa_test_verify_pkcs", syscalls = [U256XU2048_MUL], gpu, prove)]
pub fn test_pkcs_verify_100(
stdin: &mut sp1_sdk::SP1Stdin,
) -> impl FnOnce(sp1_sdk::SP1PublicValues) {
Expand Down
1 change: 1 addition & 0 deletions patch-testing/bls12-381/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ publish.workspace = true
[dependencies]
sp1-zkvm = { workspace = true }
sp1-sdk = { workspace = true }
sp1-core-executor = { workspace = true }
rand.workspace = true
sp1-test = { workspace = true }

Expand Down
17 changes: 8 additions & 9 deletions patch-testing/bls12-381/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@

#[sp1_test::sp1_test("bls12_381_fp_test_sqrt", gpu, prove)]
#[sp1_test::sp1_test("bls12_381_fp_test_sqrt", syscalls = [BLS12381_FP_MUL], gpu, prove)]
pub fn test_sqrt_fp_100(stdin: &mut sp1_sdk::SP1Stdin) -> impl FnOnce(sp1_sdk::SP1PublicValues) {
use bls12_381::fp::Fp;

Expand Down Expand Up @@ -27,7 +26,7 @@ pub fn test_sqrt_fp_100(stdin: &mut sp1_sdk::SP1Stdin) -> impl FnOnce(sp1_sdk::S
}
}

#[sp1_test::sp1_test("bls12_381_fp_test_inverse", gpu, prove)]
#[sp1_test::sp1_test("bls12_381_fp_test_inverse", syscalls = [BLS12381_FP_MUL], gpu, prove)]
pub fn test_inverse_fp_100(stdin: &mut sp1_sdk::SP1Stdin) -> impl FnOnce(sp1_sdk::SP1PublicValues) {
use bls12_381::fp::Fp;

Expand Down Expand Up @@ -55,7 +54,7 @@ pub fn test_inverse_fp_100(stdin: &mut sp1_sdk::SP1Stdin) -> impl FnOnce(sp1_sdk
}
}

#[sp1_test::sp1_test("bls12_381_fp2_test_sqrt", gpu, prove)]
#[sp1_test::sp1_test("bls12_381_fp2_test_sqrt", syscalls = [BLS12381_FP_MUL, BLS12381_FP2_MUL], gpu, prove)]
pub fn test_sqrt_fp2_100(stdin: &mut sp1_sdk::SP1Stdin) -> impl FnOnce(sp1_sdk::SP1PublicValues) {
use bls12_381::fp2::Fp2;

Expand Down Expand Up @@ -83,7 +82,7 @@ pub fn test_sqrt_fp2_100(stdin: &mut sp1_sdk::SP1Stdin) -> impl FnOnce(sp1_sdk::
}
}

#[sp1_test::sp1_test("bls12_381_fp2_test_inverse", gpu, prove)]
#[sp1_test::sp1_test("bls12_381_fp2_test_inverse", syscalls = [BLS12381_FP_MUL, BLS12381_FP2_MUL], gpu, prove)]
pub fn test_inverse_fp2_100(
stdin: &mut sp1_sdk::SP1Stdin,
) -> impl FnOnce(sp1_sdk::SP1PublicValues) {
Expand Down Expand Up @@ -113,10 +112,10 @@ pub fn test_inverse_fp2_100(
}
}

#[sp1_test::sp1_test("bls12_381_ec_add_test", gpu, prove)]
#[sp1_test::sp1_test("bls12_381_ec_add_test", syscalls = [BLS12381_DOUBLE, BLS12381_ADD, BLS12381_FP_MUL, BLS12381_FP_SUB], gpu, prove)]
pub fn test_bls_add_100(stdin: &mut sp1_sdk::SP1Stdin) -> impl FnOnce(sp1_sdk::SP1PublicValues) {
use bls12_381::g1::G1Projective;
use bls12_381::g1::G1Affine;
use bls12_381::g1::G1Projective;
use group::Group;

let times: u8 = 100;
Expand Down Expand Up @@ -149,10 +148,10 @@ pub fn test_bls_add_100(stdin: &mut sp1_sdk::SP1Stdin) -> impl FnOnce(sp1_sdk::S
}
}

#[sp1_test::sp1_test("bls12_381_ec_double_test", gpu, prove)]
#[sp1_test::sp1_test("bls12_381_ec_double_test", syscalls = [BLS12381_DOUBLE, BLS12381_ADD, BLS12381_FP_ADD, BLS12381_FP_MUL, BLS12381_FP_SUB], gpu, prove)]
pub fn test_bls_double_100(stdin: &mut sp1_sdk::SP1Stdin) -> impl FnOnce(sp1_sdk::SP1PublicValues) {
use bls12_381::g1::G1Projective;
use bls12_381::g1::G1Affine;
use bls12_381::g1::G1Projective;
use group::Group;

let times: u8 = 100;
Expand Down
1 change: 1 addition & 0 deletions patch-testing/bn/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ publish.workspace = true
[dependencies]
sp1-zkvm = { workspace = true }
sp1-sdk = { workspace = true }
sp1-core-executor = { workspace = true }
rand = { workspace = true }
sp1-test = { workspace = true }
substrate-bn = "0.6.0"
Expand Down
10 changes: 5 additions & 5 deletions patch-testing/bn/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#[sp1_test::sp1_test("bn_test_fq_sqrt", gpu, prove)]
#[sp1_test::sp1_test("bn_test_fq_sqrt", syscalls = [BN254_FP_MUL], gpu, prove)]
pub fn test_bn_test_fq_sqrt_100(
stdin: &mut sp1_sdk::SP1Stdin,
) -> impl FnOnce(sp1_sdk::SP1PublicValues) {
Expand Down Expand Up @@ -34,7 +34,7 @@ pub fn test_bn_test_fq_sqrt_100(
}
}

#[sp1_test::sp1_test("bn_test_fq_inverse", gpu, prove)]
#[sp1_test::sp1_test("bn_test_fq_inverse", syscalls = [BN254_FP_MUL], gpu, prove)]
pub fn test_bn_test_fq_inverse_100(
stdin: &mut sp1_sdk::SP1Stdin,
) -> impl FnOnce(sp1_sdk::SP1PublicValues) {
Expand Down Expand Up @@ -70,7 +70,7 @@ pub fn test_bn_test_fq_inverse_100(
}
}

#[sp1_test::sp1_test("bn_test_fr_inverse", gpu, prove)]
#[sp1_test::sp1_test("bn_test_fr_inverse", syscalls = [UINT256_MUL], gpu, prove)]
pub fn test_bn_test_fr_inverse_100(
stdin: &mut sp1_sdk::SP1Stdin,
) -> impl FnOnce(sp1_sdk::SP1PublicValues) {
Expand Down Expand Up @@ -106,7 +106,7 @@ pub fn test_bn_test_fr_inverse_100(
}
}

#[sp1_test::sp1_test("bn_test_g1_add", gpu, prove)]
#[sp1_test::sp1_test("bn_test_g1_add", syscalls = [BN254_ADD, BN254_FP_ADD, BN254_FP_MUL], gpu, prove)]
pub fn test_bn_test_g1_add_100(
stdin: &mut sp1_sdk::SP1Stdin,
) -> impl FnOnce(sp1_sdk::SP1PublicValues) {
Expand Down Expand Up @@ -157,7 +157,7 @@ pub fn test_bn_test_g1_add_100(
|_| {}
}

#[sp1_test::sp1_test("bn_test_g1_double", gpu, prove)]
#[sp1_test::sp1_test("bn_test_g1_double", syscalls = [BN254_DOUBLE, BN254_FP_ADD, BN254_FP_MUL], gpu, prove)]
pub fn test_bn_test_g1_double_100(
stdin: &mut sp1_sdk::SP1Stdin,
) -> impl FnOnce(sp1_sdk::SP1PublicValues) {
Expand Down
1 change: 1 addition & 0 deletions patch-testing/curve25519-dalek-ng/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ publish.workspace = true

[dependencies]
sp1-sdk = { workspace = true }
sp1-core-executor = { workspace = true }
curve25519-dalek-ng = { workspace = true }
sp1-test = { workspace = true }
rand.workspace = true
Expand Down
Loading

0 comments on commit b77740a

Please sign in to comment.