0

I am trying to generate an expanded private key for ed25519_bip32::XPrv class, but I'm having a problem understanding how to get a 32-byte chain code. I was able to generate a 32-byte secret key and then 64-byte extended secret key using ed25519-dalek crate from a mnemonic phrase (the short secret key is just an entropy and the extended key is the 64-byte hash of it with a modified bit). I also got a 64-byte seed from the same mnemonic, but I'm not sure how to go about getting a chain code from it.

ed25519-bip32::Xprv describes it as

Effectively this is an ed25519 extended secret key (64 bytes) followed by a chain code (32 bytes).

Maarten Bodewes
  • 90,524
  • 13
  • 150
  • 263
Proto Ukr
  • 492
  • 4
  • 13

0 Answers0