diff --git a/nexus/ped_bls12-381_test/src/guest/src/main.rs b/nexus/ped_bls12-381_test/src/guest/src/main.rs deleted file mode 100644 index 9a982df..0000000 --- a/nexus/ped_bls12-381_test/src/guest/src/main.rs +++ /dev/null @@ -1,8 +0,0 @@ -#![cfg_attr(target_arch = "riscv32", no_std, no_main)] - -use nexus_rt::print; - -#[nexus_rt::main] -fn main() { - print!("Hello, World!\n"); -} diff --git a/nexus/ped_bls12-381_test/.gitignore b/nexus/ped_bls12_381_test/.gitignore similarity index 100% rename from nexus/ped_bls12-381_test/.gitignore rename to nexus/ped_bls12_381_test/.gitignore diff --git a/nexus/ped_bls12-381_test/Cargo.toml b/nexus/ped_bls12_381_test/Cargo.toml similarity index 100% rename from nexus/ped_bls12-381_test/Cargo.toml rename to nexus/ped_bls12_381_test/Cargo.toml diff --git a/nexus/ped_bls12-381_test/rust-toolchain.toml b/nexus/ped_bls12_381_test/rust-toolchain.toml similarity index 100% rename from nexus/ped_bls12-381_test/rust-toolchain.toml rename to nexus/ped_bls12_381_test/rust-toolchain.toml diff --git a/nexus/ped_bls12-381_test/src/guest/.cargo/config.toml b/nexus/ped_bls12_381_test/src/guest/.cargo/config.toml similarity index 100% rename from nexus/ped_bls12-381_test/src/guest/.cargo/config.toml rename to nexus/ped_bls12_381_test/src/guest/.cargo/config.toml diff --git a/nexus/ped_bls12-381_test/src/guest/Cargo.toml b/nexus/ped_bls12_381_test/src/guest/Cargo.toml similarity index 94% rename from nexus/ped_bls12-381_test/src/guest/Cargo.toml rename to nexus/ped_bls12_381_test/src/guest/Cargo.toml index da8c52d..f9357f4 100644 --- a/nexus/ped_bls12-381_test/src/guest/Cargo.toml +++ b/nexus/ped_bls12_381_test/src/guest/Cargo.toml @@ -6,7 +6,7 @@ edition = "2024" [dependencies] nexus-rt = { git = "https://github.com/nexus-xyz/nexus-zkvm.git", tag = "0.3.4", version = "0.3.4" } postcard = { version = "1.1.1", default-features = false, features = ["alloc"] } - +bls12_381 = "0.8.0" # Generated by cargo-nexus, do not remove! # [features] diff --git a/nexus/ped_bls12-381_test/src/guest/rust-toolchain.toml b/nexus/ped_bls12_381_test/src/guest/rust-toolchain.toml similarity index 100% rename from nexus/ped_bls12-381_test/src/guest/rust-toolchain.toml rename to nexus/ped_bls12_381_test/src/guest/rust-toolchain.toml diff --git a/nexus/ped_bls12_381_test/src/guest/src/main.rs b/nexus/ped_bls12_381_test/src/guest/src/main.rs new file mode 100644 index 0000000..c89667a --- /dev/null +++ b/nexus/ped_bls12_381_test/src/guest/src/main.rs @@ -0,0 +1,20 @@ +#![cfg_attr(target_arch = "riscv32", no_std, no_main)] + +#[nexus_rt::main] +fn main() { + // TODO: do something with the input + let g1 = bls12_381::G1Affine::generator(); + let g1_proj = bls12_381::G1Projective::from(g1); + let g2 = g1_proj + g1; + let g3 = g1 + g2; + let g4 = g1 + g3; + let g5 = g1 + g4; + + let s1 = bls12_381::Scalar::from(87329482u64); + let s2 = bls12_381::Scalar::from(37264829u64); + let s3 = bls12_381::Scalar::from(98098098u64); + let s4 = bls12_381::Scalar::from(63980948u64); + let s5 = bls12_381::Scalar::from(15098098u64); + + let _ = s1*g1 + s2*g2 + s3*g3 + s4*g4 + s5*g5; +} diff --git a/nexus/ped_bls12-381_test/src/main.rs b/nexus/ped_bls12_381_test/src/main.rs similarity index 100% rename from nexus/ped_bls12-381_test/src/main.rs rename to nexus/ped_bls12_381_test/src/main.rs diff --git a/nexus/ped_curve25519_test/src/guest/src/main.rs b/nexus/ped_curve25519_test/src/guest/src/main.rs index 277e13f..2721c1c 100644 --- a/nexus/ped_curve25519_test/src/guest/src/main.rs +++ b/nexus/ped_curve25519_test/src/guest/src/main.rs @@ -7,9 +7,6 @@ use curve25519_dalek::traits::MultiscalarMul; #[nexus_rt::main] fn main() { - // read the input - let input: u32 = env::read(); - // TODO: do something with the input let s1 = Scalar::from(87329482u64); let s2 = Scalar::from(37264829u64); diff --git a/nexus/ped_jubjub_test/src/guest/Cargo.toml b/nexus/ped_jubjub_test/src/guest/Cargo.toml index 6292895..7619d7a 100644 --- a/nexus/ped_jubjub_test/src/guest/Cargo.toml +++ b/nexus/ped_jubjub_test/src/guest/Cargo.toml @@ -8,6 +8,7 @@ nexus-rt = { git = "https://github.com/nexus-xyz/nexus-zkvm.git", tag = "0.3.4", postcard = { version = "1.1.1", default-features = false, features = ["alloc"] } jubjub = "0.10.0" group = "0.13.0" + # Generated by cargo-nexus, do not remove! # [features] diff --git a/nexus/ped_jubjub_test/src/guest/src/main.rs b/nexus/ped_jubjub_test/src/guest/src/main.rs index 44f20b7..03a7494 100644 --- a/nexus/ped_jubjub_test/src/guest/src/main.rs +++ b/nexus/ped_jubjub_test/src/guest/src/main.rs @@ -8,7 +8,7 @@ fn main() { let g3 = g1 + g2; let g4 = g1 + g3; let g5 = g1 + g4; - + let s1 = jubjub::Fr::from(87329482u64); let s2 = jubjub::Fr::from(37264829u64); let s3 = jubjub::Fr::from(98098098u64); diff --git a/nexus/ped_pallas_test/.gitignore b/nexus/ped_pallas_test/.gitignore deleted file mode 100644 index ea8c4bf..0000000 --- a/nexus/ped_pallas_test/.gitignore +++ /dev/null @@ -1 +0,0 @@ -/target diff --git a/nexus/ped_pallas_test/src/guest/src/main.rs b/nexus/ped_pallas_test/src/guest/src/main.rs index 8a3f49d..2017736 100644 --- a/nexus/ped_pallas_test/src/guest/src/main.rs +++ b/nexus/ped_pallas_test/src/guest/src/main.rs @@ -1,4 +1,5 @@ #![cfg_attr(target_arch = "riscv32", no_std, no_main)] + use pasta_curves::group::Group; #[nexus_rt::main] @@ -8,7 +9,7 @@ fn main() { let g3 = g1 + g2; let g4 = g1 + g3; let g5 = g1 + g4; - + let s1 = pasta_curves::pallas::Scalar::from(87329482u64); let s2 = pasta_curves::pallas::Scalar::from(37264829u64); let s3 = pasta_curves::pallas::Scalar::from(98098098u64);