From af9f5f2cf698f879c2eb1a7b8c4196394b7b18c6 Mon Sep 17 00:00:00 2001 From: Jack Grigg Date: Thu, 25 Jun 2020 22:03:14 +1200 Subject: [PATCH 01/11] bellman: Migrate to sha2 0.9 --- bellman/Cargo.toml | 2 +- bellman/src/gadgets/sha256.rs | 5 ++--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/bellman/Cargo.toml b/bellman/Cargo.toml index b056b6c2bd..5e52192d0f 100644 --- a/bellman/Cargo.toml +++ b/bellman/Cargo.toml @@ -27,7 +27,7 @@ subtle = "2.2.1" hex-literal = "0.2" rand = "0.7" rand_xorshift = "0.2" -sha2 = "0.8" +sha2 = "0.9" [features] groth16 = ["pairing"] diff --git a/bellman/src/gadgets/sha256.rs b/bellman/src/gadgets/sha256.rs index 2db3e6ce13..8f5f66dfe2 100644 --- a/bellman/src/gadgets/sha256.rs +++ b/bellman/src/gadgets/sha256.rs @@ -343,8 +343,8 @@ mod test { for input_len in (0..32).chain((32..256).filter(|a| a % 8 == 0)) { let mut h = Sha256::new(); let data: Vec = (0..input_len).map(|_| rng.next_u32() as u8).collect(); - h.input(&data); - let hash_result = h.result(); + h.update(&data); + let hash_result = h.finalize(); let mut cs = TestConstraintSystem::::new(); let mut input_bits = vec![]; @@ -366,7 +366,6 @@ mod test { assert!(cs.is_satisfied()); let mut s = hash_result - .as_ref() .iter() .flat_map(|&byte| (0..8).rev().map(move |i| (byte >> i) & 1u8 == 1u8)); From 0db22b1838b620c37335256eed56beba3c177a1f Mon Sep 17 00:00:00 2001 From: Jack Grigg Date: Thu, 25 Jun 2020 22:04:24 +1200 Subject: [PATCH 02/11] bellman: Migrate to bit-vec 0.6 --- bellman/Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bellman/Cargo.toml b/bellman/Cargo.toml index 5e52192d0f..09b7720ebd 100644 --- a/bellman/Cargo.toml +++ b/bellman/Cargo.toml @@ -10,7 +10,7 @@ version = "0.6.0" edition = "2018" [dependencies] -bit-vec = "0.4.4" +bit-vec = "0.6" blake2s_simd = "0.5" ff = { version = "0.6", path = "../ff" } futures = "0.1" From 5fe2d6a57c47e45ae8127afe65cfdadf62852e94 Mon Sep 17 00:00:00 2001 From: Jack Grigg Date: Thu, 25 Jun 2020 22:14:10 +1200 Subject: [PATCH 03/11] zcash_primitives: ripemd160 0.9 and sha2 0.9 --- zcash_primitives/Cargo.toml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/zcash_primitives/Cargo.toml b/zcash_primitives/Cargo.toml index 4a99d00909..160c89ae0d 100644 --- a/zcash_primitives/Cargo.toml +++ b/zcash_primitives/Cargo.toml @@ -26,9 +26,9 @@ log = "0.4" pairing = { version = "0.16", path = "../pairing" } rand = "0.7" rand_core = "0.5.1" -ripemd160 = { version = "0.8", optional = true } +ripemd160 = { version = "0.9", optional = true } secp256k1 = { version = "=0.15.0", optional = true } -sha2 = "0.8" +sha2 = "0.9" subtle = "2.2.1" [dev-dependencies] From bc8a839c612aca720fc840a9ea428065aa1843a6 Mon Sep 17 00:00:00 2001 From: Jack Grigg Date: Thu, 25 Jun 2020 22:23:42 +1200 Subject: [PATCH 04/11] Migrate to hex 0.4 --- zcash_client_backend/Cargo.toml | 2 +- zcash_primitives/Cargo.toml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/zcash_client_backend/Cargo.toml b/zcash_client_backend/Cargo.toml index e9d33967e1..5cd64e3b1f 100644 --- a/zcash_client_backend/Cargo.toml +++ b/zcash_client_backend/Cargo.toml @@ -15,7 +15,7 @@ edition = "2018" bech32 = "0.7" bs58 = { version = "0.3", features = ["check"] } ff = { version = "0.6", path = "../ff" } -hex = "0.3" +hex = "0.4" pairing = { version = "0.16", path = "../pairing" } protobuf = "=2.14.0" # 2.15 has MSRV of 1.44.1 subtle = "2" diff --git a/zcash_primitives/Cargo.toml b/zcash_primitives/Cargo.toml index 160c89ae0d..f513428902 100644 --- a/zcash_primitives/Cargo.toml +++ b/zcash_primitives/Cargo.toml @@ -20,7 +20,7 @@ crypto_api_chachapoly = "0.2.1" equihash = { version = "0.1", path = "../components/equihash" } ff = { version = "0.6", path = "../ff" } fpe = "0.2" -hex = "0.3" +hex = "0.4" lazy_static = "1" log = "0.4" pairing = { version = "0.16", path = "../pairing" } From 9ced89a1b0c2c19afa911763c133d84f9fd503c6 Mon Sep 17 00:00:00 2001 From: Jack Grigg Date: Thu, 25 Jun 2020 23:46:39 +1200 Subject: [PATCH 05/11] zcash_primitives: secp256k1 0.17 --- zcash_primitives/Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/zcash_primitives/Cargo.toml b/zcash_primitives/Cargo.toml index f513428902..c8221c71d2 100644 --- a/zcash_primitives/Cargo.toml +++ b/zcash_primitives/Cargo.toml @@ -27,7 +27,7 @@ pairing = { version = "0.16", path = "../pairing" } rand = "0.7" rand_core = "0.5.1" ripemd160 = { version = "0.9", optional = true } -secp256k1 = { version = "=0.15.0", optional = true } +secp256k1 = { version = "0.17", optional = true } sha2 = "0.9" subtle = "2.2.1" From 751ddad17d1dbfe9127a41a89e445b430fa15853 Mon Sep 17 00:00:00 2001 From: Jack Grigg Date: Thu, 25 Jun 2020 23:50:39 +1200 Subject: [PATCH 06/11] zcash_primitives: crypto_api_chachapoly 0.4 --- zcash_primitives/Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/zcash_primitives/Cargo.toml b/zcash_primitives/Cargo.toml index c8221c71d2..6931258739 100644 --- a/zcash_primitives/Cargo.toml +++ b/zcash_primitives/Cargo.toml @@ -16,7 +16,7 @@ aes = "0.3" blake2b_simd = "0.5" blake2s_simd = "0.5" byteorder = "1" -crypto_api_chachapoly = "0.2.1" +crypto_api_chachapoly = "0.4" equihash = { version = "0.1", path = "../components/equihash" } ff = { version = "0.6", path = "../ff" } fpe = "0.2" From f8e74af56cf5d8a9347e4176c30dfbf0be124bb9 Mon Sep 17 00:00:00 2001 From: Jack Grigg Date: Thu, 25 Jun 2020 23:52:38 +1200 Subject: [PATCH 07/11] zcash_history: quickcheck 0.9 --- zcash_history/Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/zcash_history/Cargo.toml b/zcash_history/Cargo.toml index 8f254e28ed..d25a1347c3 100644 --- a/zcash_history/Cargo.toml +++ b/zcash_history/Cargo.toml @@ -9,7 +9,7 @@ description = "Library for Zcash blockchain history tools" [dev-dependencies] assert_matches = "1.3.0" -quickcheck = "0.8" +quickcheck = "0.9" [dependencies] bigint = "4" From e210a803507794f8c439c4c465181834447698f4 Mon Sep 17 00:00:00 2001 From: Jack Grigg Date: Fri, 26 Jun 2020 00:00:51 +1200 Subject: [PATCH 08/11] zcash_proofs: directories 3 --- zcash_proofs/Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/zcash_proofs/Cargo.toml b/zcash_proofs/Cargo.toml index 1f0ded25f7..1b78341275 100644 --- a/zcash_proofs/Cargo.toml +++ b/zcash_proofs/Cargo.toml @@ -15,7 +15,7 @@ edition = "2018" bellman = { version = "0.6", path = "../bellman", default-features = false, features = ["groth16"] } blake2b_simd = "0.5" byteorder = "1" -directories = { version = "1", optional = true } +directories = { version = "3", optional = true } ff = { version = "0.6", path = "../ff" } minreq = { version = "2", features = ["https"], optional = true } pairing = { version = "0.16", path = "../pairing" } From 3cc7d2b89a7a339dd048990a17649dcde8a3ac8d Mon Sep 17 00:00:00 2001 From: Jack Grigg Date: Fri, 26 Jun 2020 00:01:09 +1200 Subject: [PATCH 09/11] Remove unused import --- pairing/benches/bls12_381/mod.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pairing/benches/bls12_381/mod.rs b/pairing/benches/bls12_381/mod.rs index 7b9b221c55..ed49daa93a 100644 --- a/pairing/benches/bls12_381/mod.rs +++ b/pairing/benches/bls12_381/mod.rs @@ -10,7 +10,7 @@ use rand_xorshift::XorShiftRng; use group::Group; use pairing::bls12_381::*; -use pairing::{Engine, MillerLoopResult, MultiMillerLoop, PairingCurveAffine}; +use pairing::{Engine, MillerLoopResult, MultiMillerLoop}; fn bench_pairing_g2_preparation(c: &mut Criterion) { const SAMPLES: usize = 1000; From 7f9ee9db2101f4dc9a4f35c8d1ab172696fea879 Mon Sep 17 00:00:00 2001 From: Jack Grigg Date: Sat, 15 Aug 2020 00:40:08 +0100 Subject: [PATCH 10/11] ff_derive: addchain 0.2 --- ff/ff_derive/Cargo.toml | 4 ++-- ff/ff_derive/src/lib.rs | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/ff/ff_derive/Cargo.toml b/ff/ff_derive/Cargo.toml index 4adf28b31c..89a45b315e 100644 --- a/ff/ff_derive/Cargo.toml +++ b/ff/ff_derive/Cargo.toml @@ -16,8 +16,8 @@ edition = "2018" proc-macro = true [dependencies] -addchain = "0.1" -num-bigint = "0.2" +addchain = "0.2" +num-bigint = "0.3" num-traits = "0.2" num-integer = "0.1" proc-macro2 = "1" diff --git a/ff/ff_derive/src/lib.rs b/ff/ff_derive/src/lib.rs index 7e3a4abac8..c5c811ab3c 100644 --- a/ff/ff_derive/src/lib.rs +++ b/ff/ff_derive/src/lib.rs @@ -419,7 +419,8 @@ fn biguint_to_real_u64_vec(mut v: BigUint, limbs: usize) -> Vec { let mut ret = vec![]; while v > BigUint::zero() { - ret.push((&v % &m).to_u64().unwrap()); + let limb: BigUint = &v % &m; + ret.push(limb.to_u64().unwrap()); v >>= 64; } From 45a78617206184633c46fb10adea8e2c5b33e99b Mon Sep 17 00:00:00 2001 From: Jack Grigg Date: Sun, 16 Aug 2020 11:16:23 +0100 Subject: [PATCH 11/11] zcash_primitives: fpe 0.3 --- zcash_primitives/Cargo.toml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/zcash_primitives/Cargo.toml b/zcash_primitives/Cargo.toml index 6931258739..34d65711a3 100644 --- a/zcash_primitives/Cargo.toml +++ b/zcash_primitives/Cargo.toml @@ -12,14 +12,14 @@ license = "MIT OR Apache-2.0" edition = "2018" [dependencies] -aes = "0.3" +aes = "0.5" blake2b_simd = "0.5" blake2s_simd = "0.5" byteorder = "1" crypto_api_chachapoly = "0.4" equihash = { version = "0.1", path = "../components/equihash" } ff = { version = "0.6", path = "../ff" } -fpe = "0.2" +fpe = "0.3" hex = "0.4" lazy_static = "1" log = "0.4"