Update crypto#2437
Open
zancas wants to merge 2 commits into
Open
Conversation
…ange Follows the CryptoProvider pattern established in zaino: zingolabs/zaino@a62dcd3 rustls 0.23 auto-selects a provider only when exactly one of its ring / aws_lc_rs features is enabled. The workspace pinned rustls with the ring feature while rustls's default features already enable aws-lc-rs, so feature unification put both providers in the graph and nothing installed a process-level default - four zingo-netutils tests panicked with "Could not automatically determine the process-level CryptoProvider". Changes: - zingo-netutils gains crypto::ensure_default_crypto_provider(): a guarded, first-install-wins install of aws-lc-rs, called where the crate builds rustls configs. An embedder (e.g. zingo-mobile) that installs its own provider first keeps it. Re-exported through zingolib. - The seven scattered ad-hoc ring provider installs (LightClient constructors, sync_example_wallet, zingo-cli main, libtonode tests) are replaced with that one helper. - Workspace features: rustls drops ring and gains prefer-post-quantum (the X25519MLKEM768 hybrid group leads outbound handshakes; ML-KEM is only available on aws-lc-rs); hyper-rustls and tokio-rustls switch ring -> aws-lc-rs; tonic gains tls-aws-lc so the provider is asserted in the feature graph rather than inherited. - zingo-price: reqwest switches to rustls-tls-no-provider (never auto-selects) and installs the provider before fetching; it sits below zingo-netutils in the graph, so it carries a mirrored helper. - Real crypto use excised: the legacy BIP32 HMAC-SHA512 derivation in extended_transparent.rs moves from ring::hmac to the RustCrypto hmac + sha2 crates. The stored-wallet regression tests (verify_example_wallet_*) confirm derivation is unchanged. - The ring and rustls dependencies are dropped from zingolib, zingo-cli, and libtonode-tests; ring leaves the workspace dependency table. - zcash_proofs's download-params feature (whose minreq -> rustls 0.21 -> ring subtree is the sole ring residue) is now enabled only for the build script that fetches sapling params; the runtime dependency graph is 100% aws-lc-rs. Verified: the four previously failing zingo-netutils tests pass (including the live mainnet-indexer connect); 95/95 unit tests across zingo-netutils, zingo-price, and zingolib; cargo clippy clean. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> (cherry picked from commit de11e16)
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.
ring is unmaintained.
aws-lc-rs is supported by the community, including for post-quantum security.
This change opts to use aws-lc-rs as the provider, while permitting downstream consumer to selects their own per-process provider. If they don't provide one aws-lc-rs is the default.