(* 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[     50875,       1333]
NotebookOptionsPosition[     41516,       1161]
NotebookOutlinePosition[     43800,       1213]
CellTagsIndexPosition[     43722,       1208]
WindowTitle->Secp256k1PublicKey
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->
           "fdf8f08c-76aa-45e7-82ff-75445bab3f2a"], 
          TemplateBox[{8},
           "Spacer1"]}]],
         TextAlignment->Center,ExpressionUUID->
         "2182e45f-1e32-4119-9829-20325cf157ac"],
        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->
           "251ba926-6680-41bb-a5b4-2915da69fa38"]
         }],ExpressionUUID->"9466f5e6-c658-4446-8a7a-9c7aea2dc725"],
         StripOnInput->False],{
        StyleBox["\"PrivateKey\"", "SeeAlsoRelated", StripOnInput -> False] :> 
         Documentation`HelpLookup["paclet:ref/PrivateKey"], Delimiter, 
         StyleBox[
          "\"Functions\"", "SeeAlsoSection", FontSize -> 14, FontSlant -> 
           "Italic", StripOnInput -> False] :> 
         NotebookFind[EvaluationNotebook[], "SeeAlsoSection", All, CellStyle],
          StyleBox[
          StyleBox[
           "\"Secp256k1PublicKeyList\"", "SeeAlsoRelated", StripOnInput -> 
            False], "SeeAlsoRelated", StripOnInput -> False] :> 
         Documentation`HelpLookup[
          "paclet:WolframInstitute/Puzzles/ref/Secp256k1PublicKeyList"], 
         StyleBox[
          StyleBox[
           "\"Secp256k1Point\"", "SeeAlsoRelated", StripOnInput -> False], 
           "SeeAlsoRelated", StripOnInput -> False] :> 
         Documentation`HelpLookup[
          "paclet:WolframInstitute/Puzzles/ref/Secp256k1Point"], 
         StyleBox[
          StyleBox[
           "\"Secp256k1PointEncode\"", "SeeAlsoRelated", StripOnInput -> 
            False], "SeeAlsoRelated", StripOnInput -> False] :> 
         Documentation`HelpLookup[
          "paclet:WolframInstitute/Puzzles/ref/Secp256k1PointEncode"], 
         StyleBox[
          StyleBox[
           "\"BitcoinAddress\"", "SeeAlsoRelated", StripOnInput -> False], 
           "SeeAlsoRelated", StripOnInput -> False] :> 
         Documentation`HelpLookup[
          "paclet:WolframInstitute/Puzzles/ref/BitcoinAddress"], 
         StyleBox[
          StyleBox["\"WIFDecode\"", "SeeAlsoRelated", StripOnInput -> False], 
           "SeeAlsoRelated", StripOnInput -> False] :> 
         Documentation`HelpLookup[
          "paclet:WolframInstitute/Puzzles/ref/WIFDecode"]},
        Appearance->None,
        MenuAppearance->Automatic,
        MenuStyle->"SeeAlso"],
       MouseAppearanceTag["LinkHand"]]],
      LineSpacing->{1.4, 0},ExpressionUUID->
      "86150d81-d8b0-42cc-b275-23ad4dca0bd3"],
     "\[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->
           "09b14a17-063e-4a0c-8aef-504ccb520b1d"]
         }],ExpressionUUID->"d69bf541-14fe-42e4-b68b-69633b874650"],
         StripOnInput->False],{
        "\"Derivation\"" :> 
         Documentation`HelpLookup[
          "paclet:WolframInstitute/Puzzles/guide/Derivation"]},
        Appearance->None,
        MenuAppearance->Automatic,
        MenuStyle->"MoreAbout"],
       MouseAppearanceTag["LinkHand"]]],
      LineSpacing->{1.4, 0},ExpressionUUID->
      "c60f7922-2bde-4e94-9d5c-e390fb72cb40"],
     "\[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->
           "f3943526-3f19-4e60-be3a-94091de4885f"]
         }],ExpressionUUID->"f69e92d6-f6eb-4977-8cf8-b44f2d9c5eda"],
         StripOnInput->False],{
        "\"WolframInstitute/Puzzles/ref/Secp256k1PublicKey\"" :> None, 
         "\"Copy Wolfram Documentation Center URL\"" :> 
         CopyToClipboard["WolframInstitute/Puzzles/ref/Secp256k1PublicKey"], 
         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/Secp256k1PublicKey.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/Secp256k1PublicKey" <> ".html"], 
              None}]}]},
        Appearance->None,
        MenuAppearance->Automatic,
        MenuStyle->"URLMenu"],
       MouseAppearanceTag["LinkHand"]]],
      LineSpacing->{1.4, 0},ExpressionUUID->
      "1606361e-2f53-49ab-9b6f-ee7e57c095b7"]
    }], "AnchorBar",
     CacheGraphics->False,ExpressionUUID->
     "13adf167-55d0-441a-94b4-f0b25cd003a1"]}
  }]], "AnchorBarGrid",
 CellID->1,ExpressionUUID->"ef38ea2a-0fa8-4b9e-bb9e-5c11466a2fac"],

Cell["WolframInstitute`Puzzles`", "ContextNameCell",ExpressionUUID->"e6687751-313d-4bbe-9a94-30e36f30c8da"],

Cell[CellGroupData[{

Cell[BoxData[GridBox[{
   {Cell[TextData[{
     Cell[
     "Secp256k1PublicKey", "ObjectName",ExpressionUUID->
      "3b718544-295d-41a9-b2ff-8aa3fa1bfd94"],
     Cell[BoxData[
      TemplateBox[{8},
       "Spacer1"]],ExpressionUUID->"6a1ceb21-e85b-4bb6-9460-5f3bc0e97af0"],
     Cell[BoxData[
     ""], "ObjectNameTranslation",ExpressionUUID->
      "e3bebedd-8be3-4468-b41a-34cc5c7abbae"]
    }],ExpressionUUID->"a4055d54-4ad3-4dd6-b9c1-1dd8bc78bc18"], 
    "\[SpanFromLeft]"}
  }]], "ObjectNameGrid",ExpressionUUID->"d9cbe9df-d3f6-4138-a8ec-\
6d4af0318c67"],

Cell[BoxData[GridBox[{
   {"", Cell[TextData[{
     Cell[BoxData[
      RowBox[{
       TemplateBox[{
         Cell[
          TextData["Secp256k1PublicKey"]], 
         "paclet:WolframInstitute/Puzzles/ref/Secp256k1PublicKey", 
         "WolframInstitute/Puzzles Package Symbol"},
        "PackageLink",
        BaseStyle->"InlineFormula"], "[", 
       StyleBox["key", "TI"], "]"}]], "InlineFormula",
      FontFamily->"Source Sans Pro",
      FontSize->0.9 Inherited,ExpressionUUID->
      "f03f91d4-b5a9-499a-8652-5ce2be955307"],
     "\[LineSeparator]",
     "gives the 33-byte compressed SEC1 public key of a secp256k1 private ",
     StyleBox["key", "TI"],
     ", as a ByteArray."
    }],ExpressionUUID->"1e7af491-70ce-4185-a645-8ea7fbab9ce7"]},
   {"", Cell[TextData[{
     Cell[BoxData[
      RowBox[{
       TemplateBox[{
         Cell[
          TextData["Secp256k1PublicKey"]], 
         "paclet:WolframInstitute/Puzzles/ref/Secp256k1PublicKey", 
         "WolframInstitute/Puzzles Package Symbol"},
        "PackageLink",
        BaseStyle->"InlineFormula"], "[", 
       RowBox[{
        StyleBox["key", "TI"], ",", " ", 
        StyleBox["form", "TI"]}], "]"}]], "InlineFormula",
      FontFamily->"Source Sans Pro",
      FontSize->0.9 Inherited,ExpressionUUID->
      "dd08f8c2-adf4-4571-9363-bf2d3217b393"],
     "\[LineSeparator]",
     "gives the key in ",
     StyleBox["form", "TI"],
     ", either ",
     Cell[BoxData["\"\<Compressed\>\""], "InlineFormula",
      FontFamily->"Source Sans Pro",
      FontSize->0.9 Inherited,ExpressionUUID->
      "05cd27ea-5827-44e6-bb86-fbdb836aacab"],
     " or ",
     Cell[BoxData["\"\<Uncompressed\>\""], "InlineFormula",
      FontFamily->"Source Sans Pro",
      FontSize->0.9 Inherited,ExpressionUUID->
      "d3617bb3-fdc2-461e-b820-9a766765dd0f"],
     "."
    }],ExpressionUUID->"56d41c10-83d8-449e-a4c1-2b6a943c8152"]}
  }]], "Usage",ExpressionUUID->"13220279-5ebc-41dd-b02d-a5736e675063"]
}, 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->"c914560e-a3cf-46e3-bf23-2c0f83a96b82"],
  Cell[BoxData[
   TemplateBox[{1},
    "Spacer1"]],ExpressionUUID->"91fb633d-97c8-4b42-af3b-79ca711346ae"],
  "Details and Options"
 }], "NotesFrameText",ExpressionUUID->
  "2713cc95-f6b9-47a7-a6de-1f20598df4e9"]],ExpressionUUID->"f6139d1d-1060-\
4202-b6ea-fb4327cb04fd"]], "NotesSection",
 ShowGroupOpener->"Thumbnail",
 WholeCellGroupOpener->True,
 CellGroupingRules->{"SectionGrouping", 50},
 CacheGraphics->False,
 CellID->481269209,ExpressionUUID->"991ff7a4-1913-4309-9790-9282db449a1b"],

Cell[TextData[{
 "The private key is an integer ",
 Cell[BoxData[
  StyleBox["d", "TI"]], "InlineFormula",
  FontFamily->"Source Sans Pro",
  FontSize->0.9 Inherited,ExpressionUUID->
  "3340964c-d167-49f7-a3c6-c81c10dc8369"],
 " with ",
 Cell[BoxData[
  RowBox[{"1", "\[LessEqual]", 
   StyleBox["d", "TI"], "<", 
   StyleBox["n", "TI"]}]], "InlineFormula",
  FontFamily->"Source Sans Pro",
  FontSize->0.9 Inherited,ExpressionUUID->
  "c915759c-0a17-415e-9ae6-b6f424138ac2"],
 ", a 32-byte ByteArray, or a 64-digit hexadecimal string, and the public key \
is the curve point ",
 Cell[BoxData[
  StyleBox[
   RowBox[{"d", "G"}], "TI"]], "InlineFormula",
  FontFamily->"Source Sans Pro",
  FontSize->0.9 Inherited,ExpressionUUID->
  "bf13c814-d816-4a54-bd9a-6c560558571c"],
 "."
}], "Notes",ExpressionUUID->"13466130-53b1-4f52-b388-d8e687acf970"],

Cell[TextData[{
 "The compressed form is ",
 Cell[BoxData[
  RowBox[{"0", "x02"}]], "InlineFormula",
  FontFamily->"Source Sans Pro",
  FontSize->0.9 Inherited,ExpressionUUID->
  "b962b75c-60c7-4c41-ac54-2f0acd651b5d"],
 " or ",
 Cell[BoxData[
  RowBox[{"0", "x03"}]], "InlineFormula",
  FontFamily->"Source Sans Pro",
  FontSize->0.9 Inherited,ExpressionUUID->
  "840db927-c74b-42b0-9671-108cc54a17fc"],
 ", for an even or odd ",
 Cell[BoxData[
  StyleBox["y", "TI"]], "InlineFormula",
  FontFamily->"Source Sans Pro",
  FontSize->0.9 Inherited,ExpressionUUID->
  "126a88d0-61f2-4711-8242-c9a0e5107ca4"],
 ", followed by the 32-byte ",
 Cell[BoxData[
  StyleBox["x", "TI"]], "InlineFormula",
  FontFamily->"Source Sans Pro",
  FontSize->0.9 Inherited,ExpressionUUID->
  "f3816480-312d-444b-a17c-c18b425fedb1"],
 " coordinate."
}], "Notes",ExpressionUUID->"e1e615d3-e3b9-4a7e-8311-85d337f55f14"],

Cell[TextData[{
 "The uncompressed form is ",
 Cell[BoxData[
  RowBox[{"0", "x04"}]], "InlineFormula",
  FontFamily->"Source Sans Pro",
  FontSize->0.9 Inherited,ExpressionUUID->
  "f7e6b94e-e545-4e9e-a708-673ed61bca57"],
 " followed by the 32-byte ",
 Cell[BoxData[
  StyleBox["x", "TI"]], "InlineFormula",
  FontFamily->"Source Sans Pro",
  FontSize->0.9 Inherited,ExpressionUUID->
  "33877196-21b4-487b-b3cb-155f408064f8"],
 " and the 32-byte ",
 Cell[BoxData[
  StyleBox["y", "TI"]], "InlineFormula",
  FontFamily->"Source Sans Pro",
  FontSize->0.9 Inherited,ExpressionUUID->
  "fd27d468-ef59-427b-8261-d90d84336856"],
 "."
}], "Notes",ExpressionUUID->"beaf4a80-f4f5-4a25-808b-debf5dfd9ea1"],

Cell[TextData[{
 "The scalar multiplication is done by the Wolfram Language elliptic-curve \
engine, through ",
 Cell[BoxData[
  TemplateBox[{
    Cell[
     TextData["PrivateKey"]], "paclet:ref/PrivateKey"},
   "RefLink",
   BaseStyle->"InlineFormula"]], "InlineFormula",
  FontFamily->"Source Sans Pro",
  FontSize->0.9 Inherited,ExpressionUUID->
  "83e408a5-ae29-41ad-9c02-1e6f0d29d75b"],
 " with a chosen ",
 Cell[BoxData["\<\"PrivateMultiplier\"\>"], "InlineFormula",
  FontFamily->"Source Sans Pro",
  FontSize->0.9 Inherited,ExpressionUUID->
  "53dcebe4-8e0c-4477-99b9-396eebd4d26a"],
 "."
}], "Notes",ExpressionUUID->"71487cff-cbde-4450-9aa3-6f5304190768"],

Cell[TextData[{
 "A key of ",
 Cell[BoxData["0"], "InlineFormula",
  FontFamily->"Source Sans Pro",
  FontSize->0.9 Inherited,ExpressionUUID->
  "7bb9e93e-0cd8-4acc-98b7-296b5d5d4711"],
 ", of ",
 Cell[BoxData[
  StyleBox["n", "TI"]], "InlineFormula",
  FontFamily->"Source Sans Pro",
  FontSize->0.9 Inherited,ExpressionUUID->
  "cd1cb3b5-2a51-40c6-87ed-2ce3e30a1bf8"],
 " or above, or of the wrong length matches no definition and the call is \
returned unevaluated."
}], "Notes",ExpressionUUID->"6ec5c582-2898-4fbd-82ba-3ee6cf9bcc30"],

Cell[TextData[{
 Cell[BoxData[
  TemplateBox[{
    Cell[
     TextData["Secp256k1PublicKeyList"]], 
    "paclet:WolframInstitute/Puzzles/ref/Secp256k1PublicKeyList", 
    "WolframInstitute/Puzzles Package Symbol"},
   "PackageLink",
   BaseStyle->"InlineFormula"]], "InlineFormula",
  FontFamily->"Source Sans Pro",
  FontSize->0.9 Inherited,ExpressionUUID->
  "588c58c0-8fc2-4bb7-b43a-09d40074d10d"],
 " derives many keys at once and is several times faster per key."
}], "Notes",ExpressionUUID->"faa6fb9e-a579-4090-88d4-0fc4b7dbac1f"],

Cell[TextData[{
 Cell[BoxData[
  TemplateBox[{
    Cell[
     TextData["Secp256k1Point"]], 
    "paclet:WolframInstitute/Puzzles/ref/Secp256k1Point", 
    "WolframInstitute/Puzzles Package Symbol"},
   "PackageLink",
   BaseStyle->"InlineFormula"]], "InlineFormula",
  FontFamily->"Source Sans Pro",
  FontSize->0.9 Inherited,ExpressionUUID->
  "eaa85a10-d4be-48b0-a1ca-57bf719a2031"],
 " recovers the coordinate pair from either form."
}], "Notes",ExpressionUUID->"a8e811cd-a9fc-4b56-9bb2-1e45eb3f195a"]
}, Closed]],

Cell["", "PageDelimiter",ExpressionUUID->"d04444dc-5d66-41ab-968c-b483f5c347a8"],

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->"e9d887f4-b9cb-41f0-8502-a8088c6df120"],
 Cell[BoxData[
  TemplateBox[{1},
   "Spacer1"]],ExpressionUUID->"7f7b64d2-1c6d-46ac-915b-faefef58f876"],
 "Examples",
 "\[NonBreakingSpace]\[NonBreakingSpace]",
 Cell["(11)", "ExampleCount",ExpressionUUID->
  "1f73f6df-6a20-4b79-b3e8-1c5d11e9daef"]
}], "PrimaryExamplesSection",
 WholeCellGroupOpener->True,
 CacheGraphics->False,
 CellID->1268181061,ExpressionUUID->"618ca775-e634-491a-8275-ac21d85e238f"],

Cell[BoxData[
 RowBox[{"Needs", "[", "\"\<WolframInstitute`Puzzles`\>\"", "]"}]], "Input", \
"ExampleInitialization",
 CellLabel->"In[1]:=",
 CellID->1969679695,ExpressionUUID->"c28b7a53-5863-431e-83dd-c1fabf6cc741"],

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->
  "bc3f9d7d-e690-4db4-bab1-a6211f3cc72c"],
 Cell[BoxData[
  TemplateBox[{1},
   "Spacer1"]],ExpressionUUID->"fdb137d1-d06d-4987-b23a-488c0f710bbb"],
 "Basic Examples",
 "\[NonBreakingSpace]\[NonBreakingSpace]",
 Cell["(3)", "ExampleCount",ExpressionUUID->
  "8f277cc3-52d3-490a-94e2-bf4353ad21ac"]
}], "ExampleSection", "ExampleSection",
 WholeCellGroupOpener->True,
 CacheGraphics->False,
 CellID->543895752,ExpressionUUID->"3cd95b2a-acba-4d39-b47d-b6a9b0ab7c5b"],

Cell["The public key of the private key 1 is the generator itself:", \
"ExampleText",
 CellTags->
  "TextAnnotation",ExpressionUUID->"c2986312-bde9-430f-8720-6ba64d96829d"],

Cell[CellGroupData[{

Cell[BoxData[
 RowBox[{"Secp256k1PublicKey", "[", "1", "]"}]], "Input",
 CellProlog:>Needs["WolframInstitute`Puzzles`"],
 CellLabel->"In[1]:=",ExpressionUUID->"f8954e12-351e-4104-a5c4-d0dcd6d724b6"],

Cell[BoxData[
 InterpretationBox[
  RowBox[{
   TagBox["ByteArray",
    "SummaryHead"], "[", 
   DynamicModuleBox[{Typeset`open$$ = False, Typeset`embedState$$ = "Ready"}, 
    
    TemplateBox[{
      PaneSelectorBox[{False -> GridBox[{{
            GridBox[{{
               TagBox["\"33 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["\"33 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[{2, 121, 190, 102, 126, 249, 220, 187, 172, 85, 160, 98, 149, 206,
    135, 11, 7, 2, 155, 252, 219, 45, 206, 40, 217, 89, 242, 129, 91, 22, 248,
    23, 152}],
  Editable->False,
  SelectWithContents->True,
  Selectable->False]], "Output",
 CellLabel->"Out[1]= ",ExpressionUUID->"826ceb40-36e8-4813-83ed-846c68cc4686"]
}, Open  ]],

Cell[CellGroupData[{

Cell[BoxData[
 InterpretationBox[Cell[
  "\t", "ExampleDelimiter",ExpressionUUID->
   "5443d608-923b-45cb-9769-9cf3bfef454a"],
  $Line = 0; Null]], "ExampleDelimiter",ExpressionUUID->"68745bc3-b59f-460e-\
9d7e-20829c6fc1f4"],

Cell["\<\
The BIP49 test vector key, as the specification quotes it in hexadecimal:\
\>", "ExampleText",ExpressionUUID->"b6519d1f-57cf-4a11-959b-5ad342e9fb80"],

Cell[CellGroupData[{

Cell[BoxData[
 RowBox[{"ByteListToHexString", "[", 
  RowBox[{"Normal", "[", 
   RowBox[{
   "Secp256k1PublicKey", 
    "[", "\"\<\
c9bdb49cfbaedca21c4b1f3a7803c34636b1d7dc55a717132443fc3f4c5867e8\>\"", "]"}], 
   "]"}], "]"}]], "Input",
 CellProlog:>Needs["WolframInstitute`Puzzles`"],
 CellLabel->"In[1]:=",ExpressionUUID->"17124829-5720-46e2-80c3-bed2aae93e3d"],

Cell[BoxData["\<\"\
03a1af804ac108a8a51782198c2d034b28bf90c8803f5a53f76276fa69a4eae77f\"\>"], \
"Output",
 CellLabel->"Out[1]= ",ExpressionUUID->"9c561791-df22-4b5c-8ef7-04322803c366"]
}, Open  ]]
}, Open  ]],

Cell[CellGroupData[{

Cell[BoxData[
 InterpretationBox[Cell[
  "\t", "ExampleDelimiter",ExpressionUUID->
   "9fbc6a74-1d26-4b33-a249-d4e4955a70e8"],
  $Line = 0; Null]], "ExampleDelimiter",ExpressionUUID->"32190aad-95e1-4b66-\
ab70-cb26d66b9e3e"],

Cell["The uncompressed form of the Bitcoin wiki example key:", "ExampleText",ExpressionUUID->"a9822310-0dbe-40b9-9121-08d8420ffc46"],

Cell[CellGroupData[{

Cell[BoxData[
 RowBox[{"ByteListToHexString", "[", 
  RowBox[{"Normal", "[", 
   RowBox[{"Secp256k1PublicKey", "[", 
    RowBox[{"\"\<\
18e14a7b6a307f426a94f8114701e7c8e774e7f9a47e2c2035db29a206321725\>\"", ",", 
     " ", "\"\<Uncompressed\>\""}], "]"}], "]"}], "]"}]], "Input",
 CellProlog:>Needs["WolframInstitute`Puzzles`"],
 CellLabel->"In[1]:=",ExpressionUUID->"c972124c-fd28-4c2a-adcb-0d523e9e01ba"],

Cell[BoxData["\<\"\
0450863ad64a87ae8a2fe83c1af1a8403cb53f53e486d8511dad8a04887e5b23522cd470243453\
a299fa9e77237716103abc11a1df38855ed6f2ee187e9c582ba6\"\>"], "Output",
 CellLabel->"Out[1]= ",ExpressionUUID->"52788212-1718-4173-b41c-79bfe9cdf795"]
}, 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->
  "a854254c-aee3-41ac-9a5d-1848e628f1f5"],
 Cell[BoxData[
  TemplateBox[{1},
   "Spacer1"]],ExpressionUUID->"5252a158-1ebe-4469-b741-ba0ce80a0b81"],
 "Scope",
 "\[NonBreakingSpace]\[NonBreakingSpace]",
 Cell["(3)", "ExampleCount",ExpressionUUID->
  "0bfd0e0e-ae17-494e-9081-f0dd4b9631e8"]
}], "ExampleSection", "ExampleSection",
 WholeCellGroupOpener->True,
 CacheGraphics->False,
 CellID->1293636265,ExpressionUUID->"b0e5742d-a732-4a78-b070-57dc80c7f382"],

Cell["\<\
A private key given as a ByteArray gives the same public key as its \
hexadecimal spelling:\
\>", "ExampleText",ExpressionUUID->"dd27ac46-a896-43fc-8f42-04636bf5fd82"],

Cell[CellGroupData[{

Cell[BoxData[
 RowBox[{
  RowBox[{"Secp256k1PublicKey", "[", 
   RowBox[{"ByteArray", "[", 
    RowBox[{
    "HexStringToByteList", 
     "[", "\"\<\
c9bdb49cfbaedca21c4b1f3a7803c34636b1d7dc55a717132443fc3f4c5867e8\>\"", "]"}], 
    "]"}], "]"}], " ", "===", " ", 
  RowBox[{
  "Secp256k1PublicKey", 
   "[", "\"\<c9bdb49cfbaedca21c4b1f3a7803c34636b1d7dc55a717132443fc3f4c5867e8\
\>\"", "]"}]}]], "Input",
 CellProlog:>Needs["WolframInstitute`Puzzles`"],
 CellLabel->"In[1]:=",ExpressionUUID->"92a378e7-f57a-4992-86a9-c88bd877c95e"],

Cell[BoxData["True"], "Output",
 CellLabel->"Out[1]= ",ExpressionUUID->"00f02588-5bb1-4ace-9348-501b0a6bdd0d"]
}, Open  ]],

Cell[CellGroupData[{

Cell[BoxData[
 InterpretationBox[Cell[
  "\t", "ExampleDelimiter",ExpressionUUID->
   "5198f2ac-e743-499a-8e59-ec7a03f5b2ab"],
  $Line = 0; Null]], "ExampleDelimiter",ExpressionUUID->"1d3e3a97-c3b5-4ebf-\
9131-eefca60d5659"],

Cell[TextData[{
 "The last valid scalar, ",
 Cell[BoxData[
  RowBox[{
   StyleBox["n", "TI"], "-", "1"}]], "InlineFormula",
  FontFamily->"Source Sans Pro",
  FontSize->0.9 Inherited,ExpressionUUID->
  "0c605133-1674-461a-8ea3-91234f25647e"],
 ", gives the negated generator:"
}], "ExampleText",ExpressionUUID->"e94c25d1-bddc-4c5d-a95e-8b2634bf2c0a"],

Cell[CellGroupData[{

Cell[BoxData[
 RowBox[{"Secp256k1Point", "[", 
  RowBox[{"Secp256k1PublicKey", "[", 
   RowBox[{
    RowBox[{"$Secp256k1", "[", "\"\<Order\>\"", "]"}], " ", "-", " ", "1"}], 
   "]"}], "]"}]], "Input",
 CellProlog:>Needs["WolframInstitute`Puzzles`"],
 CellLabel->"In[1]:=",ExpressionUUID->"76be137e-a4e2-42ae-a305-558a994decd9"],

Cell[BoxData[
 RowBox[{"{", 
  RowBox[{
  "550662630222773436695787188951685343262506034537775941755001873603891167292\
40", ",", 
   "83121579216557378445487899878180864668798711284981320763518679672151497189\
239"}], "}"}]], "Output",
 CellLabel->"Out[1]= ",ExpressionUUID->"abe40345-1da8-4ff0-8cb8-3d89f88bf508"]
}, Open  ]]
}, Open  ]],

Cell[CellGroupData[{

Cell[BoxData[
 InterpretationBox[Cell[
  "\t", "ExampleDelimiter",ExpressionUUID->
   "764bde9a-eb9d-4898-8c63-9f7b71f26e46"],
  $Line = 0; Null]], "ExampleDelimiter",ExpressionUUID->"6e70d0f1-f30a-4747-\
8097-9134da641605"],

Cell["\<\
The scalar 0 is not a private key, so the call is returned unevaluated:\
\>", "ExampleText",ExpressionUUID->"970a3db8-8285-4179-92fe-e6bd703095c3"],

Cell[CellGroupData[{

Cell[BoxData[
 RowBox[{"Secp256k1PublicKey", "[", "0", "]"}]], "Input",
 CellProlog:>Needs["WolframInstitute`Puzzles`"],
 CellLabel->"In[1]:=",ExpressionUUID->"cd9fffb9-f613-4d82-b2e3-d72da5ddfa70"],

Cell[BoxData[
 RowBox[{"Secp256k1PublicKey", "[", "0", "]"}]], "Output",
 CellLabel->"Out[1]= ",ExpressionUUID->"672fbe33-fea4-47f4-bf82-e51627e9602f"]
}, 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->
  "31229316-ea0e-4748-800f-e7a02c84bf28"],
 Cell[BoxData[
  TemplateBox[{1},
   "Spacer1"]],ExpressionUUID->"e244b188-dcc4-4a48-b368-432d864ebd0d"],
 "Applications",
 "\[NonBreakingSpace]\[NonBreakingSpace]",
 Cell["(1)", "ExampleCount",ExpressionUUID->
  "1a5c102e-1e7f-49b3-ab2c-b769bd18d36b"]
}], "ExampleSection", "ExampleSection",
 WholeCellGroupOpener->True,
 CacheGraphics->False,
 CellID->258228157,ExpressionUUID->"6c26a938-cecc-479e-ad43-7d6e3b14a9c2"],

Cell["The compressed key is what an address is built from:", "ExampleText",ExpressionUUID->"cd033d71-8219-40b8-8245-236e0b460950"],

Cell[CellGroupData[{

Cell[BoxData[
 RowBox[{"BitcoinAddress", "[", 
  RowBox[{
   RowBox[{
   "Secp256k1PublicKey", 
    "[", "\"\<\
c9bdb49cfbaedca21c4b1f3a7803c34636b1d7dc55a717132443fc3f4c5867e8\>\"", "]"}], 
   ",", " ", "\"\<P2SH-P2WPKH\>\"", ",", " ", 
   RowBox[{"\"\<Network\>\"", " ", "->", " ", "\"\<Testnet\>\""}]}], 
  "]"}]], "Input",
 CellProlog:>Needs["WolframInstitute`Puzzles`"],
 CellLabel->"In[1]:=",ExpressionUUID->"402fe260-2c97-4b71-acdd-15b187e56c33"],

Cell[BoxData["\<\"2Mww8dCYPUpKHofjgcXcBCEGmniw9CoaiD2\"\>"], "Output",
 CellLabel->"Out[1]= ",ExpressionUUID->"ae4785c7-2364-49c0-ac11-176d1357d66f"]
}, 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->
  "3426838e-5d11-452c-ae44-decfec615ff3"],
 Cell[BoxData[
  TemplateBox[{1},
   "Spacer1"]],ExpressionUUID->"5fa55e16-b3fd-4f6e-9876-6b7dc0181573"],
 "Properties & Relations",
 "\[NonBreakingSpace]\[NonBreakingSpace]",
 Cell["(2)", "ExampleCount",ExpressionUUID->
  "91e8e95c-dfa8-4a37-bd3c-d9733514985e"]
}], "ExampleSection", "ExampleSection",
 WholeCellGroupOpener->True,
 CacheGraphics->False,
 CellID->2123667759,ExpressionUUID->"2dfc0e4e-d777-4ec7-bed9-8e04c6fc7bf4"],

Cell["Both forms encode the same curve point:", "ExampleText",ExpressionUUID->"42709a89-b06b-474d-acab-575dc1eee2c3"],

Cell[CellGroupData[{

Cell[BoxData[
 RowBox[{
  RowBox[{"Secp256k1Point", "[", 
   RowBox[{"Secp256k1PublicKey", "[", "7", "]"}], "]"}], " ", "===", " ", 
  RowBox[{"Secp256k1Point", "[", 
   RowBox[{"Secp256k1PublicKey", "[", 
    RowBox[{"7", ",", " ", "\"\<Uncompressed\>\""}], "]"}], "]"}]}]], "Input",\

 CellProlog:>Needs["WolframInstitute`Puzzles`"],
 CellLabel->"In[1]:=",ExpressionUUID->"e3231af5-a58e-4493-a5ba-baf130c35144"],

Cell[BoxData["True"], "Output",
 CellLabel->"Out[1]= ",ExpressionUUID->"8ee96041-9f91-4873-b2a6-3a1b1b62958e"]
}, Open  ]],

Cell[CellGroupData[{

Cell[BoxData[
 InterpretationBox[Cell[
  "\t", "ExampleDelimiter",ExpressionUUID->
   "ec158284-019d-4a96-9984-058fa95a2873"],
  $Line = 0; Null]], "ExampleDelimiter",ExpressionUUID->"d5d6341e-f15a-4e7f-\
9356-e531e3829742"],

Cell[TextData[{
 "Scalar multiplication is a group homomorphism, so the keys of ",
 Cell[BoxData[
  StyleBox["i", "TI"]], "InlineFormula",
  FontFamily->"Source Sans Pro",
  FontSize->0.9 Inherited,ExpressionUUID->
  "0c5e9e5a-827f-4089-90f5-8a4dc9c21103"],
 " and ",
 Cell[BoxData[
  StyleBox["j", "TI"]], "InlineFormula",
  FontFamily->"Source Sans Pro",
  FontSize->0.9 Inherited,ExpressionUUID->
  "d5190572-526a-43e1-8e43-e553d60ae8b4"],
 " add to the key of ",
 Cell[BoxData[
  RowBox[{
   StyleBox["i", "TI"], "+", 
   StyleBox["j", "TI"]}]], "InlineFormula",
  FontFamily->"Source Sans Pro",
  FontSize->0.9 Inherited,ExpressionUUID->
  "65bd633a-49bf-4a18-95bb-7d44dfebdd89"],
 ":"
}], "ExampleText",ExpressionUUID->"cd8f0e63-47bd-4392-9c92-78014442dc73"],

Cell[CellGroupData[{

Cell[BoxData[
 RowBox[{
  RowBox[{"Secp256k1PointAdd", "[", 
   RowBox[{
    RowBox[{"Secp256k1Point", "[", 
     RowBox[{"Secp256k1PublicKey", "[", "3", "]"}], "]"}], ",", " ", 
    RowBox[{"Secp256k1Point", "[", 
     RowBox[{"Secp256k1PublicKey", "[", "4", "]"}], "]"}]}], "]"}], " ", "===",
   " ", 
  RowBox[{"Secp256k1Point", "[", 
   RowBox[{"Secp256k1PublicKey", "[", "7", "]"}], "]"}]}]], "Input",
 CellProlog:>Needs["WolframInstitute`Puzzles`"],
 CellLabel->"In[1]:=",ExpressionUUID->"56d59d3a-f86c-4ffa-ab37-7031f8056ad5"],

Cell[BoxData["True"], "Output",
 CellLabel->"Out[1]= ",ExpressionUUID->"2d7d9787-3554-4b49-b314-456110f573cd"]
}, 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->
  "2e4a487f-9ead-4558-97c9-2997e16812fc"],
 Cell[BoxData[
  TemplateBox[{1},
   "Spacer1"]],ExpressionUUID->"2f6436eb-f736-4f73-abac-2d88b88344b1"],
 "Possible Issues",
 "\[NonBreakingSpace]\[NonBreakingSpace]",
 Cell["(2)", "ExampleCount",ExpressionUUID->
  "e23e13d2-2cd8-4d61-88d4-9e5c187b7059"]
}], "ExampleSection", "ExampleSection",
 WholeCellGroupOpener->True,
 CacheGraphics->False,
 CellID->1305812373,ExpressionUUID->"4fb3fe5f-3e06-497b-a202-0a9a7fa37dea"],

Cell["\<\
The compressed and uncompressed forms of one key hash differently, so they \
give different addresses; this is why a recovered key must carry its \
compression flag:\
\>", "ExampleText",ExpressionUUID->"1890f1ba-a85b-4dcc-9dc0-dcfc5e14d409"],

Cell[CellGroupData[{

Cell[BoxData[
 RowBox[{"{", 
  RowBox[{
   RowBox[{"BitcoinAddress", "[", 
    RowBox[{
     RowBox[{"Secp256k1PublicKey", "[", "1", "]"}], ",", 
     " ", "\"\<P2PKH\>\""}], "]"}], ",", " ", 
   RowBox[{"BitcoinAddress", "[", 
    RowBox[{
     RowBox[{"Secp256k1PublicKey", "[", 
      RowBox[{"1", ",", " ", "\"\<Uncompressed\>\""}], "]"}], ",", 
     " ", "\"\<P2PKH\>\""}], "]"}]}], "}"}]], "Input",
 CellProlog:>Needs["WolframInstitute`Puzzles`"],
 CellLabel->"In[1]:=",ExpressionUUID->"be0b12d7-7b84-4e20-9daf-d80b8edb6cfb"],

Cell[BoxData[
 RowBox[{"{", 
  RowBox[{"\<\"1BgGZ9tcN4rm9KBzDn7KprQz87SZ26SAMH\"\>", 
   ",", "\<\"1EHNa6Q4Jz2uvNExL497mE43ikXhwF6kZm\"\>"}], "}"}]], "Output",
 CellLabel->"Out[1]= ",ExpressionUUID->"c494f68a-62c9-422f-b083-c3c0bde59f93"]
}, Open  ]],

Cell[CellGroupData[{

Cell[BoxData[
 InterpretationBox[Cell[
  "\t", "ExampleDelimiter",ExpressionUUID->
   "e21dbe59-582e-4cf7-9c92-da1fdb86c6b6"],
  $Line = 0; Null]], "ExampleDelimiter",ExpressionUUID->"6a56ed7f-1440-441c-\
a9cc-c3d097164008"],

Cell["\<\
An integer at or above the group order is not a scalar of the group, so the \
call is returned unevaluated:\
\>", "ExampleText",ExpressionUUID->"ea0818d7-52ea-4b45-a62e-4fc75e4762a8"],

Cell[CellGroupData[{

Cell[BoxData[
 RowBox[{"Secp256k1PublicKey", "[", 
  RowBox[{"$Secp256k1", "[", "\"\<Order\>\"", "]"}], "]"}]], "Input",
 CellProlog:>Needs["WolframInstitute`Puzzles`"],
 CellLabel->"In[1]:=",ExpressionUUID->"8baee2b3-c820-4996-bb9c-c8f7de56b6b1"],

Cell[BoxData[
 RowBox[{"Secp256k1PublicKey", "[", 
  "115792089237316195423570985008687907852837564279074904382605163141518161494\
337", "]"}]], "Output",
 CellLabel->"Out[1]= ",ExpressionUUID->"53c388e2-25aa-4051-ab62-41424ff11cc4"]
}, Open  ]]
}, 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["Secp256k1PublicKeyList"]], 
           "paclet:WolframInstitute/Puzzles/ref/Secp256k1PublicKeyList", 
           "WolframInstitute/Puzzles Package Symbol"},
          "PackageLink",
          BaseStyle->"InlineFormula"]], "InlineFormula",
         FontFamily->"Source Sans Pro",ExpressionUUID->
         "912d01f4-3d0a-4c37-8999-cb68554634f9"],
        "\[NonBreakingSpace]",
        StyleBox[
        "\[MediumSpace]\[FilledVerySmallSquare]\[MediumSpace]", 
         "InlineSeparator"],
        " ",
        Cell[BoxData[
         TemplateBox[{
           Cell[
            TextData["Secp256k1Point"]], 
           "paclet:WolframInstitute/Puzzles/ref/Secp256k1Point", 
           "WolframInstitute/Puzzles Package Symbol"},
          "PackageLink",
          BaseStyle->"InlineFormula"]], "InlineFormula",
         FontFamily->"Source Sans Pro",ExpressionUUID->
         "f66f8eb9-b56c-44ce-9b58-cc24c4727971"],
        "\[NonBreakingSpace]",
        StyleBox[
        "\[MediumSpace]\[FilledVerySmallSquare]\[MediumSpace]", 
         "InlineSeparator"],
        " ",
        Cell[BoxData[
         TemplateBox[{
           Cell[
            TextData["Secp256k1PointEncode"]], 
           "paclet:WolframInstitute/Puzzles/ref/Secp256k1PointEncode", 
           "WolframInstitute/Puzzles Package Symbol"},
          "PackageLink",
          BaseStyle->"InlineFormula"]], "InlineFormula",
         FontFamily->"Source Sans Pro",ExpressionUUID->
         "07abc47c-5f53-4368-8554-22ced7756c8f"],
        "\[NonBreakingSpace]",
        StyleBox[
        "\[MediumSpace]\[FilledVerySmallSquare]\[MediumSpace]", 
         "InlineSeparator"],
        " ",
        Cell[BoxData[
         TemplateBox[{
           Cell[
            TextData["BitcoinAddress"]], 
           "paclet:WolframInstitute/Puzzles/ref/BitcoinAddress", 
           "WolframInstitute/Puzzles Package Symbol"},
          "PackageLink",
          BaseStyle->"InlineFormula"]], "InlineFormula",
         FontFamily->"Source Sans Pro",ExpressionUUID->
         "3af23cdc-5b33-4043-bc5f-f8efb09b6427"],
        "\[NonBreakingSpace]",
        StyleBox[
        "\[MediumSpace]\[FilledVerySmallSquare]\[MediumSpace]", 
         "InlineSeparator"],
        " ",
        Cell[BoxData[
         TemplateBox[{
           Cell[
            TextData["WIFDecode"]], 
           "paclet:WolframInstitute/Puzzles/ref/WIFDecode", 
           "WolframInstitute/Puzzles Package Symbol"},
          "PackageLink",
          BaseStyle->"InlineFormula"]], "InlineFormula",
         FontFamily->"Source Sans Pro",ExpressionUUID->
         "4fdf1d44-a6cb-4df6-afe0-6cee39ac6ff4"],
        "\[NonBreakingSpace]",
        StyleBox[
        "\[MediumSpace]\[FilledVerySmallSquare]\[MediumSpace]", 
         "InlineSeparator"],
        " ",
        Cell[BoxData[
         TemplateBox[{
           Cell[
            TextData["PrivateKey"]], "paclet:ref/PrivateKey"},
          "RefLink",
          BaseStyle->"InlineFormula"]], "InlineFormula",
         FontFamily->"Source Sans Pro",ExpressionUUID->
         "a21aab5e-a885-41ba-9ed9-57e742641878"]
       }], "SeeAlso",ExpressionUUID->"a9f0fc5b-9a6e-4fbd-8442-61d7aa17ab5d"]}
     }]}
  }]], "SeeAlsoSection",ExpressionUUID->"dcde50c6-dae1-4a98-a0cd-\
eb6b2f179cc1"],

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->
         "c7fed5c9-b6eb-4a8d-a51f-59ab8daf0a66"]}]}
     }]}
  }]], "MoreAboutSection",ExpressionUUID->"ed688101-458b-4257-ba6e-\
f34f41078070"],

Cell[" ", "FooterCell",ExpressionUUID->"22a61914-b2f1-410f-870a-e8556f6fb1b6"]
},
Saveable->False,
ScreenStyleEnvironment->"Working",
WindowSize->{900, 830},
WindowMargins->{{0, Automatic}, {Automatic, 0}},
WindowTitle->"Secp256k1PublicKey",
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, 47.188924}", 
    "history" -> {"XX", "", "", ""}, "context" -> "WolframInstitute`Puzzles`",
     "keywords" -> {}, "specialkeywords" -> {}, 
    "tutorialcollectionlinks" -> {}, "index" -> True, "label" -> 
    "Wolfram Institute/ Puzzles Symbol", "language" -> "en", "paclet" -> 
    "WolframInstitute/Puzzles", "status" -> "None", "summary" -> 
    "PackageLink[Secp256k1PublicKey, paclet : \
WolframInstitute/Puzzles/ref/Secp256k1PublicKey, WolframInstitute/Puzzles \
Package Symbol][key] gives the 33-byte compressed SEC1 public key of a \
secp256k1 private key, as a ByteArray. PackageLink[Secp256k1PublicKey, paclet \
: WolframInstitute/Puzzles/ref/Secp256k1PublicKey, WolframInstitute/Puzzles \
Package Symbol][key, form] gives the key in form, either Compressed or \
Uncompressed.", "synonyms" -> {}, "tabletags" -> {}, "title" -> 
    "Secp256k1PublicKey", "titlemodifier" -> "", "metadescription" -> "", 
    "windowtitle" -> "Secp256k1PublicKey", "type" -> "Symbol", "uri" -> 
    "WolframInstitute/Puzzles/ref/Secp256k1PublicKey", "WorkflowDockedCell" -> 
    ""}, "SearchTextTranslated" -> ""},
CellContext->CellGroup,
FrontEndVersion->"15.0 for Mac OS X ARM (64-bit) (May 19, 2026)",
StyleDefinitions->FrontEnd`FileName[{"Wolfram"}, "Reference.nb"],
ExpressionUUID->"7e688fec-69af-47a0-95a6-7c530d91322b"
]
(* End of Notebook Content *)

