num_traits:: -> algebra::
Pratyush Mishra pratyushmishra@berkeley.edu
Sat, 18 Jan 2020 18:06:46 -0800
10 files changed,
10 insertions(+),
10 deletions(-)
jump to
M
crypto-primitives/src/merkle_tree/mod.rs
→
crypto-primitives/src/merkle_tree/mod.rs
@@ -372,7 +372,7 @@ crh::{pedersen::*, *},
merkle_tree::*, }; use algebra::curves::jubjub::JubJubAffine as JubJub; - use num_traits::Zero; + use algebra::Zero; use rand::SeedableRng; use rand_xorshift::XorShiftRng;
M
crypto-primitives/src/nizk/mod.rs
→
crypto-primitives/src/nizk/mod.rs
@@ -60,7 +60,7 @@ #[test]
fn test_gm17() { use crate::nizk::{gm17::Gm17, NIZK}; use algebra::{curves::bls12_381::Bls12_381, fields::bls12_381::Fr}; - use num_traits::One; + use algebra::One; use r1cs_core::{ConstraintSynthesizer, ConstraintSystem, SynthesisError}; #[derive(Copy, Clone)]
M
crypto-primitives/src/signature/schnorr/mod.rs
→
crypto-primitives/src/signature/schnorr/mod.rs
@@ -6,7 +6,7 @@ groups::Group,
to_bytes, ToConstraintField, UniformRand, }; use digest::Digest; -use num_traits::{One, Zero}; +use algebra::{One, Zero}; use rand::Rng; use std::{ hash::Hash,
M
r1cs-std/src/bits/boolean.rs
→
r1cs-std/src/bits/boolean.rs
@@ -837,7 +837,7 @@ mod test {
use super::{AllocatedBit, Boolean}; use crate::{prelude::*, test_constraint_system::TestConstraintSystem}; use algebra::{fields::bls12_381::Fr, BitIterator, Field, PrimeField, UniformRand}; - use num_traits::{One, Zero}; + use algebra::{One, Zero}; use r1cs_core::ConstraintSystem; use rand::SeedableRng; use rand_xorshift::XorShiftRng;
M
r1cs-std/src/bits/uint32.rs
→
r1cs-std/src/bits/uint32.rs
@@ -345,7 +345,7 @@ mod test {
use super::UInt32; use crate::{bits::boolean::Boolean, test_constraint_system::TestConstraintSystem}; use algebra::fields::bls12_381::Fr; - use num_traits::{One, Zero}; + use algebra::{One, Zero}; use r1cs_core::ConstraintSystem; use rand::{Rng, SeedableRng}; use rand_xorshift::XorShiftRng;
M
r1cs-std/src/fields/fp12.rs
→
r1cs-std/src/fields/fp12.rs
@@ -8,7 +8,7 @@ Fp2Parameters,
}, BitIterator, Field, PrimeField, }; -use num_traits::One; +use algebra::One; use std::{borrow::Borrow, marker::PhantomData}; use crate::{prelude::*, Assignment};
M
r1cs-std/src/groups/curves/short_weierstrass/bls12/mod.rs
→
r1cs-std/src/groups/curves/short_weierstrass/bls12/mod.rs
@@ -3,7 +3,7 @@ curves::bls12::{Bls12Parameters, G1Prepared, TwistType},
fields::Field, BitIterator, ProjectiveCurve, }; -use num_traits::One; +use algebra::One; use r1cs_core::{ConstraintSystem, SynthesisError}; use crate::{
M
r1cs-std/src/groups/curves/short_weierstrass/mod.rs
→
r1cs-std/src/groups/curves/short_weierstrass/mod.rs
@@ -5,7 +5,7 @@ SWModelParameters,
}, AffineCurve, BitIterator, Field, PrimeField, ProjectiveCurve, }; -use num_traits::{One, Zero}; +use algebra::{One, Zero}; use r1cs_core::{ConstraintSystem, SynthesisError}; use std::{borrow::Borrow, marker::PhantomData, ops::Neg};
M
r1cs-std/src/groups/curves/twisted_edwards/mod.rs
→
r1cs-std/src/groups/curves/twisted_edwards/mod.rs
@@ -5,7 +5,7 @@ TEModelParameters,
}, BitIterator, Field, }; -use num_traits::{One, Zero}; +use algebra::{One, Zero}; use r1cs_core::{ConstraintSystem, SynthesisError};
M
r1cs-std/src/pairing/mod.rs
→
r1cs-std/src/pairing/mod.rs
@@ -60,7 +60,7 @@ mod test {
// use rand; use crate::test_constraint_system::TestConstraintSystem; use algebra::{BitIterator, Field}; - use num_traits::One; + use algebra::One; use r1cs_core::ConstraintSystem; #[test]