Saturday, July 6, 2024

bip32 hd wallets – How does the prolonged key derivation course of occur in Electrum?

I am attempting to duplicate a number of the Electrum’s functionalities as a way to assist me perceive the Bitcoin protocol. In keeping with what I gathered from BIP-32 there are 3 little one key derivation features:

  • non-public mum or dad key –> non-public little one key
  • public mum or dad key –> public little one key
  • non-public mum or dad key –> public little one key

I began with the next pattern mnemonic: historical inflict mimic valve baggage physician march deal with hour hazard shoot city.
I’ve efficiently derived the grasp non-public key and grasp public key. Nonetheless, when I attempt to derive the general public key related to the trail proven as m/0/0 by the pockets, the outcomes do not match. I’ve tried many code tweaks with plenty of totally different outcomes. The anticipated outcomes are:

  • public key: 022586d491bc387b161959e25d05772e98814da69215a3152b54e4d1ae0c1a4168
  • deal with: bc1q83ljq9ad7rck4vdz0l7f7rr2zsprgn8rtvpmpa

I consider this is because of misunderstanding of the features themselves. Among the factors that aren’t clear to me:

  1. Why are the chain codes equivalent in the event that they appear to be obtained by totally different processes?

This extension, known as the chain code, is equivalent for corresponding non-public and public keys, and consists of 32 bytes.

  1. Aren’t public keys on the whole anticipated to be independently derived from non-public keys by scalar multiplication? There appears to be two extra routes to derive prolonged public little one keys, particularly, both from a public mum or dad key or non-public mum or dad key, and by totally different means, in keeping with BIP-32.
  2. The non-public mum or dad key –> public little one key route includes a “neutered” key. What key’s “neutered” and what’s this?

Related Articles

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Latest Articles