I am currently working on a challenge that involves deriving a non-hardened extended private key for a specific search path in Bitcoin. The challenge provides the following information:
Bitcoin root extended public key (starting with xpub…)
Bitcoin non-hardened extended private key for the derivation path m/44/0/0/1/404 (starting with xprv…)
Search path for which I need to derive the associated (non-hardened) extended private key: m/44/0/0/0/402
The task is to derive the non-hardened extended private key for the given search path, and the submission should be encoded as per the BIP 32 specification.
I’ve attempted to use the pycoin and python-hdwallet libraries, but I’m facing difficulties understanding the process and obtaining the correct result. Could someone provide guidance or a step-by-step approach on how to achieve this using these libraries or any other relevant tools?
Additionally, if there are specific functions or methods within these libraries that are suitable for this task, please provide examples to help me grasp the implementation better.
I appreciate any assistance and clarification on this matter. Thank you!
Update
Here’s the original problem statement:
The challenge data consists of: A Bitcoin root extended public key
(for the derivation path m, as it is the root) starting with xpub… A
Bitcoin non-hardened extended private key for the derivation path
m/44/0/0/1/404 starting with xprv… A search path for which you have
to derive the associated (non-hardened) extended private key (as a
string). This path will be something like: m/44/0/0/0/402 Your task is
it to derive the non-hardened extended private key for this search
path, this is your flag. Your submission of the searched extended
private key should be encoded as the one you received from the
server, i.e., serialized string starting with xprv… according to the
specification in BIP 39.











