diff --git a/Cargo.toml b/Cargo.toml index fc39e57..d4a594a 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -14,9 +14,8 @@ rand_new = {package="rand", version="0.8.5"} rand = "0.4.6" # rand = "0.8" num = "0.4" -num-bigint = {version = "0.4", features = ["rand"]} +num-bigint = {version = "0.4", features = ["rand", "serde"]} num-traits = "0.2.8" -# blake2 = "0.10.6" blake-hash = {version="0.4.0", optional=true} blake = {version="2.0.1", optional=true} generic-array = "0.14" diff --git a/src/lib.rs b/src/lib.rs index 143ecbe..558ea7d 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -205,7 +205,6 @@ pub trait FrBigIntConversion { impl FrBigIntConversion for Fr { // Note: this could probably be more efficient by converting bigint to raw repr to Fr fn from_bigint(bi: &BigInt) -> Fr { - println!("bi: {}", bi.to_string()); Fr::from_str(&bi.to_string()).unwrap() } fn to_bigint(&self) -> BigInt { @@ -705,7 +704,6 @@ impl DLEQProof { // TODO: better error handling (not assert), make it more efficient too: assert!(x_bigint < modulus); - // println!("modulus overflow? isn't it bigger than Fr's order: {:?}", modulus_overflowed); let k_bigint = rand_new::thread_rng().gen_biguint(512).to_bigint().unwrap() % &modulus; let k = Fl::from_bigint(&k_bigint); @@ -744,7 +742,6 @@ impl DLEQProof { ); let challenge = DLEQProof::get_challenge(&self.A, &self.B, &self.xA, &self.xB, &kA_, &kB_); - println!("got challenge: {:?} which should equal {:?}", challenge, self.challenge); return challenge == self.challenge; @@ -789,7 +786,6 @@ mod tests { let mut rng = rand_new::thread_rng(); let x = Fl::from_bigint(&rng.gen_biguint(512).to_bigint().unwrap()); let proof = DLEQProof::new(x, point_A, point_B).unwrap(); - println!("proof: {:?}", proof.verify()); assert!(proof.verify()); } #[test]