getamis / alice

Hierarchical Threshold Signature Scheme
Apache License 2.0
368 stars 75 forks source link

Question) Instructions to use the BIP32 child index #249

Closed Hoodie-Kang closed 1 year ago

Hoodie-Kang commented 1 year ago

Hi,

I used the childIndex, which is defined in the child_test.go as "2147483648" , and I found that the index determines the pubkey, share and some other info. So I can figure out the meaning of the child index but can't find the instruction to use it, such as length, conditions, or something.

I would appreciate you to help me to know the instruction, references, or some examples! Thanks

cychuang0924 commented 1 year ago

Hi Hoodie-Kang,

The meaning of the child index is defined in the BIP32.

If the index >= 2^31, then the derived key is hardened child key (i.e. coming from the parent private key).

If the index < 2^31, then the derived key is non-hardened child key (i.e. coming from the parent public key)..

Hoodie-Kang commented 1 year ago

Awesome, Thanks!