diff --git a/zcash_primitives/CHANGELOG.md b/zcash_primitives/CHANGELOG.md index 16aa5a4f1..7bb229877 100644 --- a/zcash_primitives/CHANGELOG.md +++ b/zcash_primitives/CHANGELOG.md @@ -9,7 +9,7 @@ and this library adheres to Rust's notion of ### Changed - Bumped dependencies to `bls12_381 0.8`, `ff 0.13`, `group 0.13`, - `jubjub 0.10`, `orchard 0.4`. + `jubjub 0.10`, `orchard 0.4`, `sha2 0.10`, `bip0039 0.11`. ## [0.10.2] - 2023-03-16 ### Added diff --git a/zcash_primitives/Cargo.toml b/zcash_primitives/Cargo.toml index d836ab74f..e75f326fc 100644 --- a/zcash_primitives/Cargo.toml +++ b/zcash_primitives/Cargo.toml @@ -30,7 +30,7 @@ rand_core = "0.6" # - Digests (output types exposed) blake2b_simd = "1" -sha2 = "0.9" +sha2 = "0.10" # - Metrics memuse = "0.2.1" @@ -60,7 +60,7 @@ hdwallet = { version = "0.3.1", optional = true } secp256k1 = { version = "0.21", optional = true } # - ZIP 339 -bip0039 = { version = "0.9", features = ["std", "all-languages"] } +bip0039 = { version = "0.11", features = ["std", "all-languages"] } # Dependencies used internally: # (Breaking upgrades to these are usually backwards-compatible, but check MSRVs.) diff --git a/zcash_primitives/src/legacy/keys.rs b/zcash_primitives/src/legacy/keys.rs index 483003437..6423b1fda 100644 --- a/zcash_primitives/src/legacy/keys.rs +++ b/zcash_primitives/src/legacy/keys.rs @@ -2,9 +2,8 @@ use hdwallet::{ traits::{Deserialize, Serialize}, ExtendedPrivKey, ExtendedPubKey, KeyIndex, }; -use ripemd::Digest as RipemdDigest; use secp256k1::PublicKey; -use sha2::{Digest as Sha2Digest, Sha256}; +use sha2::{Digest, Sha256}; use crate::{consensus, keys::prf_expand_vec, zip32::AccountId}; diff --git a/zcash_primitives/src/transaction/components/transparent/builder.rs b/zcash_primitives/src/transaction/components/transparent/builder.rs index b36b1c7f8..3a2e20b6a 100644 --- a/zcash_primitives/src/transaction/components/transparent/builder.rs +++ b/zcash_primitives/src/transaction/components/transparent/builder.rs @@ -22,7 +22,7 @@ use { TransactionData, TxDigests, }, blake2b_simd::Hash as Blake2bHash, - ripemd::Digest, + sha2::Digest, }; #[derive(Debug, PartialEq, Eq)] @@ -144,7 +144,7 @@ impl TransparentBuilder { match coin.script_pubkey.address() { Some(TransparentAddress::PublicKey(hash)) => { use ripemd::Ripemd160; - use sha2::{Digest, Sha256}; + use sha2::Sha256; if hash[..] != Ripemd160::digest(Sha256::digest(&pubkey))[..] { return Err(Error::InvalidAddress);