(* Internal cache information *)
(*CellTagsOutline
CellTagsIndex->{
 "TextAnnotation"->{
  Cell[19022, 520, 172, 3, 70, "ExampleText",ExpressionUUID->"c2986312-bde9-430f-8720-6ba64d96829d",
   CellTags->"TextAnnotation"]}
 }
*)
(*CellTagsIndex
CellTagsIndex->{
 {"TextAnnotation", 43565, 1202}
 }
*)
(*NotebookFileOutline
Notebook[{
Cell[586, 21, 6594, 158, 70, "AnchorBarGrid",ExpressionUUID->"ef38ea2a-0fa8-4b9e-bb9e-5c11466a2fac",
 CellID->1],
Cell[7183, 181, 107, 0, 70, "ContextNameCell",ExpressionUUID->"e6687751-313d-4bbe-9a94-30e36f30c8da"],
Cell[CellGroupData[{
Cell[7315, 185, 561, 14, 70, "ObjectNameGrid",ExpressionUUID->"d9cbe9df-d3f6-4138-a8ec-6d4af0318c67"],
Cell[7879, 201, 1961, 51, 70, "Usage",ExpressionUUID->"13220279-5ebc-41dd-b02d-a5736e675063"]
}, Open  ]],
Cell[CellGroupData[{
Cell[9877, 257, 1443, 34, 70, "NotesSection",ExpressionUUID->"991ff7a4-1913-4309-9790-9282db449a1b",
 CellGroupingRules->{"SectionGrouping", 50},
 CellID->481269209],
Cell[11323, 293, 845, 24, 70, "Notes",ExpressionUUID->"13466130-53b1-4f52-b388-d8e687acf970"],
Cell[12171, 319, 895, 26, 70, "Notes",ExpressionUUID->"e1e615d3-e3b9-4a7e-8311-85d337f55f14"],
Cell[13069, 347, 696, 20, 70, "Notes",ExpressionUUID->"beaf4a80-f4f5-4a25-808b-debf5dfd9ea1"],
Cell[13768, 369, 664, 18, 70, "Notes",ExpressionUUID->"71487cff-cbde-4450-9aa3-6f5304190768"],
Cell[14435, 389, 537, 14, 70, "Notes",ExpressionUUID->"6ec5c582-2898-4fbd-82ba-3ee6cf9bcc30"],
Cell[14975, 405, 536, 13, 70, "Notes",ExpressionUUID->"faa6fb9e-a579-4090-88d4-0fc4b7dbac1f"],
Cell[15514, 420, 504, 13, 70, "Notes",ExpressionUUID->"a8e811cd-a9fc-4b56-9bb2-1e45eb3f195a"]
}, Closed]],
Cell[16033, 436, 80, 0, 70, "PageDelimiter",ExpressionUUID->"d04444dc-5d66-41ab-968c-b483f5c347a8"],
Cell[CellGroupData[{
Cell[16138, 440, 1402, 37, 70, "PrimaryExamplesSection",ExpressionUUID->"618ca775-e634-491a-8275-ac21d85e238f",
 CellID->1268181061],
Cell[17543, 479, 216, 4, 70, "Input",ExpressionUUID->"c28b7a53-5863-431e-83dd-c1fabf6cc741",
 CellID->1969679695],
Cell[CellGroupData[{
Cell[17784, 487, 1235, 31, 70, "ExampleSection",ExpressionUUID->"3cd95b2a-acba-4d39-b47d-b6a9b0ab7c5b",
 CellID->543895752],
Cell[19022, 520, 172, 3, 70, "ExampleText",ExpressionUUID->"c2986312-bde9-430f-8720-6ba64d96829d",
 CellTags->"TextAnnotation"],
Cell[CellGroupData[{
Cell[19219, 527, 198, 3, 70, "Input",ExpressionUUID->"f8954e12-351e-4104-a5c4-d0dcd6d724b6"],
Cell[19420, 532, 2288, 48, 70, "Output",ExpressionUUID->"826ceb40-36e8-4813-83ed-846c68cc4686"]
}, Open  ]],
Cell[CellGroupData[{
Cell[21745, 585, 224, 5, 70, "ExampleDelimiter",ExpressionUUID->"68745bc3-b59f-460e-9d7e-20829c6fc1f4"],
Cell[21972, 592, 159, 2, 70, "ExampleText",ExpressionUUID->"b6519d1f-57cf-4a11-959b-5ad342e9fb80"],
Cell[CellGroupData[{
Cell[22156, 598, 364, 9, 70, "Input",ExpressionUUID->"17124829-5720-46e2-80c3-bed2aae93e3d"],
Cell[22523, 609, 184, 3, 70, "Output",ExpressionUUID->"9c561791-df22-4b5c-8ef7-04322803c366"]
}, Open  ]]
}, Open  ]],
Cell[CellGroupData[{
Cell[22756, 618, 224, 5, 70, "ExampleDelimiter",ExpressionUUID->"32190aad-95e1-4b66-ab70-cb26d66b9e3e"],
Cell[22983, 625, 132, 0, 70, "ExampleText",ExpressionUUID->"a9822310-0dbe-40b9-9121-08d8420ffc46"],
Cell[CellGroupData[{
Cell[23140, 629, 406, 8, 70, "Input",ExpressionUUID->"c972124c-fd28-4c2a-adcb-0d523e9e01ba"],
Cell[23549, 639, 248, 3, 70, "Output",ExpressionUUID->"52788212-1718-4173-b41c-79bfe9cdf795"]
}, Open  ]]
}, Open  ]]
}, Open  ]],
Cell[CellGroupData[{
Cell[23858, 649, 1227, 31, 70, "ExampleSection",ExpressionUUID->"b0e5742d-a732-4a78-b070-57dc80c7f382",
 CellID->1293636265],
Cell[25088, 682, 177, 3, 70, "ExampleText",ExpressionUUID->"dd27ac46-a896-43fc-8f42-04636bf5fd82"],
Cell[CellGroupData[{
Cell[25290, 689, 532, 14, 70, "Input",ExpressionUUID->"92a378e7-f57a-4992-86a9-c88bd877c95e"],
Cell[25825, 705, 110, 1, 70, "Output",ExpressionUUID->"00f02588-5bb1-4ace-9348-501b0a6bdd0d"]
}, Open  ]],
Cell[CellGroupData[{
Cell[25972, 711, 224, 5, 70, "ExampleDelimiter",ExpressionUUID->"1d3e3a97-c3b5-4ebf-9131-eefca60d5659"],
Cell[26199, 718, 350, 9, 70, "ExampleText",ExpressionUUID->"e94c25d1-bddc-4c5d-a95e-8b2634bf2c0a"],
Cell[CellGroupData[{
Cell[26574, 731, 328, 7, 70, "Input",ExpressionUUID->"76be137e-a4e2-42ae-a305-558a994decd9"],
Cell[26905, 740, 315, 7, 70, "Output",ExpressionUUID->"abe40345-1da8-4ff0-8cb8-3d89f88bf508"]
}, Open  ]]
}, Open  ]],
Cell[CellGroupData[{
Cell[27269, 753, 224, 5, 70, "ExampleDelimiter",ExpressionUUID->"6e70d0f1-f30a-4747-8097-9134da641605"],
Cell[27496, 760, 157, 2, 70, "ExampleText",ExpressionUUID->"970a3db8-8285-4179-92fe-e6bd703095c3"],
Cell[CellGroupData[{
Cell[27678, 766, 198, 3, 70, "Input",ExpressionUUID->"cd9fffb9-f613-4d82-b2e3-d72da5ddfa70"],
Cell[27879, 771, 151, 2, 70, "Output",ExpressionUUID->"672fbe33-fea4-47f4-bf82-e51627e9602f"]
}, Open  ]]
}, Open  ]]
}, Closed]],
Cell[CellGroupData[{
Cell[28091, 780, 1233, 31, 70, "ExampleSection",ExpressionUUID->"6c26a938-cecc-479e-ad43-7d6e3b14a9c2",
 CellID->258228157],
Cell[29327, 813, 130, 0, 70, "ExampleText",ExpressionUUID->"cd033d71-8219-40b8-8245-236e0b460950"],
Cell[CellGroupData[{
Cell[29482, 817, 453, 11, 70, "Input",ExpressionUUID->"402fe260-2c97-4b71-acdd-15b187e56c33"],
Cell[29938, 830, 149, 1, 70, "Output",ExpressionUUID->"ae4785c7-2364-49c0-ac11-176d1357d66f"]
}, Open  ]]
}, Closed]],
Cell[CellGroupData[{
Cell[30136, 837, 1244, 31, 70, "ExampleSection",ExpressionUUID->"2dfc0e4e-d777-4ec7-bed9-8e04c6fc7bf4",
 CellID->2123667759],
Cell[31383, 870, 117, 0, 70, "ExampleText",ExpressionUUID->"42709a89-b06b-474d-acab-575dc1eee2c3"],
Cell[CellGroupData[{
Cell[31525, 874, 413, 9, 70, "Input",ExpressionUUID->"e3231af5-a58e-4493-a5ba-baf130c35144"],
Cell[31941, 885, 110, 1, 70, "Output",ExpressionUUID->"8ee96041-9f91-4873-b2a6-3a1b1b62958e"]
}, Open  ]],
Cell[CellGroupData[{
Cell[32088, 891, 224, 5, 70, "ExampleDelimiter",ExpressionUUID->"d5d6341e-f15a-4e7f-9356-e531e3829742"],
Cell[32315, 898, 764, 22, 70, "ExampleText",ExpressionUUID->"cd8f0e63-47bd-4392-9c92-78014442dc73"],
Cell[CellGroupData[{
Cell[33104, 924, 533, 12, 70, "Input",ExpressionUUID->"56d59d3a-f86c-4ffa-ab37-7031f8056ad5"],
Cell[33640, 938, 110, 1, 70, "Output",ExpressionUUID->"2d7d9787-3554-4b49-b314-456110f573cd"]
}, Open  ]]
}, Open  ]]
}, Closed]],
Cell[CellGroupData[{
Cell[33811, 946, 1237, 31, 70, "ExampleSection",ExpressionUUID->"4fb3fe5f-3e06-497b-a202-0a9a7fa37dea",
 CellID->1305812373],
Cell[35051, 979, 251, 4, 70, "ExampleText",ExpressionUUID->"1890f1ba-a85b-4dcc-9dc0-dcfc5e14d409"],
Cell[CellGroupData[{
Cell[35327, 987, 531, 13, 70, "Input",ExpressionUUID->"be0b12d7-7b84-4e20-9daf-d80b8edb6cfb"],
Cell[35861, 1002, 238, 4, 70, "Output",ExpressionUUID->"c494f68a-62c9-422f-b083-c3c0bde59f93"]
}, Open  ]],
Cell[CellGroupData[{
Cell[36136, 1011, 224, 5, 70, "ExampleDelimiter",ExpressionUUID->"6a56ed7f-1440-441c-a9cc-c3d097164008"],
Cell[36363, 1018, 193, 3, 70, "ExampleText",ExpressionUUID->"ea0818d7-52ea-4b45-a62e-4fc75e4762a8"],
Cell[CellGroupData[{
Cell[36581, 1025, 247, 4, 70, "Input",ExpressionUUID->"8baee2b3-c820-4996-bb9c-c8f7de56b6b1"],
Cell[36831, 1031, 233, 4, 70, "Output",ExpressionUUID->"53c388e2-25aa-4051-ab62-41424ff11cc4"]
}, Open  ]]
}, Open  ]]
}, Closed]]
}, Open  ]],
Cell[37115, 1041, 3613, 95, 70, "SeeAlsoSection",ExpressionUUID->"dcde50c6-dae1-4a98-a0cd-eb6b2f179cc1"],
Cell[40731, 1138, 700, 19, 70, "MoreAboutSection",ExpressionUUID->"ed688101-458b-4257-ba6e-f34f41078070"],
Cell[41434, 1159, 78, 0, 70, "FooterCell",ExpressionUUID->"22a61914-b2f1-410f-870a-e8556f6fb1b6"]
}
]
*)

(* End of internal cache information *)

