Skip to content

Conversation

sashass1315
Copy link
Contributor

  • Replace raw Base58 decode and manual slice with base58.decode_check(xpub) to enforce checksum validation as required by BIP-32 and as implied by the method docstring.
  • Add strict len(data) == 78 check before parsing to ensure the serialized extended key length matches the BIP-32 78-byte structure.
  • This prevents accepting corrupted or truncated extended keys and aligns deserialization behavior with Base58Check semantics.

Copy link
Member

@jonatack jonatack left a comment

Choose a reason for hiding this comment

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

Pinging BIP author @achow101 for feedback.

@jonatack jonatack added the Pending acceptance This BIP modification requires sign-off by the champion of the BIP being modified label Sep 5, 2025
Co-authored-by: Jon Atack <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Pending acceptance This BIP modification requires sign-off by the champion of the BIP being modified
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants