diff --git a/ch04.asciidoc b/ch04.asciidoc index 6a7204e5..4b041452 100644 --- a/ch04.asciidoc +++ b/ch04.asciidoc @@ -548,7 +548,7 @@ The process of creating the master keys and master chain code for an HD wallet i [[HDWalletFromSeed]] .Creating master keys and chain code from a root seed -image::images/HDWalletFromRootSeed.svg["HDWalletFromRootSeed"] +image::images/HDWalletFromRootSeed.png["HDWalletFromRootSeed"] The root seed is input into the HMAC-SHA512 algorithm and the resulting hash is used to create a _master private key_ (m) and a _master chain code_. The master private key (m) then generates a corresponding master public key (M), using the normal elliptic curve multiplication process +m * G+ that we saw previously in this chapter. The chain code is used to introduce entropy in the function that creates child keys from parent keys, as we will see in the next section. @@ -570,7 +570,7 @@ The parent public key, chain code and the index number are combined and hashed w [[CKDpriv]] .Extending a parent private key to create a child private key -image::images/ChildPrivateDerivation.svg["ChildPrivateDerivation"] +image::images/ChildPrivateDerivation.png["ChildPrivateDerivation"] Changing the index allows us to extend the parent and create the other children in the sequence, e.g. Child 0, Child 1, Child 2 etc. Each parent key can have 2 billion children keys. @@ -615,7 +615,7 @@ Another common application of this solution is for cold-storage or hardware wall [[CKDpub]] .Extending a parent public key to create a child public key -image::images/ChildPublicDerivation.svg["ChildPublicDerivation"] +image::images/ChildPublicDerivation.png["ChildPublicDerivation"] ===== Hardened child key derivation @@ -625,7 +625,7 @@ To counter this risk, HD wallets use an alternative derivation function called _ [[CKDprime]] .Hardened derivation of a child key, omits the parent public key -image::images/ChildHardPrivateDerivation.svg["ChildHardPrivateDerivation"] +image::images/ChildHardPrivateDerivation.png["ChildHardPrivateDerivation"] When the hardened private derivation function is used, the resulting child private key and chain code are completely different from what would result from the normal derivation function. The resulting "branch" of keys can be used to produce extended public keys which are not vulnerable, since the chain code they contain cannot be exploited to reveal any private keys. Hardened derivation is therefore used to create a "gap" in the tree above the level where extended public keys are used. diff --git a/images/ChildHardPrivateDerivation.png b/images/ChildHardPrivateDerivation.png new file mode 100644 index 00000000..28173149 Binary files /dev/null and b/images/ChildHardPrivateDerivation.png differ diff --git a/images/ChildHardPrivateDerivation.svg b/images/ChildHardPrivateDerivation.svg deleted file mode 100644 index 38821215..00000000 --- a/images/ChildHardPrivateDerivation.svg +++ /dev/null @@ -1,4 +0,0 @@ - - - - diff --git a/images/ChildPrivateDerivation.png b/images/ChildPrivateDerivation.png new file mode 100644 index 00000000..519b33b2 Binary files /dev/null and b/images/ChildPrivateDerivation.png differ diff --git a/images/ChildPrivateDerivation.svg b/images/ChildPrivateDerivation.svg deleted file mode 100644 index 05575877..00000000 --- a/images/ChildPrivateDerivation.svg +++ /dev/null @@ -1,4 +0,0 @@ - - - - diff --git a/images/ChildPublicDerivation.png b/images/ChildPublicDerivation.png new file mode 100644 index 00000000..7466659d Binary files /dev/null and b/images/ChildPublicDerivation.png differ diff --git a/images/ChildPublicDerivation.svg b/images/ChildPublicDerivation.svg deleted file mode 100644 index 7d3518fd..00000000 --- a/images/ChildPublicDerivation.svg +++ /dev/null @@ -1,4 +0,0 @@ - - - - diff --git a/images/HDWalletFromRootSeed.png b/images/HDWalletFromRootSeed.png new file mode 100644 index 00000000..ce59af81 Binary files /dev/null and b/images/HDWalletFromRootSeed.png differ diff --git a/images/HDWalletFromRootSeed.svg b/images/HDWalletFromRootSeed.svg deleted file mode 100644 index 1d6893e4..00000000 --- a/images/HDWalletFromRootSeed.svg +++ /dev/null @@ -1,4 +0,0 @@ - - - - diff --git a/images/en-hd-overview.svg b/images/en-hd-overview.svg deleted file mode 100644 index f9d8cb5c..00000000 --- a/images/en-hd-overview.svg +++ /dev/null @@ -1,135 +0,0 @@ - - - - - - -extended - - -Normal Hierarchical Deterministic (HD) Key Derivation (BIP32) -cluster_parent - - -parent_private_key - -Parent Private Key - - -child_private_key - -Child Private Key - - -parent_private_key->child_private_key - - - - -hmac - - - - - -One-Way Hash - - - -parent_chain_code - -Parent Chain Code - - -parent_chain_code->hmac - - - - -parent_public_key - -Parent Public Key - - -child_public_key - -Child Public Key - - -parent_public_key->child_public_key - - - - -parent_public_key->hmac - - - - -rel2 -Derived -Mathematical -Relationship - - -child_private_key->rel2 - - - - -child_chain_code - -Child Chain Code - - - -child_public_key->rel2 - - - - -i_norm - -Index Number - - -i_norm->hmac - - - - -hmac->child_private_key - - - - -hmac->child_chain_code - - - - -hmac->child_public_key - - - - -rel1 -Mathematical -Relationship - - -rel1->parent_private_key - - - - - -rel1->parent_public_key - - - - - diff --git a/images/en-hd-root-keys.svg b/images/en-hd-root-keys.svg deleted file mode 100644 index f5c623cf..00000000 --- a/images/en-hd-root-keys.svg +++ /dev/null @@ -1,111 +0,0 @@ - - - - - - -extended - -Creation Of The Master Keys -cluster_y - -cluster_x - - -entropy - -128, 256, -Or 512 Bits -Of Entropy -(The Seed) - - -hmac - - - - - -512-Bit -One-Way -Hash - - -entropy->hmac - - - - -private_key - -Master -Private Key - - -hmac->private_key - - -256 Bits - - -chain_code - -Master -Chain Code - - -hmac->chain_code - - -256 Bits - - -public_key - -Master -Public Key - - -private_key->public_key - - - - -extended_private_key - -Master -Extended -Private Key - - -private_key->extended_private_key - - - - -chain_code->extended_private_key - - - - -extended_public_key - -Master -Extended -Public Key - - -chain_code->extended_public_key - - - - -public_key->extended_public_key - - - - -