(* 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[     25038,        639]
NotebookOptionsPosition[     20537,        556]
NotebookOutlinePosition[     22652,        602]
CellTagsIndexPosition[     22609,        599]
WindowTitle->HillCipher
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->
           "719d4777-b650-4558-a2ba-4313e40c074a"], 
          TemplateBox[{8},
           "Spacer1"]}]],
         TextAlignment->Center,ExpressionUUID->
         "39a589a2-354e-4ea0-9ad3-0d9302af8101"],
        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->
           "58e8ba16-fe32-40b2-9fe1-6fbd81006fbc"]
         }],ExpressionUUID->"1f8379bf-c7ee-44e4-aeac-b7d0f1b673d4"],
         StripOnInput->False],{
        StyleBox[
          "\"HillCipherInvertibleQ\"", "SeeAlsoRelated", StripOnInput -> 
           False] :> Documentation`HelpLookup[
          "paclet:WolframInstitute/Puzzles/ref/HillCipherInvertibleQ"], 
         StyleBox[
          "\"HillCipherSolve\"", "SeeAlsoRelated", StripOnInput -> False] :> 
         Documentation`HelpLookup[
          "paclet:WolframInstitute/Puzzles/ref/HillCipherSolve"], 
         StyleBox[
          "\"VigenereCipher\"", "SeeAlsoRelated", StripOnInput -> False] :> 
         Documentation`HelpLookup[
          "paclet:WolframInstitute/Puzzles/ref/VigenereCipher"], 
         StyleBox[
          "\"KeyedAlphabet\"", "SeeAlsoRelated", StripOnInput -> False] :> 
         Documentation`HelpLookup[
          "paclet:WolframInstitute/Puzzles/ref/KeyedAlphabet"]},
        Appearance->None,
        MenuAppearance->Automatic,
        MenuStyle->"SeeAlso"],
       MouseAppearanceTag["LinkHand"]]],
      LineSpacing->{1.4, 0},ExpressionUUID->
      "13739fa8-697e-4ba6-b194-435866bbccef"],
     "\[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->
           "1c65402a-dbd5-40b8-901e-cfb09cd3f649"]
         }],ExpressionUUID->"b6522d9e-704c-4d9c-80e4-744c8d44f2f9"],
         StripOnInput->False],{
        "\"Encodings\"" :> 
         Documentation`HelpLookup[
          "paclet:WolframInstitute/Puzzles/guide/Encodings"]},
        Appearance->None,
        MenuAppearance->Automatic,
        MenuStyle->"MoreAbout"],
       MouseAppearanceTag["LinkHand"]]],
      LineSpacing->{1.4, 0},ExpressionUUID->
      "fa95ae96-bd55-470f-b97a-3d01cf51c193"],
     "\[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->
           "5fce89f7-3b6f-4f20-8aab-343b0ad74275"]
         }],ExpressionUUID->"dccd14c5-c54a-4f34-b7fa-d3ae5f84930f"],
         StripOnInput->False],{
        "\"WolframInstitute/Puzzles/ref/HillCipher\"" :> None, 
         "\"Copy Wolfram Documentation Center URL\"" :> 
         CopyToClipboard["WolframInstitute/Puzzles/ref/HillCipher"], 
         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/HillCipher.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/HillCipher" <> ".html"], 
              None}]}]},
        Appearance->None,
        MenuAppearance->Automatic,
        MenuStyle->"URLMenu"],
       MouseAppearanceTag["LinkHand"]]],
      LineSpacing->{1.4, 0},ExpressionUUID->
      "3635770f-0454-44ec-92b0-9064bcd14d1c"]
    }], "AnchorBar",
     CacheGraphics->False,ExpressionUUID->
     "1e959ef0-9722-4fca-a94a-862343948abc"]}
  }]], "AnchorBarGrid",
 CellID->1,ExpressionUUID->"96656204-4cf7-47c1-8db9-f20cea1b5fe0"],

Cell["WolframInstitute`Puzzles`", "ContextNameCell",ExpressionUUID->"2912d3f5-2f64-4dcb-9c8b-824609aa1186"],

Cell[CellGroupData[{

Cell[BoxData[GridBox[{
   {Cell[TextData[{
     Cell[
     "HillCipher", "ObjectName",ExpressionUUID->
      "323a0700-9e68-4b39-9b5a-2e6c7e50f38a"],
     Cell[BoxData[
      TemplateBox[{8},
       "Spacer1"]],ExpressionUUID->"017dc53b-da33-4b41-9f2f-59b7c874ec48"],
     Cell[BoxData[
     ""], "ObjectNameTranslation",ExpressionUUID->
      "8d4b9a33-6b1c-4533-b454-5921bdc293c2"]
    }],ExpressionUUID->"064ee0fb-7761-4a18-9da7-1df425955bc6"], 
    "\[SpanFromLeft]"}
  }]], "ObjectNameGrid",ExpressionUUID->"ce330054-3b85-481f-a610-\
d13ccc87ecfb"],

Cell[BoxData[GridBox[{
   {"", Cell[TextData[{
     Cell[BoxData[
      RowBox[{
       TemplateBox[{
         Cell[
          TextData["HillCipher"]], 
         "paclet:WolframInstitute/Puzzles/ref/HillCipher", 
         "WolframInstitute/Puzzles Package Symbol"},
        "PackageLink",
        BaseStyle->"InlineFormula"], "[", 
       RowBox[{
        StyleBox["text", "TI"], ",", " ", 
        StyleBox["matrix", "TI"]}], "]"}]], "InlineFormula",
      FontFamily->"Source Sans Pro",
      FontSize->0.9 Inherited,ExpressionUUID->
      "5f5b844e-47ab-4c00-ab95-a4f0afffc99f"],
     "\[LineSeparator]",
     "enciphers text with the Hill cipher: each block of ",
     Cell[BoxData[
      RowBox[{"Length", "[", "matrix", "]"}]], "InlineFormula",
      FontFamily->"Source Sans Pro",
      FontSize->0.9 Inherited,ExpressionUUID->
      "39fb1e40-8bb4-4538-a4b6-5eaebcd2427c"],
     " letters is read as a vector of letter indices and multiplied, modulo \
26, by the integer key matrix."
    }],ExpressionUUID->"c1981c49-8912-4737-935a-eda8bfb94c82"]},
   {"", Cell[TextData[{
     Cell[BoxData[
      RowBox[{
       TemplateBox[{
         Cell[
          TextData["HillCipher"]], 
         "paclet:WolframInstitute/Puzzles/ref/HillCipher", 
         "WolframInstitute/Puzzles Package Symbol"},
        "PackageLink",
        BaseStyle->"InlineFormula"], "[", 
       RowBox[{
        StyleBox["text", "TI"], ",", " ", 
        StyleBox["matrix", "TI"], ",", " ", "\"\<Decrypt\>\""}], "]"}]], 
      "InlineFormula",
      FontFamily->"Source Sans Pro",
      FontSize->0.9 Inherited,ExpressionUUID->
      "8ebc25f8-2568-4a15-9b89-87c3ab52324a"],
     "\[LineSeparator]",
     "deciphers, using the inverse of matrix modulo 26."
    }],ExpressionUUID->"82fa53af-5083-40a4-a6f1-f6b6767f9cb7"]}
  }]], "Usage",ExpressionUUID->"06c1cf0e-879d-4763-b5ec-c3aed9965b3a"]
}, 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->"0078795f-2fe9-4bfa-8000-598fd61f92dd"],
  Cell[BoxData[
   TemplateBox[{1},
    "Spacer1"]],ExpressionUUID->"70c2d61c-f1b2-4fdd-8952-ccedd7df5dc3"],
  "Details and Options"
 }], "NotesFrameText",ExpressionUUID->
  "4a7c8d54-b3ea-4d5f-8e9b-28567bc13089"]],ExpressionUUID->"588a4937-3aaf-\
469e-95a4-0b618e88f0d4"]], "NotesSection",
 ShowGroupOpener->"Thumbnail",
 WholeCellGroupOpener->True,
 CellGroupingRules->{"SectionGrouping", 50},
 CacheGraphics->False,
 CellID->1986293071,ExpressionUUID->"bd173a1d-a531-4115-ba8c-e75ecd7c043c"],

Cell[TextData[{
 "The key matrix must be square with a determinant coprime to 26 (see ",
 Cell[BoxData[
  TemplateBox[{
    Cell[
     TextData["HillCipherInvertibleQ"]], 
    "paclet:WolframInstitute/Puzzles/ref/HillCipherInvertibleQ", 
    "WolframInstitute/Puzzles Package Symbol"},
   "PackageLink",
   BaseStyle->"InlineFormula"]], "InlineFormula",
  FontFamily->"Source Sans Pro",ExpressionUUID->
  "f49c0cc0-70b4-43b4-bfd1-6d7038591a55"],
 "); otherwise it has no inverse mod 26 and cannot decrypt."
}], "Notes",ExpressionUUID->"e3a59d17-2718-44a4-afbc-c9e93fb51c68"],

Cell[TextData[{
 "The Hill cipher is linear and polygraphic, so it has flat single-letter \
statistics and no period \[LongDash] a frequency or ",
 Cell[BoxData[
  TemplateBox[{
    Cell[
     TextData["CipherPeriods"]], 
    "paclet:WolframInstitute/Puzzles/ref/CipherPeriods", 
    "WolframInstitute/Puzzles Package Symbol"},
   "PackageLink",
   BaseStyle->"InlineFormula"]], "InlineFormula",
  FontFamily->"Source Sans Pro",ExpressionUUID->
  "8aa4f75a-3586-4d17-9393-c19c6803c164"],
 " attack slides off it. Recover a key from known plaintext with ",
 Cell[BoxData[
  TemplateBox[{
    Cell[
     TextData["HillCipherSolve"]], 
    "paclet:WolframInstitute/Puzzles/ref/HillCipherSolve", 
    "WolframInstitute/Puzzles Package Symbol"},
   "PackageLink",
   BaseStyle->"InlineFormula"]], "InlineFormula",
  FontFamily->"Source Sans Pro",ExpressionUUID->
  "9d30e3f5-22e3-4465-ac19-ca235accd997"],
 "."
}], "Notes",ExpressionUUID->"6fb4e69c-549d-4418-b83e-63d3cef33ab2"],

Cell[TextData[{
 "The option ",
 Cell[BoxData["\<\"Alphabet\"\>"], "InlineFormula",
  FontFamily->"Source Sans Pro",
  FontSize->0.9 Inherited,ExpressionUUID->
  "054e082a-9557-4362-9fc1-3a05edf1b92f"],
 " (a keyword or 26-letter alphabet, default the plain alphabet) numbers the \
letters through that alphabet before the matrix acts. ",
 Cell[BoxData[
  RowBox[{"\<\"Alphabet\"\>", " ", "->", " ", "\<\"KRYPTOS\"\>"}]], 
  "InlineFormula",
  FontFamily->"Source Sans Pro",
  FontSize->0.9 Inherited,ExpressionUUID->
  "bbe281f3-dccb-4162-87b6-51f50b3f1d64"],
 " is the KRYPTOS-index-space arrangement used by the Paradigm Kryptos-CTF \
PK7."
}], "Notes",ExpressionUUID->"4318dd8b-e6e8-43f8-ac5a-6aee54e88c6a"],

Cell["\<\
Blocks are taken left to right; a trailing partial block is passed through \
unchanged, as are non-letters (which do not count toward a block). Input case \
is preserved.\
\>", "Notes",ExpressionUUID->"491eef26-f915-4dd4-b1c7-66771e1bddea"]
}, Closed]],

Cell["", "PageDelimiter",ExpressionUUID->"5a9b746d-1e45-45e7-9589-87ca73110028"],

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->"e311c2b9-e7e8-4826-a844-4c1fe54df5e6"],
 Cell[BoxData[
  TemplateBox[{1},
   "Spacer1"]],ExpressionUUID->"1a196cd8-eab2-4cea-bdd6-b320b6e05bb3"],
 "Examples",
 "\[NonBreakingSpace]\[NonBreakingSpace]",
 Cell["(1)", "ExampleCount",ExpressionUUID->
  "eb7549d6-8380-460b-8032-9f127004b4b6"]
}], "PrimaryExamplesSection",
 WholeCellGroupOpener->True,
 CacheGraphics->False,
 CellID->994351682,ExpressionUUID->"1b29af5b-eeb0-408f-be1a-7fdf776793e6"],

Cell[BoxData[
 RowBox[{"Needs", "[", "\"\<WolframInstitute`Puzzles`\>\"", "]"}]], "Input", \
"ExampleInitialization",
 CellLabel->"In[1]:=",
 CellID->1969679695,ExpressionUUID->"6733e477-f2bc-430d-863a-b64509740e91"],

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->
  "d8747b4b-2c41-4cc7-814d-9361427c75d5"],
 Cell[BoxData[
  TemplateBox[{1},
   "Spacer1"]],ExpressionUUID->"522069e0-e6c3-46e9-8c1e-63f42d8fc574"],
 "Basic Examples",
 "\[NonBreakingSpace]\[NonBreakingSpace]",
 Cell["(1)", "ExampleCount",ExpressionUUID->
  "6f71ecf1-d90f-434d-8799-bd339059df54"]
}], "ExampleSection", "ExampleSection",
 WholeCellGroupOpener->True,
 CacheGraphics->False,
 CellID->350978420,ExpressionUUID->"cd959497-7382-42b0-b6ee-1f5a3be10e62"],

Cell["Encipher with a 2x2 key:", "ExampleText",ExpressionUUID->"93c32e22-ae7a-46d0-b0fc-afa2d5154a8f"],

Cell[CellGroupData[{

Cell[BoxData[
 RowBox[{"HillCipher", "[", 
  RowBox[{"\"\<HELPMENOW\>\"", ",", " ", 
   RowBox[{"{", 
    RowBox[{
     RowBox[{"{", 
      RowBox[{"3", ",", " ", "3"}], "}"}], ",", " ", 
     RowBox[{"{", 
      RowBox[{"2", ",", " ", "5"}], "}"}]}], "}"}]}], "]"}]], "Input",
 CellProlog:>Needs["WolframInstitute`Puzzles`"],
 CellLabel->"In[1]:=",ExpressionUUID->"d7f21e16-c612-4e5d-a13c-2d83dec9911d"],

Cell[BoxData["\<\"HIATWSDSW\"\>"], "Output",
 CellLabel->"Out[1]= ",ExpressionUUID->"4cc5ac1f-e7c4-4cba-bf18-f556a663bd2e"]
}, Open  ]],

Cell["Decryption inverts the key modulo 26:", "ExampleText",ExpressionUUID->"3260616d-01c9-4be7-9179-ec28775156ca"],

Cell[CellGroupData[{

Cell[BoxData[
 RowBox[{"HillCipher", "[", 
  RowBox[{"\"\<HIATWSDSW\>\"", ",", " ", 
   RowBox[{"{", 
    RowBox[{
     RowBox[{"{", 
      RowBox[{"3", ",", " ", "3"}], "}"}], ",", " ", 
     RowBox[{"{", 
      RowBox[{"2", ",", " ", "5"}], "}"}]}], "}"}], ",", 
   " ", "\"\<Decrypt\>\""}], "]"}]], "Input",
 CellProlog:>Needs["WolframInstitute`Puzzles`"],
 CellLabel->"In[2]:=",ExpressionUUID->"b8c71b47-1418-4c8b-aa7a-8edfa3fec322"],

Cell[BoxData["\<\"HELPMENOW\"\>"], "Output",
 CellLabel->"Out[2]= ",ExpressionUUID->"cff9fd3e-84a6-4425-845f-ada2e919b208"]
}, Open  ]]
}, Open  ]]
}, 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["HillCipherInvertibleQ"]], 
           "paclet:WolframInstitute/Puzzles/ref/HillCipherInvertibleQ", 
           "WolframInstitute/Puzzles Package Symbol"},
          "PackageLink",
          BaseStyle->"InlineFormula"]], "InlineFormula",
         FontFamily->"Source Sans Pro",ExpressionUUID->
         "c1368f9f-3b90-4c9a-81a2-c7671e363381"],
        "\[NonBreakingSpace]",
        StyleBox[
        "\[MediumSpace]\[FilledVerySmallSquare]\[MediumSpace]", 
         "InlineSeparator"],
        " ",
        Cell[BoxData[
         TemplateBox[{
           Cell[
            TextData["HillCipherSolve"]], 
           "paclet:WolframInstitute/Puzzles/ref/HillCipherSolve", 
           "WolframInstitute/Puzzles Package Symbol"},
          "PackageLink",
          BaseStyle->"InlineFormula"]], "InlineFormula",
         FontFamily->"Source Sans Pro",ExpressionUUID->
         "26501c77-c10d-4e28-bdb5-8521f9b6e1a0"],
        "\[NonBreakingSpace]",
        StyleBox[
        "\[MediumSpace]\[FilledVerySmallSquare]\[MediumSpace]", 
         "InlineSeparator"],
        " ",
        Cell[BoxData[
         TemplateBox[{
           Cell[
            TextData["VigenereCipher"]], 
           "paclet:WolframInstitute/Puzzles/ref/VigenereCipher", 
           "WolframInstitute/Puzzles Package Symbol"},
          "PackageLink",
          BaseStyle->"InlineFormula"]], "InlineFormula",
         FontFamily->"Source Sans Pro",ExpressionUUID->
         "ebd6c415-ce73-475f-8735-275ab7d7b9e7"],
        "\[NonBreakingSpace]",
        StyleBox[
        "\[MediumSpace]\[FilledVerySmallSquare]\[MediumSpace]", 
         "InlineSeparator"],
        " ",
        Cell[BoxData[
         TemplateBox[{
           Cell[
            TextData["KeyedAlphabet"]], 
           "paclet:WolframInstitute/Puzzles/ref/KeyedAlphabet", 
           "WolframInstitute/Puzzles Package Symbol"},
          "PackageLink",
          BaseStyle->"InlineFormula"]], "InlineFormula",
         FontFamily->"Source Sans Pro",ExpressionUUID->
         "8052d752-5210-42f9-a177-969bd2bf9307"]
       }], "SeeAlso",ExpressionUUID->"3d2a1521-aa00-4d85-8272-be7f2c333343"]}
     }]}
  }]], "SeeAlsoSection",ExpressionUUID->"262cf696-6eb9-459c-b49c-\
cd668aa61e84"],

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["Encodings"]], 
           "paclet:WolframInstitute/Puzzles/guide/Encodings"},
          "RefLinkPlain",
          BaseStyle->{"MoreAbout"}]], "MoreAbout",ExpressionUUID->
         "e0b9e02e-444a-4dc5-8e8f-13f8b7816c55"]}]}
     }]}
  }]], "MoreAboutSection",ExpressionUUID->"e0b65f50-cc49-44c3-ac43-\
91ca266fc425"],

Cell[" ", "FooterCell",ExpressionUUID->"6f2070fc-f07e-4486-b9c3-d654680e4989"]
},
Saveable->False,
ScreenStyleEnvironment->"Working",
WindowSize->{900, 830},
WindowMargins->{{0, Automatic}, {Automatic, 0}},
WindowTitle->"HillCipher",
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, 43.914566}", 
    "history" -> {"XX", "", "", ""}, "context" -> "WolframInstitute`Puzzles`",
     "keywords" -> {}, "specialkeywords" -> {}, 
    "tutorialcollectionlinks" -> {}, "index" -> True, "label" -> 
    "Wolfram Institute/ Puzzles Symbol", "language" -> "en", "paclet" -> 
    "WolframInstitute/Puzzles", "status" -> "None", "summary" -> 
    "PackageLink[HillCipher,paclet : WolframInstitute/Puzzles/ref/HillCipher, \
WolframInstitute/Puzzles Package Symbol][text, matrix] enciphers text with \
the Hill cipher: each block of Length[matrix] letters is read as a vector of \
letter indices and multiplied, modulo 26, by the integer key matrix. \
PackageLink[HillCipher,paclet : WolframInstitute/Puzzles/ref/HillCipher, \
WolframInstitute/Puzzles Package Symbol][text, matrix, Decrypt] deciphers, \
using the inverse of matrix modulo 26.", "synonyms" -> {}, "tabletags" -> {}, 
    "title" -> "HillCipher", "titlemodifier" -> "", "metadescription" -> "", 
    "windowtitle" -> "HillCipher", "type" -> "Symbol", "uri" -> 
    "WolframInstitute/Puzzles/ref/HillCipher", "WorkflowDockedCell" -> ""}, 
  "SearchTextTranslated" -> ""},
CellContext->CellGroup,
FrontEndVersion->"15.0 for Mac OS X ARM (64-bit) (May 19, 2026)",
StyleDefinitions->FrontEnd`FileName[{"Wolfram"}, "Reference.nb"],
ExpressionUUID->"0ddd021a-9414-440c-a15f-6bde32a7a58b"
]
(* End of Notebook Content *)

