diff --git a/ec/src/hashing/map_to_curve_hasher.rs b/ec/src/hashing/map_to_curve_hasher.rs index 4cdfb017f..bbb005767 100644 --- a/ec/src/hashing/map_to_curve_hasher.rs +++ b/ec/src/hashing/map_to_curve_hasher.rs @@ -1,4 +1,7 @@ -use crate::{hashing::*, AffineRepr, CurveGroup}; +use crate::{ + hashing::{HashToCurve, HashToCurveError}, + AffineRepr, CurveGroup, +}; use ark_ff::field_hashers::HashToField; use ark_std::marker::PhantomData; diff --git a/ec/src/models/bls12/g1.rs b/ec/src/models/bls12/g1.rs index 2c229beb2..0b5a3a697 100644 --- a/ec/src/models/bls12/g1.rs +++ b/ec/src/models/bls12/g1.rs @@ -3,7 +3,7 @@ use crate::{ short_weierstrass::{Affine, Projective}, AffineRepr, CurveGroup, }; -use ark_serialize::*; +use ark_serialize::{CanonicalDeserialize, CanonicalSerialize}; use ark_std::vec::Vec; pub type G1Affine
= Affine<
::G1Config>; diff --git a/ec/src/models/bls12/g2.rs b/ec/src/models/bls12/g2.rs index 629ddcda4..de501b1e7 100644 --- a/ec/src/models/bls12/g2.rs +++ b/ec/src/models/bls12/g2.rs @@ -1,5 +1,5 @@ use ark_ff::{AdditiveGroup, BitIteratorBE, Field, Fp2}; -use ark_serialize::*; +use ark_serialize::{CanonicalDeserialize, CanonicalSerialize}; use ark_std::{vec::Vec, One}; use crate::{ diff --git a/ec/src/models/bn/g1.rs b/ec/src/models/bn/g1.rs index 4a6ea65b8..72a55e1b7 100644 --- a/ec/src/models/bn/g1.rs +++ b/ec/src/models/bn/g1.rs @@ -3,7 +3,7 @@ use crate::{ short_weierstrass::{Affine, Projective}, AffineRepr, CurveGroup, }; -use ark_serialize::*; +use ark_serialize::{CanonicalDeserialize, CanonicalSerialize}; use ark_std::vec::Vec; pub type G1Affine
= Affine<
::G1Config>; diff --git a/ec/src/models/bn/g2.rs b/ec/src/models/bn/g2.rs index 281064496..40e0d365f 100644 --- a/ec/src/models/bn/g2.rs +++ b/ec/src/models/bn/g2.rs @@ -2,7 +2,7 @@ use ark_ff::{ fields::{Field, Fp2}, AdditiveGroup, }; -use ark_serialize::*; +use ark_serialize::{CanonicalDeserialize, CanonicalSerialize}; use ark_std::vec::Vec; use num_traits::One; diff --git a/ec/src/models/bw6/g1.rs b/ec/src/models/bw6/g1.rs index 6960d19d7..83fc69acf 100644 --- a/ec/src/models/bw6/g1.rs +++ b/ec/src/models/bw6/g1.rs @@ -3,7 +3,7 @@ use crate::{ short_weierstrass::{Affine, Projective}, AffineRepr, CurveGroup, }; -use ark_serialize::*; +use ark_serialize::{CanonicalDeserialize, CanonicalSerialize}; use ark_std::vec::Vec; pub type G1Affine
= Affine<
::G1Config>; diff --git a/ec/src/models/bw6/g2.rs b/ec/src/models/bw6/g2.rs index 7614e2c5b..3e9ba82f1 100644 --- a/ec/src/models/bw6/g2.rs +++ b/ec/src/models/bw6/g2.rs @@ -1,5 +1,5 @@ use ark_ff::{AdditiveGroup, BitIteratorBE, Field}; -use ark_serialize::*; +use ark_serialize::{CanonicalDeserialize, CanonicalSerialize}; use ark_std::vec::Vec; use num_traits::One; diff --git a/ec/src/models/mnt4/g1.rs b/ec/src/models/mnt4/g1.rs index 98ece3c61..c3d96a4d3 100644 --- a/ec/src/models/mnt4/g1.rs +++ b/ec/src/models/mnt4/g1.rs @@ -4,7 +4,7 @@ use crate::{ AffineRepr, CurveGroup, }; use ark_ff::Fp2; -use ark_serialize::*; +use ark_serialize::{CanonicalDeserialize, CanonicalSerialize}; use ark_std::vec::Vec; pub type G1Affine
= Affine<
::G1Config>; diff --git a/ec/src/models/mnt4/g2.rs b/ec/src/models/mnt4/g2.rs index a27167769..69f7f244a 100644 --- a/ec/src/models/mnt4/g2.rs +++ b/ec/src/models/mnt4/g2.rs @@ -7,7 +7,7 @@ use crate::{ AffineRepr, CurveGroup, }; use ark_ff::fields::{Field, Fp2}; -use ark_serialize::*; +use ark_serialize::{CanonicalDeserialize, CanonicalSerialize}; use ark_std::vec::Vec; use num_traits::One; diff --git a/ec/src/models/mnt6/g1.rs b/ec/src/models/mnt6/g1.rs index c66ed5af7..be72b8851 100644 --- a/ec/src/models/mnt6/g1.rs +++ b/ec/src/models/mnt6/g1.rs @@ -4,7 +4,7 @@ use crate::{ AffineRepr, CurveGroup, }; use ark_ff::Fp3; -use ark_serialize::*; +use ark_serialize::{CanonicalDeserialize, CanonicalSerialize}; use ark_std::vec::Vec; pub type G1Affine
= Affine<
::G1Config>;
diff --git a/ec/src/models/mnt6/g2.rs b/ec/src/models/mnt6/g2.rs
index cf2639c90..e6036a631 100644
--- a/ec/src/models/mnt6/g2.rs
+++ b/ec/src/models/mnt6/g2.rs
@@ -5,7 +5,7 @@ use crate::{
AffineRepr, CurveGroup,
};
use ark_ff::fields::{Field, Fp3};
-use ark_serialize::*;
+use ark_serialize::{CanonicalDeserialize, CanonicalSerialize};
use ark_std::{ops::Neg, vec::Vec};
use num_traits::One;
diff --git a/ff-asm/src/lib.rs b/ff-asm/src/lib.rs
index c0e8b8181..7d9af6e8b 100644
--- a/ff-asm/src/lib.rs
+++ b/ff-asm/src/lib.rs
@@ -15,7 +15,7 @@ use syn::{
};
mod context;
-use context::*;
+use context::{AssemblyVar, Context};
use std::cell::RefCell;
diff --git a/ff-macros/src/montgomery/mod.rs b/ff-macros/src/montgomery/mod.rs
index 4b3cdd146..7c4cd0b66 100644
--- a/ff-macros/src/montgomery/mod.rs
+++ b/ff-macros/src/montgomery/mod.rs
@@ -5,20 +5,20 @@ use num_bigint::BigUint;
use num_traits::One;
mod biginteger;
-use biginteger::*;
+use biginteger::{add_with_carry_impl, sub_with_borrow_impl, subtract_modulus_impl};
mod add;
-use add::*;
+use add::add_assign_impl;
mod double;
-use double::*;
+use double::double_in_place_impl;
mod mul;
-use mul::*;
+use mul::mul_assign_impl;
mod square;
-use square::*;
+use square::square_in_place_impl;
mod sum_of_products;
-use sum_of_products::*;
+use sum_of_products::sum_of_products_impl;
use crate::utils;
diff --git a/ff/src/fields/models/fp12_2over3over2.rs b/ff/src/fields/models/fp12_2over3over2.rs
index 16f0e2ba0..3f418712f 100644
--- a/ff/src/fields/models/fp12_2over3over2.rs
+++ b/ff/src/fields/models/fp12_2over3over2.rs
@@ -1,8 +1,11 @@
use ark_std::Zero;
-use super::quadratic_extension::*;
+use super::quadratic_extension::{QuadExtConfig, QuadExtField};
use crate::{
- fields::{fp6_3over2::*, Field, Fp2, Fp2Config as Fp2ConfigTrait},
+ fields::{
+ fp6_3over2::{Fp6, Fp6Config},
+ Field, Fp2, Fp2Config as Fp2ConfigTrait,
+ },
AdditiveGroup, CyclotomicMultSubgroup,
};
use core::{
diff --git a/ff/src/fields/models/fp2.rs b/ff/src/fields/models/fp2.rs
index 16b9dd819..85b2a86b3 100644
--- a/ff/src/fields/models/fp2.rs
+++ b/ff/src/fields/models/fp2.rs
@@ -1,6 +1,6 @@
use ark_std::Zero;
-use super::quadratic_extension::*;
+use super::quadratic_extension::{QuadExtConfig, QuadExtField};
use crate::{fields::PrimeField, CyclotomicMultSubgroup};
use core::{marker::PhantomData, ops::Not};
diff --git a/ff/src/fields/models/fp3.rs b/ff/src/fields/models/fp3.rs
index 75d9e150b..3d44f8fe3 100644
--- a/ff/src/fields/models/fp3.rs
+++ b/ff/src/fields/models/fp3.rs
@@ -1,5 +1,5 @@
-use super::cubic_extension::*;
-use crate::fields::*;
+use super::cubic_extension::{CubicExtConfig, CubicExtField};
+use crate::fields::{CyclotomicMultSubgroup, MulAssign, PrimeField, SqrtPrecomputation};
use core::marker::PhantomData;
/// Trait that specifies constants and methods for defining degree-three extension fields.
diff --git a/ff/src/fields/models/fp4.rs b/ff/src/fields/models/fp4.rs
index fe8a99008..3af5f20fe 100644
--- a/ff/src/fields/models/fp4.rs
+++ b/ff/src/fields/models/fp4.rs
@@ -1,6 +1,6 @@
use ark_std::Zero;
-use super::quadratic_extension::*;
+use super::quadratic_extension::{QuadExtConfig, QuadExtField};
use core::{marker::PhantomData, ops::Not};
use crate::{
diff --git a/ff/src/fields/models/fp6_2over3.rs b/ff/src/fields/models/fp6_2over3.rs
index 5eb8dcd44..0b2c4e948 100644
--- a/ff/src/fields/models/fp6_2over3.rs
+++ b/ff/src/fields/models/fp6_2over3.rs
@@ -1,6 +1,6 @@
use ark_std::Zero;
-use super::quadratic_extension::*;
+use super::quadratic_extension::{QuadExtConfig, QuadExtField};
use core::{
marker::PhantomData,
ops::{MulAssign, Not},
diff --git a/ff/src/fields/models/fp6_3over2.rs b/ff/src/fields/models/fp6_3over2.rs
index ef637ec92..9834ba8b5 100644
--- a/ff/src/fields/models/fp6_3over2.rs
+++ b/ff/src/fields/models/fp6_3over2.rs
@@ -1,5 +1,7 @@
-use super::cubic_extension::*;
-use crate::fields::*;
+use super::cubic_extension::{CubicExtConfig, CubicExtField};
+use crate::fields::{
+ AddAssign, CyclotomicMultSubgroup, Fp2, Fp2Config, MulAssign, SqrtPrecomputation, SubAssign,
+};
use core::marker::PhantomData;
pub trait Fp6Config: 'static + Send + Sync + Copy {
diff --git a/poly/src/domain/radix2/fft.rs b/poly/src/domain/radix2/fft.rs
index 3bb469b66..5310a4c91 100644
--- a/poly/src/domain/radix2/fft.rs
+++ b/poly/src/domain/radix2/fft.rs
@@ -1,7 +1,11 @@
// The code below is a port of the excellent library of https://github.com/kwantam/fffft by Riad S. Wahby
// to the arkworks APIs
-use crate::domain::{radix2::*, utils::compute_powers_serial, DomainCoeff};
+use crate::domain::{
+ radix2::{fft, EvaluationDomain, Radix2EvaluationDomain},
+ utils::compute_powers_serial,
+ DomainCoeff,
+};
use ark_ff::FftField;
use ark_std::{cfg_chunks_mut, vec::Vec};
#[cfg(feature = "parallel")]
diff --git a/poly/src/polynomial/mod.rs b/poly/src/polynomial/mod.rs
index 27e603dce..34e41ee41 100644
--- a/poly/src/polynomial/mod.rs
+++ b/poly/src/polynomial/mod.rs
@@ -1,6 +1,6 @@
//! Modules for working with univariate or multivariate polynomials.
use ark_ff::{Field, Zero};
-use ark_serialize::*;
+use ark_serialize::{CanonicalDeserialize, CanonicalSerialize};
use ark_std::{
fmt::Debug,
hash::Hash,
diff --git a/poly/src/polynomial/univariate/dense.rs b/poly/src/polynomial/univariate/dense.rs
index 24e7dc068..791930733 100644
--- a/poly/src/polynomial/univariate/dense.rs
+++ b/poly/src/polynomial/univariate/dense.rs
@@ -4,7 +4,7 @@ use crate::{
DenseUVPolynomial, EvaluationDomain, Evaluations, GeneralEvaluationDomain, Polynomial,
};
use ark_ff::{FftField, Field, Zero};
-use ark_serialize::*;
+use ark_serialize::{CanonicalDeserialize, CanonicalSerialize};
use ark_std::{
fmt,
ops::{Add, AddAssign, Deref, DerefMut, Div, Mul, Neg, Sub, SubAssign},
diff --git a/serialize-derive/src/lib.rs b/serialize-derive/src/lib.rs
index 6729fcdd3..a9801a3db 100644
--- a/serialize-derive/src/lib.rs
+++ b/serialize-derive/src/lib.rs
@@ -10,10 +10,10 @@
use syn::{parse_macro_input, DeriveInput};
mod serialize;
-use serialize::*;
+use serialize::impl_canonical_serialize;
mod deserialize;
-use deserialize::*;
+use deserialize::impl_canonical_deserialize;
#[proc_macro_derive(CanonicalSerialize)]
pub fn derive_canonical_serialize(input: proc_macro::TokenStream) -> proc_macro::TokenStream {
diff --git a/serialize/src/impls.rs b/serialize/src/impls.rs
index c71349f1b..5e4a8a7ef 100644
--- a/serialize/src/impls.rs
+++ b/serialize/src/impls.rs
@@ -9,7 +9,10 @@ use ark_std::{
};
use num_bigint::BigUint;
-use crate::*;
+use crate::{
+ CanonicalDeserialize, CanonicalSerialize, Compress, SerializationError, ToOwned, Valid,
+ Validate,
+};
impl Valid for bool {
fn check(&self) -> Result<(), SerializationError> {
diff --git a/test-curves/benches/bls12_381.rs b/test-curves/benches/bls12_381.rs
index 0fedd55a6..6f18cd079 100644
--- a/test-curves/benches/bls12_381.rs
+++ b/test-curves/benches/bls12_381.rs
@@ -1,4 +1,4 @@
-use ark_algebra_bench_templates::*;
+use ark_algebra_bench_templates::{bench, criterion_main, field_common, paste, prime_field, sqrt};
use ark_test_curves::bls12_381::{
fq::Fq, fq2::Fq2, fr::Fr, Bls12_381, Fq12, G1Projective as G1, G2Projective as G2,
};
diff --git a/test-curves/benches/bn384_small_two_adicity.rs b/test-curves/benches/bn384_small_two_adicity.rs
index e80a1ea89..f94b6f538 100644
--- a/test-curves/benches/bn384_small_two_adicity.rs
+++ b/test-curves/benches/bn384_small_two_adicity.rs
@@ -1,4 +1,4 @@
-use ark_algebra_bench_templates::*;
+use ark_algebra_bench_templates::{bench, criterion_main, field_common, paste, prime_field, sqrt};
use ark_test_curves::bn384_small_two_adicity::{fq::Fq, fr::Fr, G1Projective as G1};
bench!(Name = "BN384", Group = G1, ScalarField = Fr, BaseField = Fq,);
diff --git a/test-curves/benches/ed_on_bls12_381.rs b/test-curves/benches/ed_on_bls12_381.rs
index 15da037d0..ce2a0ac34 100644
--- a/test-curves/benches/ed_on_bls12_381.rs
+++ b/test-curves/benches/ed_on_bls12_381.rs
@@ -1,4 +1,4 @@
-use ark_algebra_bench_templates::*;
+use ark_algebra_bench_templates::{bench, criterion_main, field_common, paste, prime_field, sqrt};
use ark_test_curves::ed_on_bls12_381::{Fq, Fr, Projective};
bench!(
diff --git a/test-curves/benches/mnt4_753.rs b/test-curves/benches/mnt4_753.rs
index b27e35f01..966294d8d 100644
--- a/test-curves/benches/mnt4_753.rs
+++ b/test-curves/benches/mnt4_753.rs
@@ -1,4 +1,4 @@
-use ark_algebra_bench_templates::*;
+use ark_algebra_bench_templates::{bench, criterion_main, field_common, paste, prime_field, sqrt};
use ark_test_curves::mnt4_753::{fq::Fq, fr::Fr, G1Projective as G1};
bench!(
diff --git a/test-curves/src/bls12_381/fq12.rs b/test-curves/src/bls12_381/fq12.rs
index de8a23ec4..926f6b9b2 100644
--- a/test-curves/src/bls12_381/fq12.rs
+++ b/test-curves/src/bls12_381/fq12.rs
@@ -1,5 +1,8 @@
-use crate::bls12_381::*;
-use ark_ff::{fields::*, MontFp};
+use crate::bls12_381::{Fq2, Fq6, Fq6Config, FQ2_ONE, FQ2_ZERO};
+use ark_ff::{
+ fields::{Fp12, Fp12Config, Fp2},
+ MontFp,
+};
pub type Fq12 = Fp12