From 13f992ff0b8e37111328f3b54032b4adee2a8a15 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michele=20Orr=C3=B9?= Date: Mon, 16 Dec 2024 21:29:47 +0100 Subject: [PATCH] Drop bls12-381 dependency. --- nimue/Cargo.toml | 4 +--- nimue/src/plugins/ark/tests.rs | 24 ++++++++++++------------ nimue/src/plugins/tests.rs | 13 +++++++------ 3 files changed, 20 insertions(+), 21 deletions(-) diff --git a/nimue/Cargo.toml b/nimue/Cargo.toml index c71cbe5..b1c84c0 100644 --- a/nimue/Cargo.toml +++ b/nimue/Cargo.toml @@ -19,14 +19,12 @@ ark-ff = { version = "^0.4", optional = true } ark-ec = { version = "^0.4", optional = true } ark-serialize = { version = "^0.4", optional = true, features = ["std"] } group = { version = "0.13.0", optional = true } -ark-bls12-381 = { version = "^0.4", optional = true } hex = "0.4.3" [features] default = [] ark = ["dep:ark-ff", "dep:ark-ec", "dep:ark-serialize"] group = ["dep:group"] -ark-bls12-381 = ["ark", "dep:ark-bls12-381"] asm = ["keccak/asm", "keccak/simd"] [dev-dependencies] @@ -39,7 +37,7 @@ curve25519-dalek = { version = "4.0.0", features = ["group"] } ark-curve25519 = "0.4.0" # test algebraic hashers bls12_381 = "0.8.0" -ark-bls12-381 = { version = "^0.4", features = ["std"] } +# ark-bls12-381 = { version = "^0.4", features = ["std"] } anyhow = { version = "1.0.75", features = ["backtrace"] } ark-pallas = { version = "^0.4", features = ["std"] } pallas = "^0.31" diff --git a/nimue/src/plugins/ark/tests.rs b/nimue/src/plugins/ark/tests.rs index c4852ff..69b827e 100644 --- a/nimue/src/plugins/ark/tests.rs +++ b/nimue/src/plugins/ark/tests.rs @@ -75,24 +75,24 @@ fn test_arkworks_end_to_end() -> ProofResult<()> { Ok(()) } -#[test] -fn test_squeeze_bytes_from_modp() { - use ark_bls12_381::{Fq, Fr}; - use ark_ff::PrimeField; +// #[test] +// fn test_squeeze_bytes_from_modp() { +// use ark_bls12_381::{Fq, Fr}; +// use ark_ff::PrimeField; - use crate::plugins::random_bytes_in_random_modp; - let useful_bytes = random_bytes_in_random_modp(Fr::MODULUS); - assert_eq!(useful_bytes, 127 / 8); +// use crate::plugins::random_bytes_in_random_modp; +// let useful_bytes = random_bytes_in_random_modp(Fr::MODULUS); +// assert_eq!(useful_bytes, 127 / 8); - let useful_bytes = random_bytes_in_random_modp(Fq::MODULUS); - assert_eq!(useful_bytes, 253 / 8); -} +// let useful_bytes = random_bytes_in_random_modp(Fq::MODULUS); +// assert_eq!(useful_bytes, 253 / 8); +// } #[test] fn test_arkworks() { - use ark_bls12_381::{Fq2, Fr}; + use ark_curve25519::{Fq, Fr}; type F = Fr; - type F2 = Fq2; + type F2 = Fq; test_arkworks_end_to_end::().unwrap(); test_arkworks_end_to_end::().unwrap(); diff --git a/nimue/src/plugins/tests.rs b/nimue/src/plugins/tests.rs index 7b4d03b..2a9c5bb 100644 --- a/nimue/src/plugins/tests.rs +++ b/nimue/src/plugins/tests.rs @@ -45,12 +45,13 @@ fn test_compatible_curve25519() { compatible_groups::(); } -#[test] -fn test_compatible_bls12_381() { - type ArkG = ark_bls12_381::G1Projective; - type GroupG = bls12_381::G1Projective; - compatible_groups::(); -} +// Ignored: ark_bls12_381 does not compile. +// #[test] +// fn test_compatible_bls12_381() { +// type ArkG = ark_bls12_381::G1Projective; +// type GroupG = bls12_381::G1Projective; +// compatible_groups::(); +// } #[ignore = "arkworks adds trailing 0-byte"] #[test]