feat: Implement slip-0010 and seed-curve arg#501
Merged
Conversation
561d45d to
ba5f460
Compare
There was a problem hiding this comment.
Pull request overview
Adds SLIP-0010-based key derivation from BIP-39 seed phrases and exposes a --seed-curve CLI option so seed imports can generate non-secp256k1 identities.
Changes:
- Implement SLIP-0010 derivation for secp256k1, P-256, and ed25519 and expose a new
derive_key_from_seed_slip10helper. - Extend
icp identity importwith--seed-curveand add CLI integration tests for p256/ed25519 seed imports. - Add
hmacdependency wiring and update docs/changelog accordingly.
Reviewed changes
Copilot reviewed 10 out of 11 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| docs/reference/cli.md | Documents the new --seed-curve option for identity import. |
| crates/icp/src/identity/seed/slip10.rs | New SLIP-0010 derivation implementation for secp256k1/p256/ed25519. |
| crates/icp/src/identity/seed/mod.rs | New seed module API: standard derivation paths + derive_key_from_seed_slip10. |
| crates/icp/src/identity/seed.rs | Removes the previous BIP32-based default seed derivation helper. |
| crates/icp/Cargo.toml | Adds hmac dependency to support SLIP-0010 derivation. |
| crates/icp-cli/tests/identity_tests.rs | Adds coverage for --seed-curve with p256 and ed25519 principals. |
| crates/icp-cli/src/commands/identity/new.rs | Switches identity creation-from-seed to the new SLIP-0010 helper. |
| crates/icp-cli/src/commands/identity/import.rs | Adds --seed-curve flag and routes seed imports through SLIP-0010 derivation. |
| Cargo.toml | Adds workspace dependency version for hmac. |
| Cargo.lock | Locks hmac as a dependency. |
| CHANGELOG.md | Notes the new --seed-curve import feature. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
lwshang
approved these changes
Apr 17, 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.
No description provided.