chore(deps): migrate off deprecated generic-array to hybrid-array majors - #146
Open
prestwich wants to merge 1 commit into
Open
chore(deps): migrate off deprecated generic-array to hybrid-array majors#146prestwich wants to merge 1 commit into
prestwich wants to merge 1 commit into
Conversation
digest/sha2/sha3/ripemd/hmac/pbkdf2/k256 all moved from generic-array 0.14 to hybrid-array 0.4 in their latest majors, so bumping generic-array alone (as in c1b9680) can't actually clear the deprecation - it just adds a second, unrelated major version to the tree. Bump the whole RustCrypto chain together instead: - digest 0.10->0.11, sha2 0.10->0.11, sha3 0.10->0.12, ripemd 0.1->0.2, hmac 0.12->0.13, pbkdf2 0.12->0.13, k256 0.13->0.14 - coins-core's GenericArray re-export now points at hybrid_array::Array - k256 0.14 pulls ecdsa 0.17/signature 3.0, which redesigned DigestSigner/DigestVerifier to take a closure over the hasher instead of a finalized digest value; updated inherit_signer!/inherit_verifier! and all call sites accordingly - elliptic_curve::sec1::{FromEncodedPoint,ToEncodedPoint} are now deprecated stub traits; switched to FromSec1Point/ToSec1Point - MSRV 1.80->1.85 (k256 0.14 requires it) - pinned getrandom 0.4 w/ wasm_js for wasm32, matching the existing gr03/gr02 shims, since crypto-bigint/crypto-common now pull it in Verified locally: cargo test (default + --no-default-features), wasm check, clippy -D warnings, fmt --check, and nightly doc -D warnings all pass. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
generic-arrayreleased a 1.x major, but RustCrypto's own crates (digest,crypto-common,sha2,sha3,ripemd,hmac,pbkdf2) skipped it entirely and moved to a sister crate,hybrid-array, instead. Bumping our directgeneric-arraydependency alone (as done reactively in c1b9680) doesn't clear anything — it just adds a second, incompatible major version to the tree while the real hashing types stay on the deprecated 0.14 line underneath.This bumps the whole chain together onto their
hybrid-array-based majors:digest0.10→0.11,sha20.10→0.11,sha30.10→0.12,ripemd0.1→0.2,hmac0.12→0.13,pbkdf20.12→0.13,k2560.13→0.14coins-core'sGenericArrayre-export now points athybrid_array::Array(drops the#[allow(deprecated)]shim)k256 0.14pulls inecdsa 0.17/signature 3.0, which redesignedDigestSigner/DigestVerifierto take a closure over the hasher rather than a finalized digest value — updatedinherit_signer!/inherit_verifier!in bip32 and all call sites (tests + the crate-level doc example)elliptic_curve::sec1::{FromEncodedPoint, ToEncodedPoint}are now deprecated stub traits; switched toFromSec1Point/ToSec1Pointk256 0.14)getrandom 0.4withwasm_jsfor wasm32 targets, following the existinggr03/gr02shim pattern, sincecrypto-bigint/crypto-commonnow pull it in transitivelyBreaking changes
coins_core::hashes::GenericArrayis nowhybrid_array::Arrayrather thangeneric_array::GenericArrayDigestSigner/DigestVerifierimpls incoins-bip32(sign_digest,try_sign_digest,verify_digest) take a closureFn(&mut D) -> ...instead of a finalized digest valueTest plan
All 5 CI jobs verified locally:
cargo test(default features)cargo test --no-default-featuresRUSTFLAGS='--cfg getrandom_backend="wasm_js"' cargo check --target wasm32-unknown-unknown --no-default-features --features browsercargo clippy --workspace --all-targetswith-D warningscargo fmt --all --checkcargo +nightly doc --workspace --no-deps --document-private-itemswith-D warnings🤖 Generated with Claude Code