Skip to content

feat(bip0032): add SLIP-0010 support with secp256k1/nist256p1/ed25519#120

Merged
koushiro merged 4 commits into
mainfrom
bip0032/support-slip10-ext
Jan 25, 2026
Merged

feat(bip0032): add SLIP-0010 support with secp256k1/nist256p1/ed25519#120
koushiro merged 4 commits into
mainfrom
bip0032/support-slip10-ext

Conversation

@koushiro

Copy link
Copy Markdown
Owner
  • add slip10 traits, curve modules/backends, and feature flags
  • add SLIP-0010 docs and test vectors; split bip32/slip10 tests
  • update key helpers and curve error handling for new curves

- add slip10 traits, curve modules/backends, and feature flags
- add SLIP-0010 docs and test vectors; split bip32/slip10 tests
- update key helpers and curve error handling for new curves
@dosubot dosubot Bot added size:XXL This PR changes 1000+ lines, ignoring generated files. bip0032 About bip0032 crate enhancement New feature or request release-note/feat The PR has a title that begins with "feat" or implements a new feature labels Jan 25, 2026

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 5295a7716c

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +10 to +14
type Bytes = [u8; 33];

fn from_bytes(bytes: &Self::Bytes) -> Result<Self, Self::Error> {
if bytes[0] != 0 {
return Err(CurveError::from("invalid ed25519 public key prefix"));

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Use 32-byte Ed25519 public keys for SLIP-0010

SLIP-0010 defines Ed25519 public keys as 32 raw bytes; introducing a 33-byte encoding with a 0x00 prefix changes the public key serialization and therefore the parent fingerprint (hash160 over the serialized key) used throughout SLIP-0010 metadata. This will make derived fingerprints and public key bytes incompatible with standard SLIP-0010 vectors/implementations when users compare or interoperate across libraries.

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

From https://github.com/satoshilabs/slips/blob/master/slip-0010.md#test-vector-1-for-ed25519, it is known that the calculation of the parent key fingerprint uses a 0x00 prefix plus a 32-byte ed25519 public key as input.

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

add ed25519_pubkey_from_slip10_bytes/ed25519_pubkey_to_slip10_bytes and update docs about it

@koushiro koushiro merged commit d6c77f0 into main Jan 25, 2026
10 checks passed
@koushiro koushiro deleted the bip0032/support-slip10-ext branch January 25, 2026 05:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bip0032 About bip0032 crate enhancement New feature or request release-note/feat The PR has a title that begins with "feat" or implements a new feature size:XXL This PR changes 1000+ lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant