(* Content-type: application/vnd.wolfram.mathematica *)

(*** Wolfram Notebook File ***)
(* http://www.wolfram.com/nb *)

(* CreatedBy='Wolfram 15.0' *)

(*CacheID: 234*)
(* Internal cache information:
NotebookFileLineBreakTest
NotebookFileLineBreakTest
NotebookDataPosition[       154,          7]
NotebookDataLength[     52907,       1335]
NotebookOptionsPosition[     44341,       1175]
NotebookOutlinePosition[     46388,       1224]
CellTagsIndexPosition[     46310,       1219]
WindowTitle->BIP32MasterKey
WindowFrame->Normal*)

(* Beginning of Notebook Content *)
Notebook[{
Cell[BoxData[GridBox[{
   {GridBox[{
      {
       ItemBox[Cell[BoxData[
         RowBox[{
          TemplateBox[{12},
           "Spacer1"], Cell[
          "WOLFRAM INSTITUTE/ PUZZLES SYMBOL", "PacletNameCell",
           TextAlignment->Center,ExpressionUUID->
           "a573089a-8328-48fc-a196-fc1705cfa637"], 
          TemplateBox[{8},
           "Spacer1"]}]],
         TextAlignment->Center,ExpressionUUID->
         "b1b78f2f-d613-46df-9baf-6fcb24f98ac3"],
        Background->LightDarkSwitched[
          RGBColor[0.490196, 0.576471, 0.690196]],
        ItemSize->Full], ""}
     },
     GridBoxAlignment->{"Rows" -> {{Center}}},
     GridBoxItemSize->{"Columns" -> {Full, 
         Scaled[0.02]}, "Rows" -> {{2.5}}}], Cell[TextData[{
     Cell[BoxData[
      TagBox[
       ActionMenuBox[
        FrameBox[Cell[TextData[{
          "See Also",
          " ",
          Cell[BoxData[
           GraphicsBox[
            {GrayLevel[0.66667], Thickness[0.13], 
             LineBox[{{-1.8, 0.5}, {0, 0}, {1.8, 0.5}}]},
            AspectRatio->1,
            ImageSize->20,
            PlotRange->{{-3, 4}, {-1, 1}}]],ExpressionUUID->
           "8981b166-1c3b-4081-8384-e38098d34604"]
         }],ExpressionUUID->"7d3f5ea5-d2c0-4254-a6c9-b34bd3ae431f"],
         StripOnInput->False],{
        StyleBox[
          "\"BIP32DeriveKey\"", "SeeAlsoRelated", StripOnInput -> False] :> 
         Documentation`HelpLookup[
          "paclet:WolframInstitute/Puzzles/ref/BIP32DeriveKey"], 
         StyleBox[
          "\"BIP32ChildKey\"", "SeeAlsoRelated", StripOnInput -> False] :> 
         Documentation`HelpLookup[
          "paclet:WolframInstitute/Puzzles/ref/BIP32ChildKey"], 
         StyleBox[
          "\"BIP32PublicKey\"", "SeeAlsoRelated", StripOnInput -> False] :> 
         Documentation`HelpLookup[
          "paclet:WolframInstitute/Puzzles/ref/BIP32PublicKey"], 
         StyleBox[
          "\"BIP32ExtendedKeyString\"", "SeeAlsoRelated", StripOnInput -> 
           False] :> Documentation`HelpLookup[
          "paclet:WolframInstitute/Puzzles/ref/BIP32ExtendedKeyString"], 
         StyleBox["\"BIP39Seed\"", "SeeAlsoRelated", StripOnInput -> False] :> 
         Documentation`HelpLookup[
          "paclet:WolframInstitute/Puzzles/ref/BIP39Seed"]},
        Appearance->None,
        MenuAppearance->Automatic,
        MenuStyle->"SeeAlso"],
       MouseAppearanceTag["LinkHand"]]],
      LineSpacing->{1.4, 0},ExpressionUUID->
      "122f5b25-cbd1-4d9f-b715-334760787afe"],
     "\[ThickSpace]\[ThickSpace]\[ThickSpace]\[ThickSpace]\[ThickSpace]\
\[ThickSpace]",
     Cell[BoxData[
      TagBox[
       ActionMenuBox[
        FrameBox[Cell[TextData[{
          "Related Guides",
          " ",
          Cell[BoxData[
           GraphicsBox[
            {GrayLevel[0.66667], Thickness[0.13], 
             LineBox[{{-1.8, 0.5}, {0, 0}, {1.8, 0.5}}]},
            AspectRatio->1,
            ImageSize->20,
            PlotRange->{{-3, 4}, {-1, 1}}]],ExpressionUUID->
           "00e11fb5-3eea-45df-8345-dcde3424857f"]
         }],ExpressionUUID->"4472117a-8dfa-43db-9fe2-da7125452996"],
         StripOnInput->False],{
        "\"Derivation\"" :> 
         Documentation`HelpLookup[
          "paclet:WolframInstitute/Puzzles/guide/Derivation"]},
        Appearance->None,
        MenuAppearance->Automatic,
        MenuStyle->"MoreAbout"],
       MouseAppearanceTag["LinkHand"]]],
      LineSpacing->{1.4, 0},ExpressionUUID->
      "e56fa49a-6745-493d-a871-0a1be2a0cb62"],
     "\[ThickSpace]\[ThickSpace]\[ThickSpace]\[ThickSpace]\[ThickSpace]\
\[ThickSpace]",
     Cell[BoxData[
      TagBox[
       ActionMenuBox[
        FrameBox[Cell[TextData[{
          "URL",
          " ",
          Cell[BoxData[
           GraphicsBox[
            {GrayLevel[0.66667], Thickness[0.13], 
             LineBox[{{-1.8, 0.5}, {0, 0}, {1.8, 0.5}}]},
            AspectRatio->1,
            ImageSize->20,
            PlotRange->{{-3, 4}, {-1, 1}}]],ExpressionUUID->
           "fe285bbd-9915-43de-b00c-fe01bf43daec"]
         }],ExpressionUUID->"56ec8496-cbf1-4a8d-8144-84ebf96c3ca4"],
         StripOnInput->False],{
        "\"WolframInstitute/Puzzles/ref/BIP32MasterKey\"" :> None, 
         "\"Copy Wolfram Documentation Center URL\"" :> 
         CopyToClipboard["WolframInstitute/Puzzles/ref/BIP32MasterKey"], 
         Delimiter, "\"Copy web URL\"" :> 
         Module[{DocumentationSearch`Private`nb$}, 
           DocumentationSearch`Private`nb$ = 
            NotebookPut[
             Notebook[{
               Cell[BoxData[
                 MakeBoxes[
                  Hyperlink[
                   "http://reference.wolfram.com/language/WolframInstitute/\
Puzzles/ref/BIP32MasterKey.html"], StandardForm]], "Input", TextClipboardType -> 
                 "PlainText"]}, Visible -> False]]; 
           SelectionMove[DocumentationSearch`Private`nb$, All, Notebook]; 
           FrontEndTokenExecute[DocumentationSearch`Private`nb$, "Copy"]; 
           NotebookClose[DocumentationSearch`Private`nb$]; Null], 
         "\"Go to web URL\"" :> 
         FrontEndExecute[{
           NotebookLocate[{
             URL[If[TrueQ[False], 
                 "http://reference.wolfram.com/system-modeler/", 
                 "http://reference.wolfram.com/language/"] <> 
               "WolframInstitute/Puzzles/ref/BIP32MasterKey" <> ".html"], 
              None}]}]},
        Appearance->None,
        MenuAppearance->Automatic,
        MenuStyle->"URLMenu"],
       MouseAppearanceTag["LinkHand"]]],
      LineSpacing->{1.4, 0},ExpressionUUID->
      "73998ac1-aa1b-4188-98e6-712c3a337333"]
    }], "AnchorBar",
     CacheGraphics->False,ExpressionUUID->
     "ae7560d0-0ecf-468e-b351-e8f38eff5dc8"]}
  }]], "AnchorBarGrid",
 CellID->1,ExpressionUUID->"2f3f4ff7-7a64-4f8d-998a-5d436ac6a5fc"],

Cell["WolframInstitute`Puzzles`", "ContextNameCell",ExpressionUUID->"719fc241-7d00-4bec-92fe-6fe9c36d33d1"],

Cell[CellGroupData[{

Cell[BoxData[GridBox[{
   {Cell[TextData[{
     Cell[
     "BIP32MasterKey", "ObjectName",ExpressionUUID->
      "b69bf1a8-8df7-400b-b679-034b8effcb53"],
     Cell[BoxData[
      TemplateBox[{8},
       "Spacer1"]],ExpressionUUID->"20ed64b7-7631-4420-884c-d04cac123ea4"],
     Cell[BoxData[
     ""], "ObjectNameTranslation",ExpressionUUID->
      "93883a14-b648-4183-bc48-ab0a26b9c23d"]
    }],ExpressionUUID->"4f62065a-dce1-4f6a-9e63-9584f9a71b6e"], 
    "\[SpanFromLeft]"}
  }]], "ObjectNameGrid",ExpressionUUID->"2bfb60b4-8feb-4fc6-bf6c-\
87e3a2424eb7"],

Cell[BoxData[GridBox[{
   {"", Cell[TextData[{
     Cell[BoxData[
      RowBox[{
       TemplateBox[{
         Cell[
          TextData["BIP32MasterKey"]], 
         "paclet:WolframInstitute/Puzzles/ref/BIP32MasterKey", 
         "WolframInstitute/Puzzles Package Symbol"},
        "PackageLink",
        BaseStyle->"InlineFormula"], "[", 
       StyleBox["seed", "TI"], "]"}]], "InlineFormula",
      FontFamily->"Source Sans Pro",
      FontSize->0.9 Inherited,ExpressionUUID->
      "cb06c71b-ae3a-475b-8ca3-383590bf5a0a"],
     "\[LineSeparator]",
     "gives the BIP32 master extended private key of a binary ",
     StyleBox["seed", "TI"],
     ", as an Association."
    }],ExpressionUUID->"0fb3da13-e156-4e9d-8d5c-83d82d87a037"]}
  }]], "Usage",ExpressionUUID->"072d8d02-6745-4e53-b19c-d0a5a228c884"]
}, Open  ]],

Cell[CellGroupData[{

Cell[TextData[Cell[BoxData[Cell[TextData[{
  Cell[BoxData[
   DynamicBox[ToBoxes[
     If[CurrentValue[
        EvaluationCell[], "CellGroupOpen"] =!= Closed, 
      Style[
       Graphics[{
         Thickness[0.18], 
         RGBColor[0.8509803921568627, 0.396078431372549, 0], 
         Line[{{-1.8, 0.5}, {0, 0}, {1.8, 0.5}}]}, AspectRatio -> 1, 
        PlotRange -> {{-3, 4}, {-1, 1}}, ImageSize -> 20], Magnification -> 
       0.68 Inherited], 
      Rotate[
       Style[
        Graphics[{
          Thickness[0.18], 
          RGBColor[0.8509803921568627, 0.396078431372549, 0], 
          Line[{{-1.8, 0.5}, {0, 0}, {1.8, 0.5}}]}, AspectRatio -> 1, 
         PlotRange -> {{-3, 4}, {-1, 1}}, ImageSize -> 20], Magnification -> 
        0.68 Inherited], Rational[1, 2] Pi, {-1.65, -1}]]],
    ImageSizeCache->{
     13.600000000000001`, {-0.1685058593749993, 13.768505859375}}]],
   ExpressionUUID->"c457de16-8985-43bf-a982-5d193d515a16"],
  Cell[BoxData[
   TemplateBox[{1},
    "Spacer1"]],ExpressionUUID->"c3f3f018-58da-4bac-bd04-084a7cbeb548"],
  "Details and Options"
 }], "NotesFrameText",ExpressionUUID->
  "c7c8a8b5-8dcd-4d6b-9ee4-e5af8a5c03e4"]],ExpressionUUID->"cbe75632-e594-\
4fb3-939e-d4809e845fe5"]], "NotesSection",
 ShowGroupOpener->"Thumbnail",
 WholeCellGroupOpener->True,
 CellGroupingRules->{"SectionGrouping", 50},
 CacheGraphics->False,
 CellID->1477164140,ExpressionUUID->"3baee47c-183e-4a1c-a0cd-c430ea5da589"],

Cell["\<\
The seed is a ByteArray or a hexadecimal string of 16 to 64 bytes, the range \
BIP32 allows; a seed outside it matches no definition and the call is \
returned unevaluated.\
\>", "Notes",ExpressionUUID->"5da97597-53b7-4e09-a36e-e0549540d633"],

Cell[TextData[{
 "The master key and chain code are the two halves of ",
 Cell["HMAC-SHA512", "InlineCode",
  FontFamily->"Source Sans Pro",ExpressionUUID->
  "71542a2c-7631-40e6-8d57-f657dc5afdda"],
 " of the seed under the key ",
 Cell[BoxData["\<\"Bitcoin seed\"\>"], "InlineFormula",
  FontFamily->"Source Sans Pro",
  FontSize->0.9 Inherited,ExpressionUUID->
  "602cc9ed-8d64-4e9a-9481-d1b0193c3984"],
 "."
}], "Notes",ExpressionUUID->"f36f3007-b681-435c-94b1-05558b556f59"],

Cell[TextData[{
 "The result has the keys ",
 Cell[BoxData["\<\"Type\"\>"], "InlineFormula",
  FontFamily->"Source Sans Pro",
  FontSize->0.9 Inherited,ExpressionUUID->
  "b6ebe45a-beeb-44f0-8e15-c64921610cd2"],
 ", ",
 Cell[BoxData["\<\"Network\"\>"], "InlineFormula",
  FontFamily->"Source Sans Pro",
  FontSize->0.9 Inherited,ExpressionUUID->
  "aa66b94f-0967-4d08-9055-a80936d94322"],
 ", ",
 Cell[BoxData["\<\"Depth\"\>"], "InlineFormula",
  FontFamily->"Source Sans Pro",
  FontSize->0.9 Inherited,ExpressionUUID->
  "39093165-e462-4c57-bbfd-da8cb6508f96"],
 ", ",
 Cell[BoxData["\<\"ParentFingerprint\"\>"], "InlineFormula",
  FontFamily->"Source Sans Pro",
  FontSize->0.9 Inherited,ExpressionUUID->
  "b444b218-dea2-4a94-a66e-c6527af86441"],
 ", ",
 Cell[BoxData["\<\"ChildNumber\"\>"], "InlineFormula",
  FontFamily->"Source Sans Pro",
  FontSize->0.9 Inherited,ExpressionUUID->
  "e84f2942-ee13-47b9-90d0-443b9f5cd7db"],
 ", ",
 Cell[BoxData["\<\"ChainCode\"\>"], "InlineFormula",
  FontFamily->"Source Sans Pro",
  FontSize->0.9 Inherited,ExpressionUUID->
  "eede709a-cff2-4a50-a037-9d2432e6fd54"],
 ", ",
 Cell[BoxData["\<\"Key\"\>"], "InlineFormula",
  FontFamily->"Source Sans Pro",
  FontSize->0.9 Inherited,ExpressionUUID->
  "30a478ff-f478-4d51-ad65-9e7b88466c18"],
 " and ",
 Cell[BoxData["\<\"Version\"\>"], "InlineFormula",
  FontFamily->"Source Sans Pro",
  FontSize->0.9 Inherited,ExpressionUUID->
  "7de38e50-7e82-4d9d-bd3a-9dd20bb1a2f6"],
 "."
}], "Notes",ExpressionUUID->"d6a32abe-53ec-4910-8a32-d74fe8eb4ac2"],

Cell[TextData[{
 Cell[BoxData["\<\"Depth\"\>"], "InlineFormula",
  FontFamily->"Source Sans Pro",
  FontSize->0.9 Inherited,ExpressionUUID->
  "59b1d330-b35a-4e00-8b9d-5c638bf2b36a"],
 " is 0, ",
 Cell[BoxData["\<\"ParentFingerprint\"\>"], "InlineFormula",
  FontFamily->"Source Sans Pro",
  FontSize->0.9 Inherited,ExpressionUUID->
  "8ebaa2a0-5b1e-442f-8245-fd07e3258760"],
 " is four zero bytes and ",
 Cell[BoxData["\<\"ChildNumber\"\>"], "InlineFormula",
  FontFamily->"Source Sans Pro",
  FontSize->0.9 Inherited,ExpressionUUID->
  "28785ed5-c570-4770-b9aa-4b52b9959ee9"],
 " is 0, as BIP32 requires of a master key."
}], "Notes",ExpressionUUID->"9a77e513-bd61-4962-abcd-62f1cfb5f15e"],

Cell[TextData[{
 Cell[BoxData["\<\"Version\"\>"], "InlineFormula",
  FontFamily->"Source Sans Pro",
  FontSize->0.9 Inherited,ExpressionUUID->
  "33e69d75-a029-46c7-817d-b9df98e33bef"],
 " is the mainnet ",
 Cell[BoxData["xprv"], "InlineFormula",
  FontFamily->"Source Sans Pro",
  FontSize->0.9 Inherited,ExpressionUUID->
  "6471f35b-4cd9-4f6c-8063-02a33d728d87"],
 " version; ",
 Cell[BoxData[
  TemplateBox[{
    Cell[
     TextData["BIP32ExtendedKeyString"]], 
    "paclet:WolframInstitute/Puzzles/ref/BIP32ExtendedKeyString", 
    "WolframInstitute/Puzzles Package Symbol"},
   "PackageLink",
   BaseStyle->"InlineFormula"]], "InlineFormula",
  FontFamily->"Source Sans Pro",
  FontSize->0.9 Inherited,ExpressionUUID->
  "2a0000b2-2513-4abe-9830-cd0991a470f5"],
 " serialises the same key under any other registered version."
}], "Notes",ExpressionUUID->"064f1057-ba80-4424-beaf-47e08f762dbe"],

Cell["\<\
A seed whose HMAC gives a left half of zero or at least the group order is \
invalid; BIP32 says such a seed is unusable, and a Failure is returned.\
\>", "Notes",ExpressionUUID->"5596b06d-1d99-4915-848f-f17c9a3cba22"]
}, Closed]],

Cell["", "PageDelimiter",ExpressionUUID->"c427c51a-b6fb-4b07-ba10-1fd01362d479"],

Cell[CellGroupData[{

Cell[TextData[{
 Cell[BoxData[
  DynamicBox[ToBoxes[
    If[
     MatchQ[
      CurrentValue[
       EvaluationNotebook[], {
       TaggingRules, "Openers", "PrimaryExamplesSection"}, Open], 
      Alternatives[True, Open]], 
     Style[
      Graphics[{
        Thickness[0.18], 
        RGBColor[0.8509803921568627, 0.396078431372549, 0], 
        Line[{{-1.8, 0.5}, {0, 0}, {1.8, 0.5}}]}, AspectRatio -> 1, 
       PlotRange -> {{-3, 4}, {-1, 1}}, ImageSize -> 20], Magnification -> 
      0.68 Inherited], 
     Rotate[
      Style[
       Graphics[{
         Thickness[0.18], 
         RGBColor[0.8509803921568627, 0.396078431372549, 0], 
         Line[{{-1.8, 0.5}, {0, 0}, {1.8, 0.5}}]}, AspectRatio -> 1, 
        PlotRange -> {{-3, 4}, {-1, 1}}, ImageSize -> 20], Magnification -> 
       0.68 Inherited], Rational[1, 2] Pi, {-1.65, -1}]]],
   ImageSizeCache->{
    13.600000000000001`, {4.251494140625001, 9.348505859375}}]],
  ExpressionUUID->"41265596-1ed8-45db-949e-ae904e19b630"],
 Cell[BoxData[
  TemplateBox[{1},
   "Spacer1"]],ExpressionUUID->"6ee979d5-088c-4e3b-94cd-5487018ae3f7"],
 "Examples",
 "\[NonBreakingSpace]\[NonBreakingSpace]",
 Cell["(10)", "ExampleCount",ExpressionUUID->
  "2e62ec02-10d4-4820-aad4-bfd4758ee2fd"]
}], "PrimaryExamplesSection",
 WholeCellGroupOpener->True,
 CacheGraphics->False,
 CellID->1786741660,ExpressionUUID->"a95dcc6d-03b1-48ce-9031-f230a29f7743"],

Cell[BoxData[
 RowBox[{"Needs", "[", "\"\<WolframInstitute`Puzzles`\>\"", "]"}]], "Input", \
"ExampleInitialization",
 CellLabel->"In[1]:=",
 CellID->1969679695,ExpressionUUID->"8b966797-be01-4138-ab6d-2a5a4610a7e2"],

Cell[CellGroupData[{

Cell[TextData[{
 Cell[BoxData[
  DynamicBox[ToBoxes[
    If[CurrentValue[
       EvaluationCell[], "CellGroupOpen"] =!= Closed, 
     Style[
      Graphics[{
        Thickness[0.18], 
        RGBColor[0.8509803921568627, 0.396078431372549, 0], 
        Line[{{-1.8, 0.5}, {0, 0}, {1.8, 0.5}}]}, AspectRatio -> 1, 
       PlotRange -> {{-3, 4}, {-1, 1}}, ImageSize -> 20], Magnification -> 
      0.68 Inherited], 
     Rotate[
      Style[
       Graphics[{
         Thickness[0.18], 
         RGBColor[0.8509803921568627, 0.396078431372549, 0], 
         Line[{{-1.8, 0.5}, {0, 0}, {1.8, 0.5}}]}, AspectRatio -> 1, 
        PlotRange -> {{-3, 4}, {-1, 1}}, ImageSize -> 20], Magnification -> 
       0.68 Inherited], Rational[1, 2] Pi, {-1.65, -1}]]]]],ExpressionUUID->
  "f8f91a88-19f3-4618-a1f2-5b5c3c6abded"],
 Cell[BoxData[
  TemplateBox[{1},
   "Spacer1"]],ExpressionUUID->"f983fb21-f8f1-47f8-a359-32f6452b361a"],
 "Basic Examples",
 "\[NonBreakingSpace]\[NonBreakingSpace]",
 Cell["(3)", "ExampleCount",ExpressionUUID->
  "d17b244c-5de3-41ff-9d54-168178e9a0c9"]
}], "ExampleSection", "ExampleSection",
 WholeCellGroupOpener->True,
 CacheGraphics->False,
 CellID->1503243619,ExpressionUUID->"06fc6d0c-5b48-4af0-b4e3-5d37a202c42e"],

Cell[TextData[{
 "The master key of BIP32 test vector 1, whose seed is ",
 Cell[BoxData[
  RowBox[{"000102030405060708090", "a0b0c0d0e0f"}]], "InlineFormula",
  FontFamily->"Source Sans Pro",
  FontSize->0.9 Inherited,ExpressionUUID->
  "670ba4a0-91be-4ade-bf47-173eb198ca7f"],
 ":"
}], "ExampleText",
 CellTags->
  "TextAnnotation",ExpressionUUID->"eb2d486a-1986-4d43-a44f-289ef5ea42b9"],

Cell[CellGroupData[{

Cell[BoxData[
 RowBox[{"BIP32MasterKey", "[", "\"\<000102030405060708090a0b0c0d0e0f\>\"", 
  "]"}]], "Input",
 CellProlog:>Needs["WolframInstitute`Puzzles`"],
 CellLabel->"In[1]:=",ExpressionUUID->"fd04eccf-f96a-444e-8e99-b7d5c81dbb81"],

Cell[BoxData[
 RowBox[{"\[LeftAssociation]", 
  RowBox[{
   RowBox[{"\<\"Type\"\>", "\[Rule]", "\<\"Private\"\>"}], ",", 
   RowBox[{"\<\"Network\"\>", "\[Rule]", "\<\"Mainnet\"\>"}], ",", 
   RowBox[{"\<\"Depth\"\>", "\[Rule]", "0"}], ",", 
   RowBox[{"\<\"ParentFingerprint\"\>", "\[Rule]", 
    InterpretationBox[
     RowBox[{
      TagBox["ByteArray",
       "SummaryHead"], "[", 
      DynamicModuleBox[{Typeset`open$$ = False, Typeset`embedState$$ = 
       "Ready"}, 
       TemplateBox[{
         PaneSelectorBox[{False -> GridBox[{{
               GridBox[{{
                  TagBox["\"4 bytes\"", "SummaryItem"]}}, 
                GridBoxAlignment -> {
                 "Columns" -> {{Left}}, "Rows" -> {{Automatic}}}, AutoDelete -> 
                False, GridBoxItemSize -> {
                 "Columns" -> {{Automatic}}, "Rows" -> {{Automatic}}}, 
                GridBoxSpacings -> {
                 "Columns" -> {{2}}, "Rows" -> {{Automatic}}}, 
                BaseStyle -> {
                 ShowStringCharacters -> False, NumberMarks -> False, 
                  PrintPrecision -> 3, ShowSyntaxStyles -> False}]}}, 
             GridBoxAlignment -> {"Columns" -> {{Left}}, "Rows" -> {{Top}}}, 
             AutoDelete -> False, 
             GridBoxItemSize -> {
              "Columns" -> {{Automatic}}, "Rows" -> {{Automatic}}}, 
             BaselinePosition -> {1, 1}], True -> GridBox[{{
               GridBox[{{
                  TagBox["\"4 bytes\"", "SummaryItem"]}}, 
                GridBoxAlignment -> {
                 "Columns" -> {{Left}}, "Rows" -> {{Automatic}}}, AutoDelete -> 
                False, GridBoxItemSize -> {
                 "Columns" -> {{Automatic}}, "Rows" -> {{Automatic}}}, 
                GridBoxSpacings -> {
                 "Columns" -> {{2}}, "Rows" -> {{Automatic}}}, 
                BaseStyle -> {
                 ShowStringCharacters -> False, NumberMarks -> False, 
                  PrintPrecision -> 3, ShowSyntaxStyles -> False}]}}, 
             GridBoxAlignment -> {"Columns" -> {{Left}}, "Rows" -> {{Top}}}, 
             AutoDelete -> False, 
             GridBoxItemSize -> {
              "Columns" -> {{Automatic}}, "Rows" -> {{Automatic}}}, 
             BaselinePosition -> {1, 1}]}, 
          Dynamic[Typeset`open$$], ImageSize -> Automatic]},
        "SummaryPanel"],
       DynamicModuleValues:>{}], "]"}],
     ByteArray[{0, 0, 0, 0}],
     Editable->False,
     SelectWithContents->True,
     Selectable->False]}], ",", 
   RowBox[{"\<\"ChildNumber\"\>", "\[Rule]", "0"}], ",", 
   RowBox[{"\<\"ChainCode\"\>", "\[Rule]", 
    InterpretationBox[
     RowBox[{
      TagBox["ByteArray",
       "SummaryHead"], "[", 
      DynamicModuleBox[{Typeset`open$$ = False, Typeset`embedState$$ = 
       "Ready"}, 
       TemplateBox[{
         PaneSelectorBox[{False -> GridBox[{{
               GridBox[{{
                  TagBox["\"32 bytes\"", "SummaryItem"]}}, 
                GridBoxAlignment -> {
                 "Columns" -> {{Left}}, "Rows" -> {{Automatic}}}, AutoDelete -> 
                False, GridBoxItemSize -> {
                 "Columns" -> {{Automatic}}, "Rows" -> {{Automatic}}}, 
                GridBoxSpacings -> {
                 "Columns" -> {{2}}, "Rows" -> {{Automatic}}}, 
                BaseStyle -> {
                 ShowStringCharacters -> False, NumberMarks -> False, 
                  PrintPrecision -> 3, ShowSyntaxStyles -> False}]}}, 
             GridBoxAlignment -> {"Columns" -> {{Left}}, "Rows" -> {{Top}}}, 
             AutoDelete -> False, 
             GridBoxItemSize -> {
              "Columns" -> {{Automatic}}, "Rows" -> {{Automatic}}}, 
             BaselinePosition -> {1, 1}], True -> GridBox[{{
               GridBox[{{
                  TagBox["\"32 bytes\"", "SummaryItem"]}}, 
                GridBoxAlignment -> {
                 "Columns" -> {{Left}}, "Rows" -> {{Automatic}}}, AutoDelete -> 
                False, GridBoxItemSize -> {
                 "Columns" -> {{Automatic}}, "Rows" -> {{Automatic}}}, 
                GridBoxSpacings -> {
                 "Columns" -> {{2}}, "Rows" -> {{Automatic}}}, 
                BaseStyle -> {
                 ShowStringCharacters -> False, NumberMarks -> False, 
                  PrintPrecision -> 3, ShowSyntaxStyles -> False}]}}, 
             GridBoxAlignment -> {"Columns" -> {{Left}}, "Rows" -> {{Top}}}, 
             AutoDelete -> False, 
             GridBoxItemSize -> {
              "Columns" -> {{Automatic}}, "Rows" -> {{Automatic}}}, 
             BaselinePosition -> {1, 1}]}, 
          Dynamic[Typeset`open$$], ImageSize -> Automatic]},
        "SummaryPanel"],
       DynamicModuleValues:>{}], "]"}],
     ByteArray[{135, 61, 255, 129, 192, 47, 82, 86, 35, 253, 31, 229, 22, 126,
       172, 58, 85, 160, 73, 222, 61, 49, 75, 180, 46, 226, 39, 255, 237, 55, 
      213, 8}],
     Editable->False,
     SelectWithContents->True,
     Selectable->False]}], ",", 
   RowBox[{"\<\"Key\"\>", "\[Rule]", 
    InterpretationBox[
     RowBox[{
      TagBox["ByteArray",
       "SummaryHead"], "[", 
      DynamicModuleBox[{Typeset`open$$ = False, Typeset`embedState$$ = 
       "Ready"}, 
       TemplateBox[{
         PaneSelectorBox[{False -> GridBox[{{
               GridBox[{{
                  TagBox["\"32 bytes\"", "SummaryItem"]}}, 
                GridBoxAlignment -> {
                 "Columns" -> {{Left}}, "Rows" -> {{Automatic}}}, AutoDelete -> 
                False, GridBoxItemSize -> {
                 "Columns" -> {{Automatic}}, "Rows" -> {{Automatic}}}, 
                GridBoxSpacings -> {
                 "Columns" -> {{2}}, "Rows" -> {{Automatic}}}, 
                BaseStyle -> {
                 ShowStringCharacters -> False, NumberMarks -> False, 
                  PrintPrecision -> 3, ShowSyntaxStyles -> False}]}}, 
             GridBoxAlignment -> {"Columns" -> {{Left}}, "Rows" -> {{Top}}}, 
             AutoDelete -> False, 
             GridBoxItemSize -> {
              "Columns" -> {{Automatic}}, "Rows" -> {{Automatic}}}, 
             BaselinePosition -> {1, 1}], True -> GridBox[{{
               GridBox[{{
                  TagBox["\"32 bytes\"", "SummaryItem"]}}, 
                GridBoxAlignment -> {
                 "Columns" -> {{Left}}, "Rows" -> {{Automatic}}}, AutoDelete -> 
                False, GridBoxItemSize -> {
                 "Columns" -> {{Automatic}}, "Rows" -> {{Automatic}}}, 
                GridBoxSpacings -> {
                 "Columns" -> {{2}}, "Rows" -> {{Automatic}}}, 
                BaseStyle -> {
                 ShowStringCharacters -> False, NumberMarks -> False, 
                  PrintPrecision -> 3, ShowSyntaxStyles -> False}]}}, 
             GridBoxAlignment -> {"Columns" -> {{Left}}, "Rows" -> {{Top}}}, 
             AutoDelete -> False, 
             GridBoxItemSize -> {
              "Columns" -> {{Automatic}}, "Rows" -> {{Automatic}}}, 
             BaselinePosition -> {1, 1}]}, 
          Dynamic[Typeset`open$$], ImageSize -> Automatic]},
        "SummaryPanel"],
       DynamicModuleValues:>{}], "]"}],
     ByteArray[{232, 243, 46, 114, 61, 236, 244, 5, 26, 239, 172, 142, 44, 
      147, 201, 197, 178, 20, 49, 56, 23, 205, 176, 26, 20, 148, 185, 23, 200,
       67, 107, 53}],
     Editable->False,
     SelectWithContents->True,
     Selectable->False]}], ",", 
   RowBox[{"\<\"Version\"\>", "\[Rule]", 
    InterpretationBox[
     RowBox[{
      TagBox["ByteArray",
       "SummaryHead"], "[", 
      DynamicModuleBox[{Typeset`open$$ = False, Typeset`embedState$$ = 
       "Ready"}, 
       TemplateBox[{
         PaneSelectorBox[{False -> GridBox[{{
               GridBox[{{
                  TagBox["\"4 bytes\"", "SummaryItem"]}}, 
                GridBoxAlignment -> {
                 "Columns" -> {{Left}}, "Rows" -> {{Automatic}}}, AutoDelete -> 
                False, GridBoxItemSize -> {
                 "Columns" -> {{Automatic}}, "Rows" -> {{Automatic}}}, 
                GridBoxSpacings -> {
                 "Columns" -> {{2}}, "Rows" -> {{Automatic}}}, 
                BaseStyle -> {
                 ShowStringCharacters -> False, NumberMarks -> False, 
                  PrintPrecision -> 3, ShowSyntaxStyles -> False}]}}, 
             GridBoxAlignment -> {"Columns" -> {{Left}}, "Rows" -> {{Top}}}, 
             AutoDelete -> False, 
             GridBoxItemSize -> {
              "Columns" -> {{Automatic}}, "Rows" -> {{Automatic}}}, 
             BaselinePosition -> {1, 1}], True -> GridBox[{{
               GridBox[{{
                  TagBox["\"4 bytes\"", "SummaryItem"]}}, 
                GridBoxAlignment -> {
                 "Columns" -> {{Left}}, "Rows" -> {{Automatic}}}, AutoDelete -> 
                False, GridBoxItemSize -> {
                 "Columns" -> {{Automatic}}, "Rows" -> {{Automatic}}}, 
                GridBoxSpacings -> {
                 "Columns" -> {{2}}, "Rows" -> {{Automatic}}}, 
                BaseStyle -> {
                 ShowStringCharacters -> False, NumberMarks -> False, 
                  PrintPrecision -> 3, ShowSyntaxStyles -> False}]}}, 
             GridBoxAlignment -> {"Columns" -> {{Left}}, "Rows" -> {{Top}}}, 
             AutoDelete -> False, 
             GridBoxItemSize -> {
              "Columns" -> {{Automatic}}, "Rows" -> {{Automatic}}}, 
             BaselinePosition -> {1, 1}]}, 
          Dynamic[Typeset`open$$], ImageSize -> Automatic]},
        "SummaryPanel"],
       DynamicModuleValues:>{}], "]"}],
     ByteArray[{4, 136, 173, 228}],
     Editable->False,
     SelectWithContents->True,
     Selectable->False]}]}], "\[RightAssociation]"}]], "Output",
 CellLabel->"Out[1]= ",ExpressionUUID->"9c66b1e6-eefd-4930-bf6f-bea4f69c2a1f"]
}, Open  ]],

Cell[CellGroupData[{

Cell[BoxData[
 InterpretationBox[Cell[
  "\t", "ExampleDelimiter",ExpressionUUID->
   "c4307080-19a7-40b4-a7f5-6784cf60d5d4"],
  $Line = 0; Null]], "ExampleDelimiter",ExpressionUUID->"65456c03-4246-4821-\
b0af-fa1a5282e521"],

Cell["\<\
Serialised, it is the xprv string the specification publishes:\
\>", "ExampleText",ExpressionUUID->"8e1a8b1f-7029-43d3-bafc-989193101bce"],

Cell[CellGroupData[{

Cell[BoxData[
 RowBox[{"BIP32ExtendedKeyString", "[", 
  RowBox[{
  "BIP32MasterKey", "[", "\"\<000102030405060708090a0b0c0d0e0f\>\"", "]"}], 
  "]"}]], "Input",
 CellProlog:>Needs["WolframInstitute`Puzzles`"],
 CellLabel->"In[1]:=",ExpressionUUID->"f1937924-caca-4955-babe-6fc5fca2438a"],

Cell[BoxData["\<\"\
xprv9s21ZrQH143K3QTDL4LXw2F7HEK3wJUD2nW2nRk4stbPy6cq3jPPqjiChkVvvNKmPGJxWUtg6L\
nF5kejMRNNU3TGtRBeJgk33yuGBxrMPHi\"\>"], "Output",
 CellLabel->"Out[1]= ",ExpressionUUID->"e5a52c3c-8643-499a-936c-0b7ad053f1f4"]
}, Open  ]]
}, Open  ]],

Cell[CellGroupData[{

Cell[BoxData[
 InterpretationBox[Cell[
  "\t", "ExampleDelimiter",ExpressionUUID->
   "75606842-a83c-4ca5-9c03-398af6ebee22"],
  $Line = 0; Null]], "ExampleDelimiter",ExpressionUUID->"8935fadc-e4e2-4623-\
9134-4b9074f21fa3"],

Cell["\<\
The master key of the BIP39 seed of the mnemonic \"abandon abandon \
\[Ellipsis] about\":\
\>", "ExampleText",ExpressionUUID->"4f51f98d-7a6e-4e9b-9b55-b6a83cfcf365"],

Cell[CellGroupData[{

Cell[BoxData[
 RowBox[{"BIP32ExtendedKeyString", "[", 
  RowBox[{
  "BIP32MasterKey", 
   "[", "\"\<\
5eb00bbddcf069084889a8ab9155568165f5c453ccb85e70811aaed6f6da5fc19a5ac40b389cd3\
70d086206dec8aa6c43daea6690f20ad3d8d48b2d2ce9e38e4\>\"", "]"}], 
  "]"}]], "Input",
 CellProlog:>Needs["WolframInstitute`Puzzles`"],
 CellLabel->"In[1]:=",ExpressionUUID->"34a918ca-8183-4c9c-acfa-29a6228399d0"],

Cell[BoxData["\<\"\
xprv9s21ZrQH143K3GJpoapnV8SFfukcVBSfeCficPSGfubmSFDxo1kuHnLisriDvSnRRuL2Qrg5gg\
qHKNVpxR86QEC8w35uxmGoggxtQTPvfUu\"\>"], "Output",
 CellLabel->"Out[1]= ",ExpressionUUID->"87ec8a19-5a89-480f-b5c5-3ab654dd020a"]
}, Open  ]]
}, Open  ]]
}, Open  ]],

Cell[CellGroupData[{

Cell[TextData[{
 Cell[BoxData[
  DynamicBox[ToBoxes[
    If[CurrentValue[
       EvaluationCell[], "CellGroupOpen"] =!= Closed, 
     Style[
      Graphics[{
        Thickness[0.18], 
        RGBColor[0.8509803921568627, 0.396078431372549, 0], 
        Line[{{-1.8, 0.5}, {0, 0}, {1.8, 0.5}}]}, AspectRatio -> 1, 
       PlotRange -> {{-3, 4}, {-1, 1}}, ImageSize -> 20], Magnification -> 
      0.68 Inherited], 
     Rotate[
      Style[
       Graphics[{
         Thickness[0.18], 
         RGBColor[0.8509803921568627, 0.396078431372549, 0], 
         Line[{{-1.8, 0.5}, {0, 0}, {1.8, 0.5}}]}, AspectRatio -> 1, 
        PlotRange -> {{-3, 4}, {-1, 1}}, ImageSize -> 20], Magnification -> 
       0.68 Inherited], Rational[1, 2] Pi, {-1.65, -1}]]]]],ExpressionUUID->
  "37bab536-ae02-44d6-9db0-bb7259b36923"],
 Cell[BoxData[
  TemplateBox[{1},
   "Spacer1"]],ExpressionUUID->"5da8d7f5-4c58-443c-b7d3-2fc03d4e7dd4"],
 "Scope",
 "\[NonBreakingSpace]\[NonBreakingSpace]",
 Cell["(3)", "ExampleCount",ExpressionUUID->
  "ce53b436-b134-41a4-98b6-efd733fee76c"]
}], "ExampleSection", "ExampleSection",
 WholeCellGroupOpener->True,
 CacheGraphics->False,
 CellID->1293636265,ExpressionUUID->"8c980740-b982-44a0-abda-183ede2a9ea4"],

Cell["\<\
A seed given as a ByteArray gives the same key as its hexadecimal spelling:\
\>", "ExampleText",ExpressionUUID->"13f29917-cb25-4d86-9057-6733d2fcfbb9"],

Cell[CellGroupData[{

Cell[BoxData[
 RowBox[{
  RowBox[{"BIP32MasterKey", "[", 
   RowBox[{"ByteArray", "[", 
    RowBox[{"Range", "[", 
     RowBox[{"0", ",", " ", "15"}], "]"}], "]"}], "]"}], " ", "===", " ", 
  RowBox[{
  "BIP32MasterKey", "[", "\"\<000102030405060708090a0b0c0d0e0f\>\"", 
   "]"}]}]], "Input",
 CellProlog:>Needs["WolframInstitute`Puzzles`"],
 CellLabel->"In[1]:=",ExpressionUUID->"233a2fb1-3922-4c1e-9e0f-b35bceca62d6"],

Cell[BoxData["True"], "Output",
 CellLabel->"Out[1]= ",ExpressionUUID->"e14abdf7-7bcc-4b7e-9a50-25cc688cd50b"]
}, Open  ]],

Cell[CellGroupData[{

Cell[BoxData[
 InterpretationBox[Cell[
  "\t", "ExampleDelimiter",ExpressionUUID->
   "1761c93b-2059-4091-aeee-6708b2f4402c"],
  $Line = 0; Null]], "ExampleDelimiter",ExpressionUUID->"bd46d8fa-fada-435e-\
849c-06b87633321e"],

Cell["The master key is at depth zero with no parent:", "ExampleText",ExpressionUUID->"e8b08dae-93a7-453b-a8b3-697ea08f83b2"],

Cell[CellGroupData[{

Cell[BoxData[
 RowBox[{"KeyTake", "[", 
  RowBox[{
   RowBox[{
   "BIP32MasterKey", "[", "\"\<000102030405060708090a0b0c0d0e0f\>\"", "]"}], ",",
    " ", 
   RowBox[{"{", 
    RowBox[{"\"\<Depth\>\"", ",", " ", "\"\<ChildNumber\>\"", ",", 
     " ", "\"\<Type\>\"", ",", " ", "\"\<Network\>\""}], "}"}]}], 
  "]"}]], "Input",
 CellProlog:>Needs["WolframInstitute`Puzzles`"],
 CellLabel->"In[1]:=",ExpressionUUID->"34009ac3-cb2b-4a14-8c83-aabff2a2d175"],

Cell[BoxData[
 RowBox[{"\[LeftAssociation]", 
  RowBox[{
   RowBox[{"\<\"Depth\"\>", "\[Rule]", "0"}], ",", 
   RowBox[{"\<\"ChildNumber\"\>", "\[Rule]", "0"}], ",", 
   RowBox[{"\<\"Type\"\>", "\[Rule]", "\<\"Private\"\>"}], ",", 
   RowBox[{"\<\"Network\"\>", "\[Rule]", "\<\"Mainnet\"\>"}]}], 
  "\[RightAssociation]"}]], "Output",
 CellLabel->"Out[1]= ",ExpressionUUID->"70e22f43-2db2-4092-8a41-af101e67c715"]
}, Open  ]]
}, Open  ]],

Cell[CellGroupData[{

Cell[BoxData[
 InterpretationBox[Cell[
  "\t", "ExampleDelimiter",ExpressionUUID->
   "bd4cc322-dfa7-4b6e-a545-a2def1fb7496"],
  $Line = 0; Null]], "ExampleDelimiter",ExpressionUUID->"42357f76-3974-48a3-\
80ed-c32123c7b5d4"],

Cell["\<\
BIP32 requires a seed of 128 to 512 bits, so a four-byte seed is out of scope \
and the call is returned unevaluated:\
\>", "ExampleText",ExpressionUUID->"00f51f53-19e9-418f-9dd7-1f543b7d3776"],

Cell[CellGroupData[{

Cell[BoxData[
 RowBox[{"MatchQ", "[", 
  RowBox[{
   RowBox[{"BIP32MasterKey", "[", "\"\<00010203\>\"", "]"}], ",", " ", 
   "_BIP32MasterKey"}], "]"}]], "Input",
 CellProlog:>Needs["WolframInstitute`Puzzles`"],
 CellLabel->"In[1]:=",ExpressionUUID->"390e87a7-593c-4bbe-b342-1c95564535c6"],

Cell[BoxData["True"], "Output",
 CellLabel->"Out[1]= ",ExpressionUUID->"aa16228b-dc01-4f8c-96e7-afa778b9290b"]
}, Open  ]]
}, Open  ]]
}, Closed]],

Cell[CellGroupData[{

Cell[TextData[{
 Cell[BoxData[
  DynamicBox[ToBoxes[
    If[CurrentValue[
       EvaluationCell[], "CellGroupOpen"] =!= Closed, 
     Style[
      Graphics[{
        Thickness[0.18], 
        RGBColor[0.8509803921568627, 0.396078431372549, 0], 
        Line[{{-1.8, 0.5}, {0, 0}, {1.8, 0.5}}]}, AspectRatio -> 1, 
       PlotRange -> {{-3, 4}, {-1, 1}}, ImageSize -> 20], Magnification -> 
      0.68 Inherited], 
     Rotate[
      Style[
       Graphics[{
         Thickness[0.18], 
         RGBColor[0.8509803921568627, 0.396078431372549, 0], 
         Line[{{-1.8, 0.5}, {0, 0}, {1.8, 0.5}}]}, AspectRatio -> 1, 
        PlotRange -> {{-3, 4}, {-1, 1}}, ImageSize -> 20], Magnification -> 
       0.68 Inherited], Rational[1, 2] Pi, {-1.65, -1}]]]]],ExpressionUUID->
  "3d5b8e7a-9ffe-4c80-b79d-8fd3345978dc"],
 Cell[BoxData[
  TemplateBox[{1},
   "Spacer1"]],ExpressionUUID->"088ccc96-4923-4063-a35b-e231f176f98e"],
 "Applications",
 "\[NonBreakingSpace]\[NonBreakingSpace]",
 Cell["(1)", "ExampleCount",ExpressionUUID->
  "3b142783-230f-405f-823b-f07097b04ca1"]
}], "ExampleSection", "ExampleSection",
 WholeCellGroupOpener->True,
 CacheGraphics->False,
 CellID->258228157,ExpressionUUID->"a1051e72-c364-4fd9-aa29-82f4e3c173b5"],

Cell["\<\
The BIP84 account key, serialised under the zprv version the specification \
uses:\
\>", "ExampleText",ExpressionUUID->"a2204308-a432-4705-9e3b-c5bafbd2488f"],

Cell[CellGroupData[{

Cell[BoxData[
 RowBox[{"BIP32ExtendedKeyString", "[", 
  RowBox[{
   RowBox[{"BIP32DeriveKey", "[", 
    RowBox[{
     RowBox[{
     "BIP32MasterKey", 
      "[", "\"\<\
5eb00bbddcf069084889a8ab9155568165f5c453ccb85e70811aaed6f6da5fc19a5ac40b389cd3\
70d086206dec8aa6c43daea6690f20ad3d8d48b2d2ce9e38e4\>\"", "]"}], ",", 
     " ", "\"\<m/84h/0h/0h\>\""}], "]"}], ",", " ", "\"\<zprv\>\""}], 
  "]"}]], "Input",
 CellProlog:>Needs["WolframInstitute`Puzzles`"],
 CellLabel->"In[1]:=",ExpressionUUID->"34487172-b137-4f20-8b7f-1f1239b7b8a4"],

Cell[BoxData["\<\"\
zprvAdG4iTXWBoARxkkzNpNh8r6Qag3irQB8PzEMkAFeTRXxHpbF9z4QgEvBRmfvqWvGp42t42nvgG\
pNgYSJA9iefm1yYNZKEm7z6qUWCroSQnE\"\>"], "Output",
 CellLabel->"Out[1]= ",ExpressionUUID->"69876ec7-16fa-47bf-b99d-0b5686a6a6c3"]
}, Open  ]]
}, Closed]],

Cell[CellGroupData[{

Cell[TextData[{
 Cell[BoxData[
  DynamicBox[ToBoxes[
    If[CurrentValue[
       EvaluationCell[], "CellGroupOpen"] =!= Closed, 
     Style[
      Graphics[{
        Thickness[0.18], 
        RGBColor[0.8509803921568627, 0.396078431372549, 0], 
        Line[{{-1.8, 0.5}, {0, 0}, {1.8, 0.5}}]}, AspectRatio -> 1, 
       PlotRange -> {{-3, 4}, {-1, 1}}, ImageSize -> 20], Magnification -> 
      0.68 Inherited], 
     Rotate[
      Style[
       Graphics[{
         Thickness[0.18], 
         RGBColor[0.8509803921568627, 0.396078431372549, 0], 
         Line[{{-1.8, 0.5}, {0, 0}, {1.8, 0.5}}]}, AspectRatio -> 1, 
        PlotRange -> {{-3, 4}, {-1, 1}}, ImageSize -> 20], Magnification -> 
       0.68 Inherited], Rational[1, 2] Pi, {-1.65, -1}]]]]],ExpressionUUID->
  "8fdc203b-ed55-49d3-b0f8-8932943756e1"],
 Cell[BoxData[
  TemplateBox[{1},
   "Spacer1"]],ExpressionUUID->"a766045b-a578-4fef-97ac-aca250668806"],
 "Properties & Relations",
 "\[NonBreakingSpace]\[NonBreakingSpace]",
 Cell["(2)", "ExampleCount",ExpressionUUID->
  "d995e3fc-155b-4069-9dc9-644c71950104"]
}], "ExampleSection", "ExampleSection",
 WholeCellGroupOpener->True,
 CacheGraphics->False,
 CellID->2123667759,ExpressionUUID->"484dcfe1-ff08-4a93-8379-62e374004256"],

Cell["\<\
Parsing the published xprv string gives back exactly the derived key:\
\>", "ExampleText",ExpressionUUID->"bcef5264-98d4-4f14-a2e0-0623ba9ef1ad"],

Cell[CellGroupData[{

Cell[BoxData[
 RowBox[{
  RowBox[{
  "BIP32ExtendedKey", 
   "[", "\"\<\
xprv9s21ZrQH143K3QTDL4LXw2F7HEK3wJUD2nW2nRk4stbPy6cq3jPPqjiChkVvvNKmPGJxWUtg6L\
nF5kejMRNNU3TGtRBeJgk33yuGBxrMPHi\>\"", "]"}], " ", "===", " ", 
  RowBox[{
  "BIP32MasterKey", "[", "\"\<000102030405060708090a0b0c0d0e0f\>\"", 
   "]"}]}]], "Input",
 CellProlog:>Needs["WolframInstitute`Puzzles`"],
 CellLabel->"In[1]:=",ExpressionUUID->"e4d38096-25be-4671-b465-9b0d906ee643"],

Cell[BoxData["True"], "Output",
 CellLabel->"Out[1]= ",ExpressionUUID->"fddcc46a-2818-4505-97b3-1a3f84d7830b"]
}, Open  ]],

Cell[CellGroupData[{

Cell[BoxData[
 InterpretationBox[Cell[
  "\t", "ExampleDelimiter",ExpressionUUID->
   "f8d31509-7fb5-451f-9952-c759286a277b"],
  $Line = 0; Null]], "ExampleDelimiter",ExpressionUUID->"69667362-6929-403e-\
8888-fab0ca24abf6"],

Cell["\<\
The chain code is the second half of the same HMAC that gives the key:\
\>", "ExampleText",ExpressionUUID->"a840c4bd-3ef3-4c21-91fc-c8a4498977ad"],

Cell[CellGroupData[{

Cell[BoxData[
 RowBox[{"Length", "[", 
  RowBox[{
   RowBox[{
   "BIP32MasterKey", "[", "\"\<000102030405060708090a0b0c0d0e0f\>\"", "]"}], 
   "[", "\"\<ChainCode\>\"", "]"}], "]"}]], "Input",
 CellProlog:>Needs["WolframInstitute`Puzzles`"],
 CellLabel->"In[1]:=",ExpressionUUID->"1fe39d0b-dade-4bcb-b241-a5b89f46bb11"],

Cell[BoxData["32"], "Output",
 CellLabel->"Out[1]= ",ExpressionUUID->"455e8999-7c3a-4b06-9a14-475bf1299de5"]
}, Open  ]]
}, Open  ]]
}, Closed]],

Cell[CellGroupData[{

Cell[TextData[{
 Cell[BoxData[
  DynamicBox[ToBoxes[
    If[CurrentValue[
       EvaluationCell[], "CellGroupOpen"] =!= Closed, 
     Style[
      Graphics[{
        Thickness[0.18], 
        RGBColor[0.8509803921568627, 0.396078431372549, 0], 
        Line[{{-1.8, 0.5}, {0, 0}, {1.8, 0.5}}]}, AspectRatio -> 1, 
       PlotRange -> {{-3, 4}, {-1, 1}}, ImageSize -> 20], Magnification -> 
      0.68 Inherited], 
     Rotate[
      Style[
       Graphics[{
         Thickness[0.18], 
         RGBColor[0.8509803921568627, 0.396078431372549, 0], 
         Line[{{-1.8, 0.5}, {0, 0}, {1.8, 0.5}}]}, AspectRatio -> 1, 
        PlotRange -> {{-3, 4}, {-1, 1}}, ImageSize -> 20], Magnification -> 
       0.68 Inherited], Rational[1, 2] Pi, {-1.65, -1}]]]]],ExpressionUUID->
  "4ffa5d19-e485-4d6d-a48e-ebff69bac49a"],
 Cell[BoxData[
  TemplateBox[{1},
   "Spacer1"]],ExpressionUUID->"4e3b1c28-35fa-47c3-9f86-3811a10c80a8"],
 "Possible Issues",
 "\[NonBreakingSpace]\[NonBreakingSpace]",
 Cell["(1)", "ExampleCount",ExpressionUUID->
  "f73d4d6c-cbef-4332-b2c4-b62657deceb8"]
}], "ExampleSection", "ExampleSection",
 WholeCellGroupOpener->True,
 CacheGraphics->False,
 CellID->1305812373,ExpressionUUID->"b2814e3d-9b36-4a11-92bb-dbe916e6d2ac"],

Cell["\<\
Two seeds that differ in one bit give unrelated master keys, which is why a \
mistyped seed fails silently rather than nearly working:\
\>", "ExampleText",ExpressionUUID->"931172e7-e3ff-42cb-b852-90ae74ce925b"],

Cell[CellGroupData[{

Cell[BoxData[
 RowBox[{"BIP32ExtendedKeyString", "[", 
  RowBox[{
  "BIP32MasterKey", "[", "\"\<000102030405060708090a0b0c0d0e0e\>\"", "]"}], 
  "]"}]], "Input",
 CellProlog:>Needs["WolframInstitute`Puzzles`"],
 CellLabel->"In[1]:=",ExpressionUUID->"e0d2d33d-ddfb-4365-add0-44c694636984"],

Cell[BoxData["\<\"\
xprv9s21ZrQH143K39pPBDJyN4FGrctvXz5FrHSHevNZEpyob7nUpkWUd7AVFb7rjBcun4z6E8C1sn\
gm14CPqWMNqvbYoYfziJHrLwFNWNqgHYz\"\>"], "Output",
 CellLabel->"Out[1]= ",ExpressionUUID->"6d266d90-64a0-475c-a3ec-4fd35b3ce77e"]
}, Open  ]]
}, Closed]]
}, Open  ]],

Cell[BoxData[GridBox[{
   {
    DynamicBox[FEPrivate`ImportImage[
      FrontEnd`FileName[{"Documentation", "FooterIcons"}, 
       "RelatedFunction.png"]]], GridBox[{
      {
       StyleBox[
        RowBox[{"See", " ", "Also"}], "SeeAlsoSection"]},
      {Cell[TextData[{
        Cell[BoxData[
         TemplateBox[{
           Cell[
            TextData["BIP32DeriveKey"]], 
           "paclet:WolframInstitute/Puzzles/ref/BIP32DeriveKey", 
           "WolframInstitute/Puzzles Package Symbol"},
          "PackageLink",
          BaseStyle->"InlineFormula"]], "InlineFormula",
         FontFamily->"Source Sans Pro",ExpressionUUID->
         "7d5d96fe-f0e3-42c4-ba37-327983917958"],
        "\[NonBreakingSpace]",
        StyleBox[
        "\[MediumSpace]\[FilledVerySmallSquare]\[MediumSpace]", 
         "InlineSeparator"],
        " ",
        Cell[BoxData[
         TemplateBox[{
           Cell[
            TextData["BIP32ChildKey"]], 
           "paclet:WolframInstitute/Puzzles/ref/BIP32ChildKey", 
           "WolframInstitute/Puzzles Package Symbol"},
          "PackageLink",
          BaseStyle->"InlineFormula"]], "InlineFormula",
         FontFamily->"Source Sans Pro",ExpressionUUID->
         "fff58f53-d8a7-478d-8e5b-dbbcb79e52fe"],
        "\[NonBreakingSpace]",
        StyleBox[
        "\[MediumSpace]\[FilledVerySmallSquare]\[MediumSpace]", 
         "InlineSeparator"],
        " ",
        Cell[BoxData[
         TemplateBox[{
           Cell[
            TextData["BIP32PublicKey"]], 
           "paclet:WolframInstitute/Puzzles/ref/BIP32PublicKey", 
           "WolframInstitute/Puzzles Package Symbol"},
          "PackageLink",
          BaseStyle->"InlineFormula"]], "InlineFormula",
         FontFamily->"Source Sans Pro",ExpressionUUID->
         "7f16c150-a1fb-47af-bc0d-d55cc4218631"],
        "\[NonBreakingSpace]",
        StyleBox[
        "\[MediumSpace]\[FilledVerySmallSquare]\[MediumSpace]", 
         "InlineSeparator"],
        " ",
        Cell[BoxData[
         TemplateBox[{
           Cell[
            TextData["BIP32ExtendedKeyString"]], 
           "paclet:WolframInstitute/Puzzles/ref/BIP32ExtendedKeyString", 
           "WolframInstitute/Puzzles Package Symbol"},
          "PackageLink",
          BaseStyle->"InlineFormula"]], "InlineFormula",
         FontFamily->"Source Sans Pro",ExpressionUUID->
         "b4a9d830-be29-4d92-8c62-82e0332f8a6b"],
        "\[NonBreakingSpace]",
        StyleBox[
        "\[MediumSpace]\[FilledVerySmallSquare]\[MediumSpace]", 
         "InlineSeparator"],
        " ",
        Cell[BoxData[
         TemplateBox[{
           Cell[
            TextData["BIP39Seed"]], 
           "paclet:WolframInstitute/Puzzles/ref/BIP39Seed", 
           "WolframInstitute/Puzzles Package Symbol"},
          "PackageLink",
          BaseStyle->"InlineFormula"]], "InlineFormula",
         FontFamily->"Source Sans Pro",ExpressionUUID->
         "4839f292-43f1-4f18-808b-f16fc56efb6b"]
       }], "SeeAlso",ExpressionUUID->"3900d455-05ea-4424-8920-d5fea54c2558"]}
     }]}
  }]], "SeeAlsoSection",ExpressionUUID->"bbba357a-4756-4a9c-b730-\
fa7568c16ac0"],

Cell[BoxData[GridBox[{
   {
    DynamicBox[FEPrivate`ImportImage[
      FrontEnd`FileName[{"Documentation", "FooterIcons"}, 
       "RelatedGuide.png"]]], GridBox[{
      {
       StyleBox[
        RowBox[{"Related", " ", "Guides"}], "MoreAboutSection"]},
      {
       RowBox[{"\[FilledVerySmallSquare]", Cell[BoxData[
         TemplateBox[{
           Cell[
            TextData["Derivation"]], 
           "paclet:WolframInstitute/Puzzles/guide/Derivation"},
          "RefLinkPlain",
          BaseStyle->{"MoreAbout"}]], "MoreAbout",ExpressionUUID->
         "cd8a83ae-42d6-42a0-ac0a-fd94310fd78d"]}]}
     }]}
  }]], "MoreAboutSection",ExpressionUUID->"035998f3-54b3-41a0-9057-\
b82f8a519eaa"],

Cell[" ", "FooterCell",ExpressionUUID->"708cecc1-eab4-4075-ab90-5eb1a53e4028"]
},
Saveable->False,
ScreenStyleEnvironment->"Working",
WindowSize->{900, 830},
WindowMargins->{{0, Automatic}, {Automatic, 0}},
WindowTitle->"BIP32MasterKey",
TaggingRules->{
 "ModificationHighlight" -> False, "ColorType" -> "", "LinkTrails" -> "", 
  "ExampleCounter" -> 1, 
  "Openers" -> {
   "PrimaryExamplesSection" -> Open, "ExampleSection" -> {"0" -> Open}, 
    "AllOptsTable" -> Closed}, "NewStyles" -> True, 
  "CitationPopupData" -> $Failed, "ShowCitation" -> False, "HasOptions" -> 
  True, "RootCaptions" -> "", "HeaderCoreAreaLink" -> {}, 
  "Metadata" -> {
   "built" -> "{2026, 8, 27, 0, 11, 25.857999}", 
    "history" -> {"XX", "", "", ""}, "context" -> "WolframInstitute`Puzzles`",
     "keywords" -> {}, "specialkeywords" -> {}, 
    "tutorialcollectionlinks" -> {}, "index" -> True, "label" -> 
    "Wolfram Institute/ Puzzles Symbol", "language" -> "en", "paclet" -> 
    "WolframInstitute/Puzzles", "status" -> "None", "summary" -> 
    "PackageLink[BIP32MasterKey,paclet : \
WolframInstitute/Puzzles/ref/BIP32MasterKey, WolframInstitute/Puzzles Package \
Symbol][seed] gives the BIP32 master extended private key of a binary seed, \
as an Association.", "synonyms" -> {}, "tabletags" -> {}, "title" -> 
    "BIP32MasterKey", "titlemodifier" -> "", "metadescription" -> "", 
    "windowtitle" -> "BIP32MasterKey", "type" -> "Symbol", "uri" -> 
    "WolframInstitute/Puzzles/ref/BIP32MasterKey", "WorkflowDockedCell" -> 
    ""}, "SearchTextTranslated" -> ""},
CellContext->CellGroup,
FrontEndVersion->"15.0 for Mac OS X ARM (64-bit) (May 19, 2026)",
StyleDefinitions->FrontEnd`FileName[{"Wolfram"}, "Reference.nb"],
ExpressionUUID->"95ce51b7-4c75-4538-9ee8-0aa06dde78e7"
]
(* End of Notebook Content *)

(* Internal cache information *)
(*CellTagsOutline
CellTagsIndex->{
 "TextAnnotation"->{
  Cell[16488, 442, 388, 10, 70, "ExampleText",ExpressionUUID->"eb2d486a-1986-4d43-a44f-289ef5ea42b9",
   CellTags->"TextAnnotation"]}
 }
*)
(*CellTagsIndex
CellTagsIndex->{
 {"TextAnnotation", 46152, 1213}
 }
*)
(*NotebookFileOutline
Notebook[{
Cell[582, 21, 5815, 142, 70, "AnchorBarGrid",ExpressionUUID->"2f3f4ff7-7a64-4f8d-998a-5d436ac6a5fc",
 CellID->1],
Cell[6400, 165, 107, 0, 70, "ContextNameCell",ExpressionUUID->"719fc241-7d00-4bec-92fe-6fe9c36d33d1"],
Cell[CellGroupData[{
Cell[6532, 169, 557, 14, 70, "ObjectNameGrid",ExpressionUUID->"2bfb60b4-8feb-4fc6-bf6c-87e3a2424eb7"],
Cell[7092, 185, 808, 20, 70, "Usage",ExpressionUUID->"072d8d02-6745-4e53-b19c-d0a5a228c884"]
}, Open  ]],
Cell[CellGroupData[{
Cell[7937, 210, 1444, 34, 70, "NotesSection",ExpressionUUID->"3baee47c-183e-4a1c-a0cd-c430ea5da589",
 CellGroupingRules->{"SectionGrouping", 50},
 CellID->1477164140],
Cell[9384, 246, 252, 4, 70, "Notes",ExpressionUUID->"5da97597-53b7-4e09-a36e-e0549540d633"],
Cell[9639, 252, 479, 11, 70, "Notes",ExpressionUUID->"f36f3007-b681-435c-94b1-05558b556f59"],
Cell[10121, 265, 1536, 42, 70, "Notes",ExpressionUUID->"d6a32abe-53ec-4910-8a32-d74fe8eb4ac2"],
Cell[11660, 309, 691, 16, 70, "Notes",ExpressionUUID->"9a77e513-bd61-4962-abcd-62f1cfb5f15e"],
Cell[12354, 327, 898, 23, 70, "Notes",ExpressionUUID->"064f1057-ba80-4424-beaf-47e08f762dbe"],
Cell[13255, 352, 228, 3, 70, "Notes",ExpressionUUID->"5596b06d-1d99-4915-848f-f17c9a3cba22"]
}, Closed]],
Cell[13498, 358, 80, 0, 70, "PageDelimiter",ExpressionUUID->"c427c51a-b6fb-4b07-ba10-1fd01362d479"],
Cell[CellGroupData[{
Cell[13603, 362, 1402, 37, 70, "PrimaryExamplesSection",ExpressionUUID->"a95dcc6d-03b1-48ce-9031-f230a29f7743",
 CellID->1786741660],
Cell[15008, 401, 216, 4, 70, "Input",ExpressionUUID->"8b966797-be01-4138-ab6d-2a5a4610a7e2",
 CellID->1969679695],
Cell[CellGroupData[{
Cell[15249, 409, 1236, 31, 70, "ExampleSection",ExpressionUUID->"06fc6d0c-5b48-4af0-b4e3-5d37a202c42e",
 CellID->1503243619],
Cell[16488, 442, 388, 10, 70, "ExampleText",ExpressionUUID->"eb2d486a-1986-4d43-a44f-289ef5ea42b9",
 CellTags->"TextAnnotation"],
Cell[CellGroupData[{
Cell[16901, 456, 236, 4, 70, "Input",ExpressionUUID->"fd04eccf-f96a-444e-8e99-b7d5c81dbb81"],
Cell[17140, 462, 9751, 203, 70, "Output",ExpressionUUID->"9c66b1e6-eefd-4930-bf6f-bea4f69c2a1f"]
}, Open  ]],
Cell[CellGroupData[{
Cell[26928, 670, 224, 5, 70, "ExampleDelimiter",ExpressionUUID->"65456c03-4246-4821-b0af-fa1a5282e521"],
Cell[27155, 677, 148, 2, 70, "ExampleText",ExpressionUUID->"8e1a8b1f-7029-43d3-bafc-989193101bce"],
Cell[CellGroupData[{
Cell[27328, 683, 288, 6, 70, "Input",ExpressionUUID->"f1937924-caca-4955-babe-6fc5fca2438a"],
Cell[27619, 691, 229, 3, 70, "Output",ExpressionUUID->"e5a52c3c-8643-499a-936c-0b7ad053f1f4"]
}, Open  ]]
}, Open  ]],
Cell[CellGroupData[{
Cell[27897, 700, 224, 5, 70, "ExampleDelimiter",ExpressionUUID->"8935fadc-e4e2-4623-9134-4b9074f21fa3"],
Cell[28124, 707, 175, 3, 70, "ExampleText",ExpressionUUID->"4f51f98d-7a6e-4e9b-9b55-b6a83cfcf365"],
Cell[CellGroupData[{
Cell[28324, 714, 392, 9, 70, "Input",ExpressionUUID->"34a918ca-8183-4c9c-acfa-29a6228399d0"],
Cell[28719, 725, 229, 3, 70, "Output",ExpressionUUID->"87ec8a19-5a89-480f-b5c5-3ab654dd020a"]
}, Open  ]]
}, Open  ]]
}, Open  ]],
Cell[CellGroupData[{
Cell[29009, 735, 1227, 31, 70, "ExampleSection",ExpressionUUID->"8c980740-b982-44a0-abda-183ede2a9ea4",
 CellID->1293636265],
Cell[30239, 768, 161, 2, 70, "ExampleText",ExpressionUUID->"13f29917-cb25-4d86-9057-6733d2fcfbb9"],
Cell[CellGroupData[{
Cell[30425, 774, 419, 10, 70, "Input",ExpressionUUID->"233a2fb1-3922-4c1e-9e0f-b35bceca62d6"],
Cell[30847, 786, 110, 1, 70, "Output",ExpressionUUID->"e14abdf7-7bcc-4b7e-9a50-25cc688cd50b"]
}, Open  ]],
Cell[CellGroupData[{
Cell[30994, 792, 224, 5, 70, "ExampleDelimiter",ExpressionUUID->"bd46d8fa-fada-435e-849c-06b87633321e"],
Cell[31221, 799, 125, 0, 70, "ExampleText",ExpressionUUID->"e8b08dae-93a7-453b-a8b3-697ea08f83b2"],
Cell[CellGroupData[{
Cell[31371, 803, 452, 11, 70, "Input",ExpressionUUID->"34009ac3-cb2b-4a14-8c83-aabff2a2d175"],
Cell[31826, 816, 413, 8, 70, "Output",ExpressionUUID->"70e22f43-2db2-4092-8a41-af101e67c715"]
}, Open  ]]
}, Open  ]],
Cell[CellGroupData[{
Cell[32288, 830, 224, 5, 70, "ExampleDelimiter",ExpressionUUID->"42357f76-3974-48a3-80ed-c32123c7b5d4"],
Cell[32515, 837, 203, 3, 70, "ExampleText",ExpressionUUID->"00f51f53-19e9-418f-9dd7-1f543b7d3776"],
Cell[CellGroupData[{
Cell[32743, 844, 289, 6, 70, "Input",ExpressionUUID->"390e87a7-593c-4bbe-b342-1c95564535c6"],
Cell[33035, 852, 110, 1, 70, "Output",ExpressionUUID->"aa16228b-dc01-4f8c-96e7-afa778b9290b"]
}, Open  ]]
}, Open  ]]
}, Closed]],
Cell[CellGroupData[{
Cell[33206, 860, 1233, 31, 70, "ExampleSection",ExpressionUUID->"a1051e72-c364-4fd9-aa29-82f4e3c173b5",
 CellID->258228157],
Cell[34442, 893, 168, 3, 70, "ExampleText",ExpressionUUID->"a2204308-a432-4705-9e3b-c5bafbd2488f"],
Cell[CellGroupData[{
Cell[34635, 900, 536, 13, 70, "Input",ExpressionUUID->"34487172-b137-4f20-8b7f-1f1239b7b8a4"],
Cell[35174, 915, 229, 3, 70, "Output",ExpressionUUID->"69876ec7-16fa-47bf-b99d-0b5686a6a6c3"]
}, Open  ]]
}, Closed]],
Cell[CellGroupData[{
Cell[35452, 924, 1244, 31, 70, "ExampleSection",ExpressionUUID->"484dcfe1-ff08-4a93-8379-62e374004256",
 CellID->2123667759],
Cell[36699, 957, 155, 2, 70, "ExampleText",ExpressionUUID->"bcef5264-98d4-4f14-a2e0-0623ba9ef1ad"],
Cell[CellGroupData[{
Cell[36879, 963, 447, 11, 70, "Input",ExpressionUUID->"e4d38096-25be-4671-b465-9b0d906ee643"],
Cell[37329, 976, 110, 1, 70, "Output",ExpressionUUID->"fddcc46a-2818-4505-97b3-1a3f84d7830b"]
}, Open  ]],
Cell[CellGroupData[{
Cell[37476, 982, 224, 5, 70, "ExampleDelimiter",ExpressionUUID->"69667362-6929-403e-8888-fab0ca24abf6"],
Cell[37703, 989, 156, 2, 70, "ExampleText",ExpressionUUID->"a840c4bd-3ef3-4c21-91fc-c8a4498977ad"],
Cell[CellGroupData[{
Cell[37884, 995, 319, 7, 70, "Input",ExpressionUUID->"1fe39d0b-dade-4bcb-b241-a5b89f46bb11"],
Cell[38206, 1004, 108, 1, 70, "Output",ExpressionUUID->"455e8999-7c3a-4b06-9a14-475bf1299de5"]
}, Open  ]]
}, Open  ]]
}, Closed]],
Cell[CellGroupData[{
Cell[38375, 1012, 1237, 31, 70, "ExampleSection",ExpressionUUID->"b2814e3d-9b36-4a11-92bb-dbe916e6d2ac",
 CellID->1305812373],
Cell[39615, 1045, 220, 3, 70, "ExampleText",ExpressionUUID->"931172e7-e3ff-42cb-b852-90ae74ce925b"],
Cell[CellGroupData[{
Cell[39860, 1052, 288, 6, 70, "Input",ExpressionUUID->"e0d2d33d-ddfb-4365-add0-44c694636984"],
Cell[40151, 1060, 229, 3, 70, "Output",ExpressionUUID->"6d266d90-64a0-475c-a3ec-4fd35b3ce77e"]
}, Open  ]]
}, Closed]]
}, Open  ]],
Cell[40419, 1068, 3134, 82, 70, "SeeAlsoSection",ExpressionUUID->"bbba357a-4756-4a9c-b730-fa7568c16ac0"],
Cell[43556, 1152, 700, 19, 70, "MoreAboutSection",ExpressionUUID->"035998f3-54b3-41a0-9057-b82f8a519eaa"],
Cell[44259, 1173, 78, 0, 70, "FooterCell",ExpressionUUID->"708cecc1-eab4-4075-ab90-5eb1a53e4028"]
}
]
*)

(* End of internal cache information *)

