The first three chapter of Jimmy songs Programming Bitcoin book is free on GitHub and a good intro to the subject. The basic idea is you can start with a secret 256 bit number and you can use a curve and perform some mathematical operations and get a public key that you can share with anybody(think address to receive funds). This is actually how the first Bitcoin transactions were done(Pay to public key). It’s theoretically impossible for anybody to gain any information about your private key with just the public key. With the private key you can then sign messages(Bitcoin transactions) that can be proved mathematically with very little computing power that only the person with knowledge of the private could have computed the signature.
HD wallets are used to compute a lot of the private public keys pairs(and addresses) to make backing up easier. Before HD wallets every time a new address was generated a new corresponding private key had to be backed up. With HD wallets all we have to do is store the seed (phrase) and a derivation path and we can restore all the private keys needed to recreate our wallet.
If you’re trying to understand ecc I would start with how it is used to generate a public key from a private key first then move on to how it is used in HD wallets.
I'm going to post the first part (mnemonic) possibly today, since the master seed is needed to derive the master xpriv-> master Xpub, which is where I'm currently at.
reply