Repository navigation
Conversation
…026-0387 k256/p256 0.13 pin crypto-bigint 0.5, which has no fix for the non-constant-time arithmetic in RUSTSEC-2026-0387. Move to k256/p256 0.14, elliptic-curve 0.14, ecdsa 0.17, pkcs8 0.11, sec1 0.8 and sha2 0.11. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
There was a problem hiding this comment.
🔵 Needs a closer look
The security-sensitive cryptographic migration and breaking public types require human confirmation of compatibility and regression coverage.
1 open issue
What changed in this PR
This PR upgrades the RustCrypto dependencies used by agent identities and request hashing to address RUSTSEC-2026-0387, with breaking changes to publicly exposed dependency types.
Changes:
- Upgrades the elliptic-curve stack and replaces
crypto-bigint0.5 with 0.7.10 in the lockfile. - Adapts key parsing and delegation verification to the updated APIs.
- Preserves allocation-free formatted request-ID hashing and documents downstream migration requirements.
| File | Description |
|---|---|
ic-transport-types/src/request_id.rs |
Adds a formatting adapter for SHA-256 hashing. |
ic-agent/src/identity/secp256k1.rs |
Updates PKCS#8 parsing and key errors. |
ic-agent/src/identity/prime256v1.rs |
Updates PKCS#8 parsing and key errors. |
ic-agent/src/identity/mod.rs |
Adapts shared EC private-key extraction. |
ic-agent/src/identity/delegated.rs |
Uses the updated verification-key constructor. |
ic-agent/src/identity/basic.rs |
Adapts Ed25519 PEM parsing to updated DER types. |
CHANGELOG.md |
Documents the security upgrade and breaking public types. |
Cargo.toml |
Updates workspace cryptographic dependency requirements. |
Cargo.lock |
Records the upgraded cryptographic dependency graph. |
Review effort: Balanced
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
lwshang
added a commit
to dfinity/icp-cli
that referenced
this pull request
Oct 26, 2026
…tCrypto 0.14 stack crypto-bigint 0.5 has no patched release and is pinned by ic-agent's elliptic-curve 0.13 stack. The fix is in progress in dfinity/agent-rs#745; the migration that was here moves to its own PR to wait for that release. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This was referenced Oct 26, 2026
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.

RUSTSEC-2026-0387 reports non-constant-time arithmetic in
crypto-bigint< 0.7.6. The 0.5 line, which the elliptic-curve 0.13 stack pins, has no fixed release. Downstreamcargo denychecks can't clear it until ic-agent moves; dfinity/icp-cli#844 is blocked on this.Changes
k256/p2560.14,elliptic-curve0.14,ecdsa0.17,pkcs80.11,sec10.8 andsha20.11.crypto-bigint0.5 is no longer in the graph.pkcs8::PrivateKeyInfois now generic, so PEM parsing usesPrivateKeyInfoRef.pkcs8::Error::KeyMalformednow carries aKeyError.VerifyingKey::from_encoded_pointis replaced byfrom_sec1_point, used in delegation verification.sha20.11 no longer implementsio::Write. The request-id serializer'scollect_strnow hashes through a smallfmt::Writeadapter, still without an intermediateString.Breaking
These crates' types appear in the public API, for example
Secp256k1Identity::from_private_key,Prime256v1Identity::from_private_keyandPemError::ErrorStack. Downstream crates that name them must move to the same versions. The CHANGELOG is updated under Unreleased.Testing
cargo clippy --workspace --all-targets --all-features: cleancargo check -p ic-agent --target wasm32-unknown-unknown --features wasm-bindgen: passescargo testfor ic-agent, ic-transport-types, ic-utils and ref-tests (against PocketIC): all passcargo deny checkagainst this branch (chore(deps): fix RUSTSEC-2026-0385/0386/0387 icp-cli#844)🤖 Generated with Claude Code