(* Internal cache information *)
(*CellTagsOutline
CellTagsIndex->{}
*)
(*CellTagsIndex
CellTagsIndex->{}
*)
(*NotebookFileOutline
Notebook[{
Cell[578, 21, 5621, 139, 70, "AnchorBarGrid",ExpressionUUID->"96656204-4cf7-47c1-8db9-f20cea1b5fe0",
 CellID->1],
Cell[6202, 162, 107, 0, 70, "ContextNameCell",ExpressionUUID->"2912d3f5-2f64-4dcb-9c8b-824609aa1186"],
Cell[CellGroupData[{
Cell[6334, 166, 553, 14, 70, "ObjectNameGrid",ExpressionUUID->"ce330054-3b85-481f-a610-d13ccc87ecfb"],
Cell[6890, 182, 1869, 47, 70, "Usage",ExpressionUUID->"06c1cf0e-879d-4763-b5ec-c3aed9965b3a"]
}, Open  ]],
Cell[CellGroupData[{
Cell[8796, 234, 1444, 34, 70, "NotesSection",ExpressionUUID->"bd173a1d-a531-4115-ba8c-e75ecd7c043c",
 CellGroupingRules->{"SectionGrouping", 50},
 CellID->1986293071],
Cell[10243, 270, 574, 13, 70, "Notes",ExpressionUUID->"e3a59d17-2718-44a4-afbc-c9e93fb51c68"],
Cell[10820, 285, 973, 25, 70, "Notes",ExpressionUUID->"6fb4e69c-549d-4418-b83e-63d3cef33ab2"],
Cell[11796, 312, 711, 16, 70, "Notes",ExpressionUUID->"4318dd8b-e6e8-43f8-ac5a-6aee54e88c6a"],
Cell[12510, 330, 250, 4, 70, "Notes",ExpressionUUID->"491eef26-f915-4dd4-b1c7-66771e1bddea"]
}, Closed]],
Cell[12775, 337, 80, 0, 70, "PageDelimiter",ExpressionUUID->"5a9b746d-1e45-45e7-9589-87ca73110028"],
Cell[CellGroupData[{
Cell[12880, 341, 1400, 37, 70, "PrimaryExamplesSection",ExpressionUUID->"1b29af5b-eeb0-408f-be1a-7fdf776793e6",
 CellID->994351682],
Cell[14283, 380, 216, 4, 70, "Input",ExpressionUUID->"6733e477-f2bc-430d-863a-b64509740e91",
 CellID->1969679695],
Cell[CellGroupData[{
Cell[14524, 388, 1235, 31, 70, "ExampleSection",ExpressionUUID->"cd959497-7382-42b0-b6ee-1f5a3be10e62",
 CellID->350978420],
Cell[15762, 421, 102, 0, 70, "ExampleText",ExpressionUUID->"93c32e22-ae7a-46d0-b0fc-afa2d5154a8f"],
Cell[CellGroupData[{
Cell[15889, 425, 404, 10, 70, "Input",ExpressionUUID->"d7f21e16-c612-4e5d-a13c-2d83dec9911d"],
Cell[16296, 437, 123, 1, 70, "Output",ExpressionUUID->"4cc5ac1f-e7c4-4cba-bf18-f556a663bd2e"]
}, Open  ]],
Cell[16434, 441, 115, 0, 70, "ExampleText",ExpressionUUID->"3260616d-01c9-4be7-9179-ec28775156ca"],
Cell[CellGroupData[{
Cell[16574, 445, 437, 11, 70, "Input",ExpressionUUID->"b8c71b47-1418-4c8b-aa7a-8edfa3fec322"],
Cell[17014, 458, 123, 1, 70, "Output",ExpressionUUID->"cff9fd3e-84a6-4425-845f-ada2e919b208"]
}, Open  ]]
}, Open  ]]
}, Open  ]],
Cell[17176, 464, 2575, 67, 70, "SeeAlsoSection",ExpressionUUID->"262cf696-6eb9-459c-b49c-cd668aa61e84"],
Cell[19754, 533, 698, 19, 70, "MoreAboutSection",ExpressionUUID->"e0b65f50-cc49-44c3-ac43-91ca266fc425"],
Cell[20455, 554, 78, 0, 70, "FooterCell",ExpressionUUID->"6f2070fc-f07e-4486-b9c3-d654680e4989"]
}
]
*)

(* End of internal cache information *)

