Skip to content

Patch bip32_key_unserialize and add tests for TV5#521

Closed
kuliq23 wants to merge 1 commit intoElementsProject:masterfrom
kuliq23:patch-bip32-tv5
Closed

Patch bip32_key_unserialize and add tests for TV5#521
kuliq23 wants to merge 1 commit intoElementsProject:masterfrom
kuliq23:patch-bip32-tv5

Conversation

@kuliq23
Copy link
Copy Markdown
Contributor

@kuliq23 kuliq23 commented Mar 8, 2026

We should add BIP32 Test Vector 5 to src/test/test_bip32.py and provide corresponding checks in src/bip32.c

  • Added TV5 test cases to src/test/test_bip32.py (in the simplest way possible, feel free to refactor)
  • Provided is_valid_key with sufficient checks relevant to TV5 cases
  • Added an is_valid_key function call to the end of bip32_key_unserialize
  • Uncrustified bip32.c (formatted)

All tests pass.

Found through differential fuzzing using bitcoinfuzz
Reported in PR466

@jgriffiths
Copy link
Copy Markdown
Contributor

Hi @kuliq23 thanks for contributing!

Please see #522 which add a subset of the checks as detailed in the test comments. I've kept your authorship in the commit since its based on your work.

@jgriffiths
Copy link
Copy Markdown
Contributor

Merged under #522, closing thanks

@jgriffiths jgriffiths closed this Mar 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants