From 605d57a37e1e359550361aad57cb0a7d7fc54ede Mon Sep 17 00:00:00 2001 From: koushiro Date: Mon, 2 Feb 2026 15:41:17 +0800 Subject: [PATCH 1/2] chore(bip0032): update docs and agents.md --- bip0032/AGENTS.md | 5 ++--- bip0032/README.md | 7 +++---- bip0032/SLIP-0010.md | 10 +++++----- bip0032/src/lib.rs | 2 +- 4 files changed, 11 insertions(+), 13 deletions(-) diff --git a/bip0032/AGENTS.md b/bip0032/AGENTS.md index 99b8cbb..51f457e 100644 --- a/bip0032/AGENTS.md +++ b/bip0032/AGENTS.md @@ -5,7 +5,7 @@ - `src/lib.rs` is the crate entry and re-exports the public API. - `src/path/` defines derivation paths and child numbers. - `src/xkey/` contains extended key types and payload/version handling. -- `src/curve/secp256k1/` holds backend-specific secp256k1 implementations (k256, secp256k1, libsecp256k1). +- `src/curve/secp256k1/` holds backend-specific secp256k1 implementations (k256, secp256k1). - `src/curve/nist256p1/` holds the NIST P-256 (p256) backend implementation for SLIP-0010. - `src/curve/ed25519/` holds the ed25519 backend implementation for SLIP-0010. - `src/curve/slip10.rs` contains SLIP-0010 marker traits. @@ -43,8 +43,7 @@ ## Feature Flags & Backends - `std` enables standard library support; `k256` is the default secp256k1 backend. -- Optional backends: `secp256k1` and `libsecp256k1` (note: libsecp256k1 is unmaintained). -- SLIP-0010 features: `slip10` (core), `k256`|`secp256k1`|`libsecp256k1` (secp256k1), `p256` (nist256p1), `ed25519-dalek` (ed25519). +- SLIP-0010 features: `slip10` (core), `k256`|`secp256k1` (secp256k1), `p256` (nist256p1), `ed25519-dalek` (ed25519). - When modifying backend code, validate the affected feature set with explicit `--features` flags. ## Commit & Pull Request Guidelines diff --git a/bip0032/README.md b/bip0032/README.md index 49fe7f5..be9d393 100644 --- a/bip0032/README.md +++ b/bip0032/README.md @@ -16,9 +16,9 @@ Another Rust implementation of [BIP-0032](https://github.com/bitcoin/bips/blob/m ## Support curves and features -| Curve | Feature | Backends | Hardened | Non-hardened (private) | Non-hardened (public) | Serialization | -| --------- | --------------------------------------- | ----------------------------- | -------- | ---------------------- | --------------------- | ------------- | -| secp256k1 | `k256` \| `secp256k1` \| `libsecp256k1` | k256, secp256k1, libsecp256k1 | yes | yes | yes | yes | +| Curve | Feature | Backends | Hardened | Non-hardened (private) | Non-hardened (public) | Serialization | +| --------- | --------------------- | --------------- | -------- | ---------------------- | --------------------- | ------------- | +| secp256k1 | `k256` \| `secp256k1` | k256, secp256k1 | yes | yes | yes | yes | ## Usage @@ -96,7 +96,6 @@ See documentation and examples at https://docs.rs/bip0032. - [x] Multiple secp256k1 backends - [`k256`](https://github.com/RustCrypto/elliptic-curves/tree/master/k256) (by default) - [`secp256k1`](https://github.com/rust-bitcoin/rust-secp256k1) - - [`libsecp256k1`](https://github.com/paritytech/libsecp256k1) - [x] Optional SLIP-0010 support - secp256k1 ([compatible with BIP32](https://github.com/satoshilabs/slips/blob/master/slip-0010.md#compatibility-with-bip-0032)) - NIST P-256 (a.k.a. secp256r1, prime256v1) ([`p256`](https://github.com/RustCrypto/elliptic-curves/tree/master/p256)) diff --git a/bip0032/SLIP-0010.md b/bip0032/SLIP-0010.md index a82f051..587b6b2 100644 --- a/bip0032/SLIP-0010.md +++ b/bip0032/SLIP-0010.md @@ -6,11 +6,11 @@ but the derivation rules and supported curves differ. ## Supported curves and features -| Curve | Feature | Backends | Hardened | Non-hardened (private) | Non-hardened (public) | Serialization | -| --------- | ---------------------------------------------------- | ----------------------------- | -------- | ---------------------- | --------------------- | ------------- | -| secp256k1 | `slip10` + (`k256` \| `secp256k1` \| `libsecp256k1`) | k256, secp256k1, libsecp256k1 | yes | yes | yes | no | -| nist256p1 | `slip10` + `p256` | p256 | yes | yes | yes | no | -| ed25519 | `slip10` + `ed25519-dalek` | ed25519-dalek | yes | no | no | no | +| Curve | Feature | Backends | Hardened | Non-hardened (private) | Non-hardened (public) | Serialization | +| --------- | ---------------------------------- | --------------- | -------- | ---------------------- | --------------------- | ------------- | +| secp256k1 | `slip10` + (`k256` \| `secp256k1`) | k256, secp256k1 | yes | yes | yes | no | +| nist256p1 | `slip10` + `p256` | p256 | yes | yes | yes | no | +| ed25519 | `slip10` + `ed25519-dalek` | ed25519-dalek | yes | no | no | no | Note: SLIP-0010 does not define a standardized extended key serialization. Only the BIP32 secp256k1 encoding (xpub/xprv) is supported for serialization. diff --git a/bip0032/src/lib.rs b/bip0032/src/lib.rs index 881c856..64b11c1 100644 --- a/bip0032/src/lib.rs +++ b/bip0032/src/lib.rs @@ -18,7 +18,7 @@ //! //! | Curve | Feature | Backends | Hardened | Non-hardened (private) | Non-hardened (public) | Serialization | //! | --- | --- | --- | --- | --- | --- | --- | -//! | secp256k1 | `k256` \| `secp256k1` \| `libsecp256k1` | k256, secp256k1, libsecp256k1 | yes | yes | yes | yes | +//! | secp256k1 | `k256` \| `secp256k1` | k256, secp256k1 | yes | yes | yes | yes | //! //! ## Usage //! From 2127503a7c56eeb4d8b81e36426f04bd88c41d15 Mon Sep 17 00:00:00 2001 From: koushiro Date: Mon, 2 Feb 2026 15:43:29 +0800 Subject: [PATCH 2/2] update agents.md --- bip0032/AGENTS.md | 1 + 1 file changed, 1 insertion(+) diff --git a/bip0032/AGENTS.md b/bip0032/AGENTS.md index 51f457e..a675fca 100644 --- a/bip0032/AGENTS.md +++ b/bip0032/AGENTS.md @@ -43,6 +43,7 @@ ## Feature Flags & Backends - `std` enables standard library support; `k256` is the default secp256k1 backend. +- Optional backends: `k256` and `secp256k1`. - SLIP-0010 features: `slip10` (core), `k256`|`secp256k1` (secp256k1), `p256` (nist256p1), `ed25519-dalek` (ed25519). - When modifying backend code, validate the affected feature set with explicit `--features` flags.