Child key derivation 

HD wallets extensively use the Child Key derivation (CKD) function to create child keys from the parent keys. Keys are derived using a one-way hash function using the following elements:

  • Parent key
  • Chain code which works as a seed, 256-bits
  • Index number, 32-bits

There are various ways in which child keys can be generated from already present keys; the following are the key derivation sequences:

  • Generation of private child key from private parent key
  • Generation of public child key from public parent key
  • Generation of public child key from private parent key

Let's discuss each of the previously mentioned sequences in detail.